diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2018-11-06 09:06:41 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-11-23 06:07:36 -0500 |
commit | e10b40f3304360d3a2d07d690ff12197f828f2c8 (patch) | |
tree | 8092ca993d877a34015b91705567121084dafc16 /drivers/media/platform | |
parent | be773a176cbba68e9b2b6b669e5efe966844adba (diff) | |
download | linux-stable-e10b40f3304360d3a2d07d690ff12197f828f2c8.tar.gz linux-stable-e10b40f3304360d3a2d07d690ff12197f828f2c8.tar.bz2 linux-stable-e10b40f3304360d3a2d07d690ff12197f828f2c8.zip |
media: vivid: fill in media_device bus_info
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 <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/vivid/vivid-core.c | 2 |
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 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; |