diff options
author | Igor M. Liplianin <liplianin@me.by> | 2010-05-26 22:31:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 00:24:20 -0400 |
commit | 84b14f181a36eea6591779156ef356f8d198bbfd (patch) | |
tree | 00236d1d995705056c916029d2f9c23f3ed2b05c /drivers/media | |
parent | 033608c1f33bcacba8d3a960240a7b2900b1d5ff (diff) |
V4L/DVB: Bug fix: make IR work again for dm1105
It makes IR to work again for dm1105 and, possibly, others.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/IR/ir-keytable.c | 17 | ||||
-rw-r--r-- | drivers/media/IR/ir-sysfs.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/dm1105/dm1105.c | 2 |
3 files changed, 15 insertions, 11 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 9374a006f43..94a8577e72e 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c | |||
@@ -490,11 +490,12 @@ int __ir_input_register(struct input_dev *input_dev, | |||
490 | if (rc < 0) | 490 | if (rc < 0) |
491 | goto out_table; | 491 | goto out_table; |
492 | 492 | ||
493 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) { | 493 | if (ir_dev->props) |
494 | rc = ir_raw_event_register(input_dev); | 494 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) { |
495 | if (rc < 0) | 495 | rc = ir_raw_event_register(input_dev); |
496 | goto out_event; | 496 | if (rc < 0) |
497 | } | 497 | goto out_event; |
498 | } | ||
498 | 499 | ||
499 | IR_dprintk(1, "Registered input device on %s for %s remote.\n", | 500 | IR_dprintk(1, "Registered input device on %s for %s remote.\n", |
500 | driver_name, rc_tab->name); | 501 | driver_name, rc_tab->name); |
@@ -530,8 +531,10 @@ void ir_input_unregister(struct input_dev *input_dev) | |||
530 | IR_dprintk(1, "Freed keycode table\n"); | 531 | IR_dprintk(1, "Freed keycode table\n"); |
531 | 532 | ||
532 | del_timer_sync(&ir_dev->timer_keyup); | 533 | del_timer_sync(&ir_dev->timer_keyup); |
533 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) | 534 | if (ir_dev->props) |
534 | ir_raw_event_unregister(input_dev); | 535 | if (ir_dev->props->driver_type == RC_DRIVER_IR_RAW) |
536 | ir_raw_event_unregister(input_dev); | ||
537 | |||
535 | rc_tab = &ir_dev->rc_tab; | 538 | rc_tab = &ir_dev->rc_tab; |
536 | rc_tab->size = 0; | 539 | rc_tab->size = 0; |
537 | kfree(rc_tab->scan); | 540 | kfree(rc_tab->scan); |
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index d7da63e16c9..2098dd1488e 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c | |||
@@ -221,9 +221,10 @@ int ir_register_class(struct input_dev *input_dev) | |||
221 | if (unlikely(devno < 0)) | 221 | if (unlikely(devno < 0)) |
222 | return devno; | 222 | return devno; |
223 | 223 | ||
224 | if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) | 224 | if (ir_dev->props) { |
225 | ir_dev->dev.type = &rc_dev_type; | 225 | if (ir_dev->props->driver_type == RC_DRIVER_SCANCODE) |
226 | else | 226 | ir_dev->dev.type = &rc_dev_type; |
227 | } else | ||
227 | ir_dev->dev.type = &ir_raw_dev_type; | 228 | ir_dev->dev.type = &ir_raw_dev_type; |
228 | 229 | ||
229 | ir_dev->dev.class = &ir_input_class; | 230 | ir_dev->dev.class = &ir_input_class; |
diff --git a/drivers/media/dvb/dm1105/dm1105.c b/drivers/media/dvb/dm1105/dm1105.c index b762e561a6d..bca07c0bcd0 100644 --- a/drivers/media/dvb/dm1105/dm1105.c +++ b/drivers/media/dvb/dm1105/dm1105.c | |||
@@ -594,7 +594,7 @@ static irqreturn_t dm1105_irq(int irq, void *dev_id) | |||
594 | int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) | 594 | int __devinit dm1105_ir_init(struct dm1105_dev *dm1105) |
595 | { | 595 | { |
596 | struct input_dev *input_dev; | 596 | struct input_dev *input_dev; |
597 | char *ir_codes = NULL; | 597 | char *ir_codes = RC_MAP_DM1105_NEC; |
598 | int err = -ENOMEM; | 598 | int err = -ENOMEM; |
599 | 599 | ||
600 | input_dev = input_allocate_device(); | 600 | input_dev = input_allocate_device(); |