diff options
Diffstat (limited to 'drivers/media/dvb/dm1105/dm1105.c')
-rw-r--r-- | drivers/media/dvb/dm1105/dm1105.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c index 5d404f1bf03..d1a43858f29 100644 --- a/drivers/media/dvb/dm1105/dm1105.c +++ b/drivers/media/dvb/dm1105/dm1105.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/input.h> | ||
30 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
31 | #include <media/ir-core.h> | 30 | #include <media/ir-core.h> |
32 | 31 | ||
@@ -266,7 +265,7 @@ static void dm1105_card_list(struct pci_dev *pci) | |||
266 | 265 | ||
267 | /* infrared remote control */ | 266 | /* infrared remote control */ |
268 | struct infrared { | 267 | struct infrared { |
269 | struct input_dev *input_dev; | 268 | struct rc_dev *dev; |
270 | char input_phys[32]; | 269 | char input_phys[32]; |
271 | struct work_struct work; | 270 | struct work_struct work; |
272 | u32 ir_command; | 271 | u32 ir_command; |
@@ -532,7 +531,7 @@ static void dm1105_emit_key(struct work_struct *work) | |||
532 | 531 | ||
533 | data = (ircom >> 8) & 0x7f; | 532 | data = (ircom >> 8) & 0x7f; |
534 | 533 | ||
535 | ir_keydown(ir->input_dev, data, 0); | 534 | ir_keydown(ir->dev, data, 0); |
536 | } | 535 | } |
537 | 536 | ||
538 | /* work handler */ | 537 | /* work handler */ |
@@ -593,46 +592,47 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id) | |||
593 | 592 | ||
594 | int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | 593 | int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) |
595 | { | 594 | { |
596 | struct input_dev *input_dev; | 595 | struct rc_dev *dev; |
597 | char *ir_codes = RC_MAP_DM1105_NEC; | ||
598 | int err = -ENOMEM; | 596 | int err = -ENOMEM; |
599 | 597 | ||
600 | input_dev = input_allocate_device(); | 598 | dev = rc_allocate_device(); |
601 | if (!input_dev) | 599 | if (!dev) |
602 | return -ENOMEM; | 600 | return -ENOMEM; |
603 | 601 | ||
604 | dm1105->ir.input_dev = input_dev; | ||
605 | snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), | 602 | snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), |
606 | "pci-%s/ir0", pci_name(dm1105->pdev)); | 603 | "pci-%s/ir0", pci_name(dm1105->pdev)); |
607 | 604 | ||
608 | input_dev->name = "DVB on-card IR receiver"; | 605 | dev->driver_name = MODULE_NAME; |
609 | input_dev->phys = dm1105->ir.input_phys; | 606 | dev->map_name = RC_MAP_DM1105_NEC; |
610 | input_dev->id.bustype = BUS_PCI; | 607 | dev->driver_type = RC_DRIVER_SCANCODE; |
611 | input_dev->id.version = 1; | 608 | dev->input_name = "DVB on-card IR receiver"; |
609 | dev->input_phys = dm1105->ir.input_phys; | ||
610 | dev->input_id.bustype = BUS_PCI; | ||
611 | dev->input_id.version = 1; | ||
612 | if (dm1105->pdev->subsystem_vendor) { | 612 | if (dm1105->pdev->subsystem_vendor) { |
613 | input_dev->id.vendor = dm1105->pdev->subsystem_vendor; | 613 | dev->input_id.vendor = dm1105->pdev->subsystem_vendor; |
614 | input_dev->id.product = dm1105->pdev->subsystem_device; | 614 | dev->input_id.product = dm1105->pdev->subsystem_device; |
615 | } else { | 615 | } else { |
616 | input_dev->id.vendor = dm1105->pdev->vendor; | 616 | dev->input_id.vendor = dm1105->pdev->vendor; |
617 | input_dev->id.product = dm1105->pdev->device; | 617 | dev->input_id.product = dm1105->pdev->device; |
618 | } | 618 | } |
619 | 619 | dev->dev.parent = &dm1105->pdev->dev; | |
620 | input_dev->dev.parent = &dm1105->pdev->dev; | ||
621 | 620 | ||
622 | INIT_WORK(&dm1105->ir.work, dm1105_emit_key); | 621 | INIT_WORK(&dm1105->ir.work, dm1105_emit_key); |
623 | 622 | ||
624 | err = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME); | 623 | err = rc_register_device(dev); |
625 | if (err < 0) { | 624 | if (err < 0) { |
626 | input_free_device(input_dev); | 625 | rc_free_device(dev); |
627 | return err; | 626 | return err; |
628 | } | 627 | } |
629 | 628 | ||
629 | dm1105->ir.dev = dev; | ||
630 | return 0; | 630 | return 0; |
631 | } | 631 | } |
632 | 632 | ||
633 | void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) | 633 | void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) |
634 | { | 634 | { |
635 | ir_input_unregister(dm1105->ir.input_dev); | 635 | rc_unregister_device(dm1105->ir.dev); |
636 | } | 636 | } |
637 | 637 | ||
638 | static int __devinit dm1105_hw_init(struct dm1105_dev *dev) | 638 | static int __devinit dm1105_hw_init(struct dm1105_dev *dev) |