[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181002073222.11368-1-ricardo.ribalda@gmail.com>
Date: Tue, 2 Oct 2018 09:32:17 +0200
From: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To: Pavel Machek <pavel@....cz>, Sakari Ailus <sakari.ailus@....fi>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
Hans Verkuil <hans.verkuil@...co.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Subject: [PATCH v5 1/6] [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 <ricardo.ribalda@...il.com>
Acked-by: Pavel Machek <pavel@....cz>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
---
drivers/media/i2c/ad5820.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/i2c/ad5820.c b/drivers/media/i2c/ad5820.c
index 907323f0ca3b..22759aaa2dba 100644
--- a/drivers/media/i2c/ad5820.c
+++ b/drivers/media/i2c/ad5820.c
@@ -317,6 +317,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);
--
2.19.0
Powered by blists - more mailing lists