aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2007-01-24 20:49:58 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-21 13:35:08 -0200
commit357a268d59411b84fde712400585dd118c61467f (patch)
treee8ec8b950bab37b19ff90da6d65f42c3834b6463 /drivers/media/dvb
parentfeaba7a96dd02f2fc0d1fe5c2148d79444db0717 (diff)
V4L/DVB (5157): Set phys, bustype, version, vendor and product for input device
Add phys-string, bustype, version, vendor and product to help udev and others using EVIOCPHYS ioctl to identify the input device node. Code taken (with little changes) from budget-ci.c Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/ttpci/av7110_ir.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_ir.c b/drivers/media/dvb/ttpci/av7110_ir.c
index e4544ea2b89..744d87e563c 100644
--- a/drivers/media/dvb/ttpci/av7110_ir.c
+++ b/drivers/media/dvb/ttpci/av7110_ir.c
@@ -16,6 +16,7 @@
static int av_cnt;
static struct av7110 *av_list[4];
static struct input_dev *input_dev;
+static char input_phys[32];
static u8 delay_timer_finished;
@@ -231,8 +232,22 @@ int __devinit av7110_ir_init(struct av7110 *av7110)
if (!input_dev)
return -ENOMEM;
+ snprintf(input_phys, sizeof(input_phys),
+ "pci-%s/ir0", pci_name(av7110->dev->pci));
+
input_dev->name = "DVB on-card IR receiver";
+ input_dev->phys = input_phys;
+ input_dev->id.bustype = BUS_PCI;
+ input_dev->id.version = 1;
+ if (av7110->dev->pci->subsystem_vendor) {
+ input_dev->id.vendor = av7110->dev->pci->subsystem_vendor;
+ input_dev->id.product = av7110->dev->pci->subsystem_device;
+ } else {
+ input_dev->id.vendor = av7110->dev->pci->vendor;
+ input_dev->id.product = av7110->dev->pci->device;
+ }
+ input_dev->cdev.dev = &av7110->dev->pci->dev;
set_bit(EV_KEY, input_dev->evbit);
set_bit(EV_REP, input_dev->evbit);
input_register_keys();