summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/ad5820.c
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ribalda@kernel.org>2019-10-07 15:28:51 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-10-24 23:43:06 +0200
commit801ef7c4919efba6b96b5aed1e72844ca69e26d3 (patch)
treed4ce1a938089b9513219bc7f63327725520fdb4a /drivers/media/i2c/ad5820.c
parentmedia: ov5640: Make 2592x1944 mode only available at 15 fps (diff)
downloadlinux-801ef7c4919efba6b96b5aed1e72844ca69e26d3.tar.xz
linux-801ef7c4919efba6b96b5aed1e72844ca69e26d3.zip
media: ad5820: Define entity function
Without this patch, media_device_register_entity throws a warning: dev_warn(mdev->dev, "Entity type for entity %s was not initialized!\n", entity->name); Signed-off-by: Ricardo Ribalda Delgado <ribalda@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ad5820.c')
-rw-r--r--drivers/media/i2c/ad5820.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c
index 925c171e7797..7a49651f4d1f 100644
--- a/drivers/media/i2c/ad5820.c
+++ b/drivers/media/i2c/ad5820.c
@@ -309,6 +309,7 @@ static int ad5820_probe(struct i2c_client *client,
v4l2_i2c_subdev_init(&coil->subdev, client, &ad5820_ops);
coil->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
coil->subdev.internal_ops = &ad5820_internal_ops;
+ coil->subdev.entity.function = MEDIA_ENT_F_LENS;
strscpy(coil->subdev.name, "ad5820 focus", sizeof(coil->subdev.name));
ret = media_entity_pads_init(&coil->subdev.entity, 0, NULL);