diff options
author | David Härdeman <david@hardeman.nu> | 2010-04-15 17:46:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:57:45 -0400 |
commit | 15100d891a53ffc717cec21d805f8c49db51fb65 (patch) | |
tree | 8546ecbe0915118b422c92b61920d6529a1149c0 /drivers/media/dvb/dm1105 | |
parent | 1f71baef3edd8ba27f38f92da457950e52d88b5f (diff) |
V4L/DVB: ir-core: remove ir-functions usage from dm1105
Convert drivers/media/dvb/dm1105/dm1105.c to not rely on
ir-functions.c.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dm1105')
-rw-r--r-- | drivers/media/dvb/dm1105/dm1105.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c index 9d389bdaca41..b762e561a6d5 100644 --- a/drivers/media/dvb/dm1105/dm1105.c +++ b/drivers/media/dvb/dm1105/dm1105.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <linux/input.h> | 29 | #include <linux/input.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <media/ir-common.h> | 31 | #include <media/ir-core.h> |
32 | 32 | ||
33 | #include "demux.h" | 33 | #include "demux.h" |
34 | #include "dmxdev.h" | 34 | #include "dmxdev.h" |
@@ -267,7 +267,6 @@ static void dm1105_card_list(struct pci_dev *pci) | |||
267 | /* infrared remote control */ | 267 | /* infrared remote control */ |
268 | struct infrared { | 268 | struct infrared { |
269 | struct input_dev *input_dev; | 269 | struct input_dev *input_dev; |
270 | struct ir_input_state ir; | ||
271 | char input_phys[32]; | 270 | char input_phys[32]; |
272 | struct work_struct work; | 271 | struct work_struct work; |
273 | u32 ir_command; | 272 | u32 ir_command; |
@@ -533,8 +532,7 @@ static void dm1105_emit_key(struct work_struct *work) | |||
533 | 532 | ||
534 | data = (ircom >> 8) & 0x7f; | 533 | data = (ircom >> 8) & 0x7f; |
535 | 534 | ||
536 | ir_input_keydown(ir->input_dev, &ir->ir, data); | 535 | ir_keydown(ir->input_dev, data, 0); |
537 | ir_input_nokey(ir->input_dev, &ir->ir); | ||
538 | } | 536 | } |
539 | 537 | ||
540 | /* work handler */ | 538 | /* work handler */ |
@@ -597,7 +595,6 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | |||
597 | { | 595 | { |
598 | struct input_dev *input_dev; | 596 | struct input_dev *input_dev; |
599 | char *ir_codes = NULL; | 597 | char *ir_codes = NULL; |
600 | u64 ir_type = IR_TYPE_OTHER; | ||
601 | int err = -ENOMEM; | 598 | int err = -ENOMEM; |
602 | 599 | ||
603 | input_dev = input_allocate_device(); | 600 | input_dev = input_allocate_device(); |
@@ -608,12 +605,6 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | |||
608 | snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), | 605 | snprintf(dm1105->ir.input_phys, sizeof(dm1105->ir.input_phys), |
609 | "pci-%s/ir0", pci_name(dm1105->pdev)); | 606 | "pci-%s/ir0", pci_name(dm1105->pdev)); |
610 | 607 | ||
611 | err = ir_input_init(input_dev, &dm1105->ir.ir, ir_type); | ||
612 | if (err < 0) { | ||
613 | input_free_device(input_dev); | ||
614 | return err; | ||
615 | } | ||
616 | |||
617 | input_dev->name = "DVB on-card IR receiver"; | 608 | input_dev->name = "DVB on-card IR receiver"; |
618 | input_dev->phys = dm1105->ir.input_phys; | 609 | input_dev->phys = dm1105->ir.input_phys; |
619 | input_dev->id.bustype = BUS_PCI; | 610 | input_dev->id.bustype = BUS_PCI; |
@@ -631,8 +622,12 @@ int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | |||
631 | INIT_WORK(&dm1105->ir.work, dm1105_emit_key); | 622 | INIT_WORK(&dm1105->ir.work, dm1105_emit_key); |
632 | 623 | ||
633 | err = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME); | 624 | err = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME); |
625 | if (err < 0) { | ||
626 | input_free_device(input_dev); | ||
627 | return err; | ||
628 | } | ||
634 | 629 | ||
635 | return err; | 630 | return 0; |
636 | } | 631 | } |
637 | 632 | ||
638 | void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) | 633 | void __devexit dm1105_ir_exit(struct dm1105_dev *dm1105) |