From: Jarod Wilson <jarod@redhat.com>
To: linux-media@vger.kernel.org
Subject: [PATCH 1/3] imon: fix my egregious brown paper bag w/rdev/idev split
Date: Sat, 23 Oct 2010 15:42:20 -0400 [thread overview]
Message-ID: <20101023194220.GC4825@redhat.com> (raw)
In-Reply-To: <20101023194107.GB4825@redhat.com>
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>
---
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 0391c3b..bcb2826 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,
bool norelease = false;
int i;
u64 scancode;
- struct input_dev *idev = NULL;
+ struct input_dev *rdev = NULL;
struct ir_input_dev *irdev = NULL;
int press_type = 0;
int msec;
@@ -1485,8 +1485,8 @@ static void imon_incoming_packet(struct imon_context *ictx,
static struct timeval prev_time = { 0, 0 };
u8 ktype;
- idev = ictx->idev;
- irdev = input_get_drvdata(idev);
+ rdev = ictx->rdev;
+ irdev = input_get_drvdata(rdev);
/* filter out junk data on the older 0xffdc imon devices */
if ((buf[0] == 0xff) && (buf[1] == 0xff) && (buf[2] == 0xff))
@@ -1570,8 +1570,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
if (press_type == 0)
ir_keyup(irdev);
else {
- ir_keydown(ictx->rdev, ictx->rc_scancode,
- ictx->rc_toggle);
+ ir_keydown(rdev, ictx->rc_scancode, ictx->rc_toggle);
spin_lock_irqsave(&ictx->kc_lock, flags);
ictx->last_keycode = ictx->kc;
spin_unlock_irqrestore(&ictx->kc_lock, flags);
@@ -1587,7 +1586,7 @@ static void imon_incoming_packet(struct imon_context *ictx,
do_gettimeofday(&t);
msec = tv2int(&t, &prev_time);
prev_time = t;
- if (msec < idev->rep[REP_DELAY]) {
+ if (msec < ictx->idev->rep[REP_DELAY]) {
spin_unlock_irqrestore(&ictx->kc_lock, flags);
return;
}
@@ -1596,12 +1595,12 @@ static void imon_incoming_packet(struct imon_context *ictx,
spin_unlock_irqrestore(&ictx->kc_lock, flags);
- input_report_key(idev, kc, press_type);
- input_sync(idev);
+ input_report_key(ictx->idev, kc, press_type);
+ input_sync(ictx->idev);
/* panel keys don't generate a release */
- input_report_key(idev, kc, 0);
- input_sync(idev);
+ input_report_key(ictx->idev, kc, 0);
+ input_sync(ictx->idev);
ictx->last_keycode = kc;
--
1.7.2.3
--
Jarod Wilson
jarod@redhat.com
next prev parent reply other threads:[~2010-10-23 19:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 19:41 [PATCH 0/3] imon IR driver fixups Jarod Wilson
2010-10-23 19:42 ` Jarod Wilson [this message]
2010-10-23 19:42 ` [PATCH 2/3] imon: remove redundant change_protocol call Jarod Wilson
2010-10-23 19:43 ` [PATCH 3/3] imon: fix nomouse modprobe option Jarod Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101023194220.GC4825@redhat.com \
--to=jarod@redhat.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.