diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2023-09-23 18:36:40 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-10-07 10:55:45 +0200 |
commit | 2fa264283d207ab4213e2b88259db1e7ce5d5d1d (patch) | |
tree | 2dcbc28a51a346455f2965cf53e63be60e24931e /drivers/media/i2c | |
parent | media: tvp541x: Extend match support for OF tables (diff) | |
download | linux-2fa264283d207ab4213e2b88259db1e7ce5d5d1d.tar.xz linux-2fa264283d207ab4213e2b88259db1e7ce5d5d1d.zip |
media: tvp541x: Drop CONFIG_OF ifdeffery
Drop of_match_ptr() from tvp514x_driver and get rid of ugly CONFIG_OF
if check. This slightly increases the size of tvp514x_driver on non-OF
system and shouldn't be an issue.
Add mod_devicetable.h include.
It also allows, in case if needed, to enumerate this device via ACPI with
PRP0001 magic.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/tvp514x.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index 4d0ffaa312c5..569a9437ec86 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -20,6 +20,7 @@ #include <linux/slab.h> #include <linux/delay.h> #include <linux/videodev2.h> +#include <linux/mod_devicetable.h> #include <linux/module.h> #include <linux/v4l2-mediabus.h> #include <linux/of.h> @@ -1190,7 +1191,6 @@ static const struct i2c_device_id tvp514x_id[] = { }; MODULE_DEVICE_TABLE(i2c, tvp514x_id); -#if IS_ENABLED(CONFIG_OF) static const struct of_device_id tvp514x_of_match[] = { { .compatible = "ti,tvp5146", .data = tvp5146_init_reg_seq }, { .compatible = "ti,tvp5146m2", .data = tvp514xm_init_reg_seq }, @@ -1199,11 +1199,10 @@ static const struct of_device_id tvp514x_of_match[] = { { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, tvp514x_of_match); -#endif static struct i2c_driver tvp514x_driver = { .driver = { - .of_match_table = of_match_ptr(tvp514x_of_match), + .of_match_table = tvp514x_of_match, .name = TVP514X_MODULE_NAME, }, .probe = tvp514x_probe, |