diff options
author | Jacopo Mondi <jacopo.mondi@ideasonboard.com> | 2023-09-11 16:56:36 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 09:39:57 +0200 |
commit | b4e9a2d278c955715926f332773a9f66140fc41d (patch) | |
tree | 0c4d81bc352e67ab4dedbbc3abb376821771580b /drivers/media/i2c/mt9v011.c | |
parent | media: i2c: video-i2c: Convert enum->pointer for data in the match tables (diff) | |
download | linux-b4e9a2d278c955715926f332773a9f66140fc41d.tar.xz linux-b4e9a2d278c955715926f332773a9f66140fc41d.zip |
media: i2c: Drop ifdeffery from sensor drivers
Since commit 7d3c7d2a2914 ("media: i2c: Add a camera sensor top level
menu") the CONFIG_MEDIA_CONTROLLER and CONFIG_VIDEO_V4L2_SUBDEV_API are
selected by the top-level VIDEO_CAMERA_SENSOR menu.
Remove all ifdefferies from camera sensor drivers to simplify the code.
Compile-tested only.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/i2c/mt9v011.c')
-rw-r--r-- | drivers/media/i2c/mt9v011.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/media/i2c/mt9v011.c b/drivers/media/i2c/mt9v011.c index 774861ba7747..37a634b92cd5 100644 --- a/drivers/media/i2c/mt9v011.c +++ b/drivers/media/i2c/mt9v011.c @@ -49,9 +49,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-2)"); struct mt9v011 { struct v4l2_subdev sd; -#ifdef CONFIG_MEDIA_CONTROLLER struct media_pad pad; -#endif struct v4l2_ctrl_handler ctrls; unsigned width, height; unsigned xtal; @@ -483,9 +481,7 @@ static int mt9v011_probe(struct i2c_client *c) u16 version; struct mt9v011 *core; struct v4l2_subdev *sd; -#ifdef CONFIG_MEDIA_CONTROLLER int ret; -#endif /* Check if the adapter supports the needed features */ if (!i2c_check_functionality(c->adapter, @@ -499,14 +495,12 @@ static int mt9v011_probe(struct i2c_client *c) sd = &core->sd; v4l2_i2c_subdev_init(sd, c, &mt9v011_ops); -#ifdef CONFIG_MEDIA_CONTROLLER core->pad.flags = MEDIA_PAD_FL_SOURCE; sd->entity.function = MEDIA_ENT_F_CAM_SENSOR; ret = media_entity_pads_init(&sd->entity, 1, &core->pad); if (ret < 0) return ret; -#endif /* Check if the sensor is really a MT9V011 */ version = mt9v011_read(sd, R00_MT9V011_CHIP_VERSION); |