diff options
| author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-10 09:27:37 -0300 |
|---|---|---|
| committer | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-10 09:27:37 -0300 |
| commit | c3bf1b32148a59bc0a8e58c126d642236c7febc1 (patch) | |
| tree | f4932978021b49311d31c87e514a0a3c42135e84 /linux/drivers/media/video | |
| parent | e96f69c1735c817cc19e220cb84e0f339190cf1b (diff) | |
| download | mediapointer-dvb-s2-c3bf1b32148a59bc0a8e58c126d642236c7febc1.tar.gz mediapointer-dvb-s2-c3bf1b32148a59bc0a8e58c126d642236c7febc1.tar.bz2 | |
Add sysfs device links to dvb devices
From: Andrew de Quincey <adq_dvb@lidskialf.net>
Currently in /sys/class/dvb/dvbX.demuxY/ we have:
dev
uevent
With the patch, we have (for a PCI DVB device):
dev
device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:03:0d.0
uevent
So userspace tools can (finally) work out which physical device a DVB adapter
refers to. Previously you had to kinda look through dmesg and hope that it
hadn't been dumped out of the buffer. This makes debugging a lot easier if
the system has been up for a long time!
This is done by adding an extra 'struct device *' parameter to
dvb_register_adapter(). It will work with any kind of standard
linux 'device'. Additionally, if someone has an embedded system which does
things differently, they can simply supply 'NULL' and the behaviour will be
as before - the link will simply not appear.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Ack'd-by: Manu Abraham <manu@linuxtv.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video')
| -rw-r--r-- | linux/drivers/media/video/cx88/cx88-dvb.c | 2 | ||||
| -rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 2 | ||||
| -rw-r--r-- | linux/drivers/media/video/video-buf-dvb.c | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c index 38564eaca..e1bdd9a61 100644 --- a/linux/drivers/media/video/cx88/cx88-dvb.c +++ b/linux/drivers/media/video/cx88/cx88-dvb.c @@ -724,7 +724,7 @@ static int dvb_register(struct cx8802_dev *dev) cx88_call_i2c_clients (dev->core, TUNER_SET_STANDBY, NULL); /* register everything */ - return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev); + return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev); } /* ----------------------------------------------------------- */ diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 9cbc8343d..fe7ca962a 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -1090,7 +1090,7 @@ static int dvb_init(struct saa7134_dev *dev) } /* register everything else */ - return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev); + return videobuf_dvb_register(&dev->dvb, THIS_MODULE, dev, &dev->pci->dev); } static int dvb_fini(struct saa7134_dev *dev) diff --git a/linux/drivers/media/video/video-buf-dvb.c b/linux/drivers/media/video/video-buf-dvb.c index 02e5ffaf3..1b9968a19 100644 --- a/linux/drivers/media/video/video-buf-dvb.c +++ b/linux/drivers/media/video/video-buf-dvb.c @@ -144,14 +144,15 @@ static int videobuf_dvb_stop_feed(struct dvb_demux_feed *feed) int videobuf_dvb_register(struct videobuf_dvb *dvb, struct module *module, - void *adapter_priv) + void *adapter_priv, + struct device *device) { int result; mutex_init(&dvb->lock); /* register adapter */ - result = dvb_register_adapter(&dvb->adapter, dvb->name, module); + result = dvb_register_adapter(&dvb->adapter, dvb->name, module, device); if (result < 0) { printk(KERN_WARNING "%s: dvb_register_adapter failed (errno = %d)\n", dvb->name, result); |
