aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2018-11-06 15:06:41 +0100
committerHans Verkuil <hansverk@cisco.com>2018-11-07 11:15:12 +0100
commitb6f3defe272a97ea65f4352cdc9c0b943164a75e (patch)
tree17efa4ec4974c14f57db286e153905b977f202b1
parent2d96f0d2c960a4d40fdcdd0695b3c8ffd4882aa9 (diff)
vivid: fill in media_device bus_infobr-v4.21a
If you create multiple vivid instances, each with their own media device, then there was no way to tell them apart. Fill in the bus_info so each instance has a unique bus_info string. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
-rw-r--r--drivers/media/platform/vivid/vivid-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c
index 626e2b24a403..ec1b1a8ea775 100644
--- a/drivers/media/platform/vivid/vivid-core.c
+++ b/drivers/media/platform/vivid/vivid-core.c
@@ -669,6 +669,8 @@ static int vivid_create_instance(struct platform_device *pdev, int inst)
/* Initialize media device */
strlcpy(dev->mdev.model, VIVID_MODULE_NAME, sizeof(dev->mdev.model));
+ snprintf(dev->mdev.bus_info, sizeof(dev->mdev.bus_info),
+ "platform:%s-%03d", VIVID_MODULE_NAME, inst);
dev->mdev.dev = &pdev->dev;
media_device_init(&dev->mdev);
dev->mdev.ops = &vivid_media_ops;

Privacy Policy