diff options
author | Jarod Wilson <jarod@redhat.com> | 2010-10-23 15:42:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-23 15:45:35 -0400 |
commit | 428cc7633dedbab05aab80b805d8585572dc6dbf (patch) | |
tree | 30e97783d7a97d1a1d7fcde9870b68b9e14176ad /drivers/media | |
parent | cdff10a18d005eac83524917e7789d57b20877ef (diff) |
[media] imon: fix my egregious brown paper bag w/rdev/idev split
Somehow, I managed to screw things up when reworking the rdev/idev split
patch from David, and started trying to get ir_input_dev from idev
instead of rdev, thus resulting in button presses hanging the system.
This fixes it.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/IR/imon.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 0391c3b86975..bcb282672efa 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c | |||
@@ -1477,7 +1477,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1477 | bool norelease = false; | 1477 | bool norelease = false; |
1478 | int i; | 1478 | int i; |
1479 | u64 scancode; | 1479 | u64 scancode; |
1480 | struct input_dev *idev = NULL; | 1480 | struct input_dev *rdev = NULL; |
1481 | struct ir_input_dev *irdev = NULL; | 1481 | struct ir_input_dev *irdev = NULL; |
1482 | int press_type = 0; | 1482 | int press_type = 0; |
1483 | int msec; | 1483 | int msec; |
@@ -1485,8 +1485,8 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1485 | static struct timeval prev_time = { 0, 0 }; | 1485 | static struct timeval prev_time = { 0, 0 }; |
1486 | u8 ktype; | 1486 | u8 ktype; |
1487 | 1487 | ||
1488 | idev = ictx->idev; | 1488 | rdev = ictx->rdev; |
1489 | irdev = input_get_drvdata(idev); | 1489 | irdev = input_get_drvdata(rdev); |
1490 | 1490 | ||
1491 | /* filter out junk data on the older 0xffdc imon devices */ | 1491 | /* filter out junk data on the older 0xffdc imon devices */ |
1492 | if ((buf[0] == 0xff) && (buf[1] == 0xff) && (buf[2] == 0xff)) | 1492 | if ((buf[0] == 0xff) && (buf[1] == 0xff) && (buf[2] == 0xff)) |
@@ -1570,8 +1570,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1570 | if (press_type == 0) | 1570 | if (press_type == 0) |
1571 | ir_keyup(irdev); | 1571 | ir_keyup(irdev); |
1572 | else { | 1572 | else { |
1573 | ir_keydown(ictx->rdev, ictx->rc_scancode, | 1573 | ir_keydown(rdev, ictx->rc_scancode, ictx->rc_toggle); |
1574 | ictx->rc_toggle); | ||
1575 | spin_lock_irqsave(&ictx->kc_lock, flags); | 1574 | spin_lock_irqsave(&ictx->kc_lock, flags); |
1576 | ictx->last_keycode = ictx->kc; | 1575 | ictx->last_keycode = ictx->kc; |
1577 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1576 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
@@ -1587,7 +1586,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1587 | do_gettimeofday(&t); | 1586 | do_gettimeofday(&t); |
1588 | msec = tv2int(&t, &prev_time); | 1587 | msec = tv2int(&t, &prev_time); |
1589 | prev_time = t; | 1588 | prev_time = t; |
1590 | if (msec < idev->rep[REP_DELAY]) { | 1589 | if (msec < ictx->idev->rep[REP_DELAY]) { |
1591 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1590 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
1592 | return; | 1591 | return; |
1593 | } | 1592 | } |
@@ -1596,12 +1595,12 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1596 | 1595 | ||
1597 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1596 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
1598 | 1597 | ||
1599 | input_report_key(idev, kc, press_type); | 1598 | input_report_key(ictx->idev, kc, press_type); |
1600 | input_sync(idev); | 1599 | input_sync(ictx->idev); |
1601 | 1600 | ||
1602 | /* panel keys don't generate a release */ | 1601 | /* panel keys don't generate a release */ |
1603 | input_report_key(idev, kc, 0); | 1602 | input_report_key(ictx->idev, kc, 0); |
1604 | input_sync(idev); | 1603 | input_sync(ictx->idev); |
1605 | 1604 | ||
1606 | ictx->last_keycode = kc; | 1605 | ictx->last_keycode = kc; |
1607 | 1606 | ||