]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: media: atomisp: fix build error in ov5693 driver
authorTobias Regnery <tobias.regnery@gmail.com>
Tue, 14 Mar 2017 11:47:17 +0000 (12:47 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Mar 2017 02:22:59 +0000 (11:22 +0900)
The ov5693 driver unconditionally uses the entity member of struct v4l2_subdev.
However this member is conditionally compiled in if CONFIG_MEDIA_CONTROLLER is
set. This results in the following build error if CONFIG_MEDIA_CONTROLLER is
not set:

drivers/staging/media/atomisp/i2c/ov5693/ov5693.c: In function 'ov5693_remove':
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:1961:31: error: 'struct v4l2_subdev' has no member named 'entity'
  media_entity_cleanup(&dev->sd.entity);

drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2023:9: error: 'struct v4l2_subdev' has no member named 'entity'
  dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
         ^
drivers/staging/media/atomisp/i2c/ov5693/ov5693.c:2045:39: error: 'struct v4l2_subdev' has no member named 'entity'
  ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);

Add the corresponding Kconfig dependency to solve this error.

Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/i2c/ov5693/Kconfig

index 9fb1bffbe9b3daf8d4811dce4a822a447b24872f..3954b8c65fd1fb0a129a95bcbf7dc3bafdd6b7c4 100644 (file)
@@ -1,6 +1,6 @@
 config VIDEO_OV5693
        tristate "Omnivision ov5693 sensor support"
-       depends on I2C && VIDEO_V4L2
+       depends on I2C && VIDEO_V4L2 && MEDIA_CONTROLLER
        ---help---
          This is a Video4Linux2 sensor-level driver for the Micron
          ov5693 5 Mpixel camera.