[PATCH v2 2/2] media: i2c: imx415: Drop HAS_EVENTS flag

Tommaso Merciai posted 2 patches 3 weeks, 5 days ago
[PATCH v2 2/2] media: i2c: imx415: Drop HAS_EVENTS flag
Posted by Tommaso Merciai 3 weeks, 5 days ago
v4l2_subdev_init_finalize() already sets the HAS_EVENTS flag if a
control handler is set. Let's drop the HAS_EVENTS flag.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
---
 drivers/media/i2c/imx415.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
index a20b0db330d3..3f7924aa1bd3 100644
--- a/drivers/media/i2c/imx415.c
+++ b/drivers/media/i2c/imx415.c
@@ -1113,8 +1113,7 @@ static int imx415_subdev_init(struct imx415 *sensor)
 	if (ret)
 		return ret;
 
-	sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
-				V4L2_SUBDEV_FL_HAS_EVENTS;
+	sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 	sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
 	sensor->subdev.entity.function = MEDIA_ENT_F_CAM_SENSOR;
 	ret = media_entity_pads_init(&sensor->subdev.entity, 1, &sensor->pad);
-- 
2.34.1
Re: [PATCH v2 2/2] media: i2c: imx415: Drop HAS_EVENTS flag
Posted by Michael Riesch 3 weeks, 3 days ago
Hi all,

Sorry for the recent HTML mail. Let's try again -- hopefully it works now.

On 10/29/24 23:56, Tommaso Merciai wrote:
> v4l2_subdev_init_finalize() already sets the HAS_EVENTS flag if a
> control handler is set. Let's drop the HAS_EVENTS flag.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>

Thanks for the patch.

Acked-by: Michael Riesch <michael.riesch@wolfvision.net>

Best regards,
Michael

> ---
>  drivers/media/i2c/imx415.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
> index a20b0db330d3..3f7924aa1bd3 100644
> --- a/drivers/media/i2c/imx415.c
> +++ b/drivers/media/i2c/imx415.c
> @@ -1113,8 +1113,7 @@ static int imx415_subdev_init(struct imx415 *sensor)
>  	if (ret)
>  		return ret;
>  
> -	sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
> -				V4L2_SUBDEV_FL_HAS_EVENTS;
> +	sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>  	sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
>  	sensor->subdev.entity.function = MEDIA_ENT_F_CAM_SENSOR;
>  	ret = media_entity_pads_init(&sensor->subdev.entity, 1, &sensor->pad);
Re: [PATCH v2 2/2] media: i2c: imx415: Drop HAS_EVENTS flag
Posted by Laurent Pinchart 3 weeks, 4 days ago
On Tue, Oct 29, 2024 at 11:56:31PM +0100, Tommaso Merciai wrote:
> v4l2_subdev_init_finalize() already sets the HAS_EVENTS flag if a
> control handler is set. Let's drop the HAS_EVENTS flag.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/i2c/imx415.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/i2c/imx415.c b/drivers/media/i2c/imx415.c
> index a20b0db330d3..3f7924aa1bd3 100644
> --- a/drivers/media/i2c/imx415.c
> +++ b/drivers/media/i2c/imx415.c
> @@ -1113,8 +1113,7 @@ static int imx415_subdev_init(struct imx415 *sensor)
>  	if (ret)
>  		return ret;
>  
> -	sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
> -				V4L2_SUBDEV_FL_HAS_EVENTS;
> +	sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>  	sensor->pad.flags = MEDIA_PAD_FL_SOURCE;
>  	sensor->subdev.entity.function = MEDIA_ENT_F_CAM_SENSOR;
>  	ret = media_entity_pads_init(&sensor->subdev.entity, 1, &sensor->pad);

-- 
Regards,

Laurent Pinchart