Message ID | 22e1d85d8896681a3f3f9abdc323e634b49fa1fd.1708422122.git.mchehab@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add some uevent variables on DVB to support persistent names on udev | expand |
On 20/02/2024 10:46, Mauro Carvalho Chehab wrote: > 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> Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Regards, Hans > --- > 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);
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);
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(+)