[PATCH 1/2] media: dvbdev: export adapter's name and bus ID to DVB uevent variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux