RE: [PATCH 2/4] media: max2175: don't clear V4L2_SUBDEV_FL_IS_I2C

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mita-san,

Thank you for fixing this.

> Subject: [PATCH 2/4] media: max2175: 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
> subdev->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: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@xxxxxxxxxxxxxx>
> Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>
> Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>

Acked-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@xxxxxxxxxxxxxx>

Thanks,
Ramesh

> ---
>  drivers/media/i2c/max2175.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/max2175.c b/drivers/media/i2c/max2175.c
> index bf0e821..2f1966b 100644
> --- a/drivers/media/i2c/max2175.c
> +++ b/drivers/media/i2c/max2175.c
> @@ -1345,7 +1345,7 @@ static int max2175_probe(struct i2c_client *client,
>  	v4l2_i2c_subdev_init(sd, client, &max2175_ops);
>  	ctx->client = client;
> 
> -	sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
> +	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> 
>  	/* Controls */
>  	hdl = &ctx->ctrl_hdl;
> --
> 2.7.4





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux