diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-01-24 18:49:58 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-02-21 10:35:08 -0500 |
commit | 357a268d59411b84fde712400585dd118c61467f (patch) | |
tree | e8ec8b950bab37b19ff90da6d65f42c3834b6463 /drivers | |
parent | feaba7a96dd02f2fc0d1fe5c2148d79444db0717 (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')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_ir.c | 15 |
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 e4544ea2b89b..744d87e563cd 100644 --- a/drivers/media/dvb/ttpci/av7110_ir.c +++ b/drivers/media/dvb/ttpci/av7110_ir.c | |||
@@ -16,6 +16,7 @@ | |||
16 | static int av_cnt; | 16 | static int av_cnt; |
17 | static struct av7110 *av_list[4]; | 17 | static struct av7110 *av_list[4]; |
18 | static struct input_dev *input_dev; | 18 | static struct input_dev *input_dev; |
19 | static char input_phys[32]; | ||
19 | 20 | ||
20 | static u8 delay_timer_finished; | 21 | static u8 delay_timer_finished; |
21 | 22 | ||
@@ -231,8 +232,22 @@ int __devinit av7110_ir_init(struct av7110 *av7110) | |||
231 | if (!input_dev) | 232 | if (!input_dev) |
232 | return -ENOMEM; | 233 | return -ENOMEM; |
233 | 234 | ||
235 | snprintf(input_phys, sizeof(input_phys), | ||
236 | "pci-%s/ir0", pci_name(av7110->dev->pci)); | ||
237 | |||
234 | input_dev->name = "DVB on-card IR receiver"; | 238 | input_dev->name = "DVB on-card IR receiver"; |
235 | 239 | ||
240 | input_dev->phys = input_phys; | ||
241 | input_dev->id.bustype = BUS_PCI; | ||
242 | input_dev->id.version = 1; | ||
243 | if (av7110->dev->pci->subsystem_vendor) { | ||
244 | input_dev->id.vendor = av7110->dev->pci->subsystem_vendor; | ||
245 | input_dev->id.product = av7110->dev->pci->subsystem_device; | ||
246 | } else { | ||
247 | input_dev->id.vendor = av7110->dev->pci->vendor; | ||
248 | input_dev->id.product = av7110->dev->pci->device; | ||
249 | } | ||
250 | input_dev->cdev.dev = &av7110->dev->pci->dev; | ||
236 | set_bit(EV_KEY, input_dev->evbit); | 251 | set_bit(EV_KEY, input_dev->evbit); |
237 | set_bit(EV_REP, input_dev->evbit); | 252 | set_bit(EV_REP, input_dev->evbit); |
238 | input_register_keys(); | 253 | input_register_keys(); |