From 5cc72c472654c493c461898d892e87cde97994be Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 19 Oct 2017 12:31:20 -0400 Subject: media: adv7180: 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: Lars-Peter Clausen Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/adv7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/i2c/adv7180.c') diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 3df28f2f9b38..6fb818a775db 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -1328,7 +1328,7 @@ static int adv7180_probe(struct i2c_client *client, state->input = 0; sd = &state->sd; v4l2_i2c_subdev_init(sd, client, &adv7180_ops); - sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; + sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS; ret = adv7180_init_controls(state); if (ret) -- cgit