]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: i2c: rdacm2x: properly set subdev entity function
authorLaurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Wed, 9 Mar 2022 11:55:06 +0000 (12:55 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:17 +0000 (11:02 +0200)
The subdevice entity function was left unset, which produces a warning
when probing the device:

mxc-md bus@58000000:camera: Entity type for entity rdacm20 19-0051 was
not initialized!

This patch will set entity function to MEDIA_ENT_F_CAM_SENSOR and leave
flags unset.

Fixes: 89a42415d958 ("media: i2c: Add RDACM20 driver")
Fixes: d586508a2c05 ("media: i2c: Add driver for RDACM21 camera module")
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/rdacm20.c
drivers/media/i2c/rdacm21.c

index 025a610de893539d8a360f592e66d2dbce2433c5..9c6f66cab56429d6634d1c85d4101b8730b9bf06 100644 (file)
@@ -611,7 +611,7 @@ static int rdacm20_probe(struct i2c_client *client)
                goto error_free_ctrls;
 
        dev->pad.flags = MEDIA_PAD_FL_SOURCE;
-       dev->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR;
+       dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
        ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
        if (ret < 0)
                goto error_free_ctrls;
index 12ec5467ed1ee0c0eea20570b5a044664d835f0a..ef31cf5f23cac4bab0c4a7c2f315f63df4e5ebd3 100644 (file)
@@ -583,7 +583,7 @@ static int rdacm21_probe(struct i2c_client *client)
                goto error_free_ctrls;
 
        dev->pad.flags = MEDIA_PAD_FL_SOURCE;
-       dev->sd.entity.flags |= MEDIA_ENT_F_CAM_SENSOR;
+       dev->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
        ret = media_entity_pads_init(&dev->sd.entity, 1, &dev->pad);
        if (ret < 0)
                goto error_free_ctrls;