* [PATCH] vivid: fill in media_device bus_info
@ 2018-11-06 14:06 Hans Verkuil
0 siblings, 0 replies; only message in thread
From: Hans Verkuil @ 2018-11-06 14:06 UTC (permalink / raw)
To: Linux Media Mailing List
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>
---
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c
index bc7307183b1d..c1b5976af3e6 100644
--- a/drivers/media/platform/vivid/vivid-core.c
+++ b/drivers/media/platform/vivid/vivid-core.c
@@ -670,6 +670,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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-06 23:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 14:06 [PATCH] vivid: fill in media_device bus_info Hans Verkuil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.