From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Sasha Levin <sashal@kernel.org>,
linux-media@vger.kernel.org
Subject: [PATCH AUTOSEL 4.20 069/304] media: vivid: fill in media_device bus_info
Date: Mon, 28 Jan 2019 10:39:46 -0500 [thread overview]
Message-ID: <20190128154341.47195-69-sashal@kernel.org> (raw)
In-Reply-To: <20190128154341.47195-1-sashal@kernel.org>
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[ Upstream commit e10b40f3304360d3a2d07d690ff12197f828f2c8 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/platform/vivid/vivid-core.c | 2 ++
1 file changed, 2 insertions(+)
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;
--
2.19.1
next prev parent reply other threads:[~2019-01-28 17:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190128154341.47195-1-sashal@kernel.org>
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 063/304] media: rc: ensure close() is called on rc_unregister_device Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 064/304] media: video-i2c: avoid accessing released memory area when removing driver Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 065/304] media: mtk-vcodec: Release device nodes in mtk_vcodec_init_enc_pm() Sasha Levin
2019-01-28 15:39 ` Sasha Levin [this message]
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 082/304] media: adv*/tc358743/ths8200: fill in min width/height/pixelclock Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 114/304] media: i2c: TDA1997x: select CONFIG_HDMI Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 115/304] media: DaVinci-VPBE: fix error handling in vpbe_initialize() Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 126/304] media: imx274: select REGMAP_I2C Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 140/304] media: v4l2-device: Link subdevices to their parent devices if available Sasha Levin
2019-01-28 15:41 ` [PATCH AUTOSEL 4.20 144/304] media: coda: fix H.264 deblocking filter controls Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190128154341.47195-69-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab+samsung@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).