media: ov2640: don't clear V4L2_SUBDEV_FL_IS_I2C
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 19 Oct 2017 16:31:22 +0000 (12:31 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 16:08:34 +0000 (12:08 -0400)
commit6b725eb682a634c6742660f85aa5736ee1009a42
tree9b64020a29087d2f106378c2bbc30900bc0ad559
parentbaf1b186eaa1e0ac3a385c92b1a955b10c59ee84
media: ov2640: don't clear V4L2_SUBDEV_FL_IS_I2C

The v4l2_i2c_subdev_init() sets V4L2_SUBDEV_FL_IS_I2C flag in the
subdev->flags.  But this driver overwrites subdev->flags immediately after
calling v4l2_i2c_subdev_init().  So V4L2_SUBDEV_FL_IS_I2C is not set after
all.

This stops breaking subdev->flags and preserves V4L2_SUBDEV_FL_IS_I2C.

Side note: According to the comment in v4l2_device_unregister(), this is
problematic only if the device is platform bus device.  Device tree or
ACPI based devices are not affected.

Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/ov2640.c