summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorAkinobu Mita2017-10-19 18:31:22 +0200
committerMauro Carvalho Chehab2017-10-31 17:08:34 +0100
commit6b725eb682a634c6742660f85aa5736ee1009a42 (patch)
tree9b64020a29087d2f106378c2bbc30900bc0ad559 /drivers/media/i2c
parentmedia: max2175: don't clear V4L2_SUBDEV_FL_IS_I2C (diff)
downloadkernel-qcow2-linux-6b725eb682a634c6742660f85aa5736ee1009a42.tar.gz
kernel-qcow2-linux-6b725eb682a634c6742660f85aa5736ee1009a42.tar.xz
kernel-qcow2-linux-6b725eb682a634c6742660f85aa5736ee1009a42.zip
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>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/ov2640.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov2640.c b/drivers/media/i2c/ov2640.c
index 38b8bab7e6aa..518868388d65 100644
--- a/drivers/media/i2c/ov2640.c
+++ b/drivers/media/i2c/ov2640.c
@@ -1115,7 +1115,7 @@ static int ov2640_probe(struct i2c_client *client,
goto err_clk;
v4l2_i2c_subdev_init(&priv->subdev, client, &ov2640_subdev_ops);
- priv->subdev.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
+ priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
v4l2_ctrl_handler_init(&priv->hdl, 2);
v4l2_ctrl_new_std(&priv->hdl, &ov2640_ctrl_ops,
V4L2_CID_VFLIP, 0, 1, 1, 0);