From: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Hyunwoo Kim <imv4bel@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Zhipeng Lu <alexious@zju.edu.cn>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 1/2] media: dvbdev: export adapter's name and bus ID to DVB uevent variables
Date: Tue, 20 Feb 2024 10:46:01 +0100 [thread overview]
Message-ID: <22e1d85d8896681a3f3f9abdc323e634b49fa1fd.1708422122.git.mchehab@kernel.org> (raw)
In-Reply-To: <cover.1708422122.git.mchehab@kernel.org>
Add two new variables for uevent, helping udev to be able to setup
a persistent name for the device.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
drivers/media/dvb-core/dvbdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c
index 733d0bc4b4cc..01227c695cbd 100644
--- a/drivers/media/dvb-core/dvbdev.c
+++ b/drivers/media/dvb-core/dvbdev.c
@@ -1064,6 +1064,8 @@ static int dvb_uevent(const struct device *dev, struct kobj_uevent_env *env)
{
const struct dvb_device *dvbdev = dev_get_drvdata(dev);
+ add_uevent_var(env, "DVB_ADAPTER_NAME=%s", dvbdev->adapter->name);
+ add_uevent_var(env, "DVB_ADAPTER_PDEV=%s", dev_name(dev->parent));
add_uevent_var(env, "DVB_ADAPTER_NUM=%d", dvbdev->adapter->num);
add_uevent_var(env, "DVB_DEVICE_TYPE=%s", dnames[dvbdev->type]);
add_uevent_var(env, "DVB_DEVICE_NUM=%d", dvbdev->id);
--
2.43.0
next prev parent reply other threads:[~2024-02-20 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 9:46 [PATCH 0/2] Add some uevent variables on DVB to support persistent names on udev Mauro Carvalho Chehab
2024-02-20 9:46 ` Mauro Carvalho Chehab [this message]
2024-02-26 8:41 ` [PATCH 1/2] media: dvbdev: export adapter's name and bus ID to DVB uevent variables Hans Verkuil
2024-02-20 9:46 ` [PATCH 2/2] em28xx-dvb: fix DVB adapter device name Mauro Carvalho Chehab
2024-02-26 9:03 ` Hans Verkuil
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=22e1d85d8896681a3f3f9abdc323e634b49fa1fd.1708422122.git.mchehab@kernel.org \
--to=mchehab@kernel.org \
--cc=alexious@zju.edu.cn \
--cc=benjamin.tissoires@redhat.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=imv4bel@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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
all inboxes | Powered by JetHome®