summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/rdacm21.c
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@oss.nxp.com>2022-03-09 12:55:06 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-05-13 11:02:17 +0200
commitd2facee67b4883bb3e7461a0a93fd70d0c7b7261 (patch)
treed2cf9098bd3258ab72e780706e571f2de1f0b2df /drivers/media/i2c/rdacm21.c
parentmedia: imx-jpeg: Fix potential array out of bounds in queue_setup (diff)
downloadlinux-d2facee67b4883bb3e7461a0a93fd70d0c7b7261.tar.xz
linux-d2facee67b4883bb3e7461a0a93fd70d0c7b7261.zip
media: i2c: rdacm2x: properly set subdev entity function
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: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Fixes: a59f853b3b4b ("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>
Diffstat (limited to 'drivers/media/i2c/rdacm21.c')
-rw-r--r--drivers/media/i2c/rdacm21.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
index 12ec5467ed1e..ef31cf5f23ca 100644
--- a/drivers/media/i2c/rdacm21.c
+++ b/drivers/media/i2c/rdacm21.c
@@ -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;