summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb/m920x.c
diff options
context:
space:
mode:
authorAntonio Ospite <ospite@studenti.unina.it>2012-12-10 17:37:13 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-27 16:30:07 -0200
commit7a7ef4657e84b5038eace08a1db5b480854c893e (patch)
tree4135cbfe3102388794a0853edea6faf9438fc2b2 /drivers/media/usb/dvb-usb/m920x.c
parentf526e9e1dcb65c8967c61bbfa72933f4553958ee (diff)
downloadlinux-stable-7a7ef4657e84b5038eace08a1db5b480854c893e.tar.gz
linux-stable-7a7ef4657e84b5038eace08a1db5b480854c893e.tar.bz2
linux-stable-7a7ef4657e84b5038eace08a1db5b480854c893e.zip
[media] m920x: avoid repeating RC state parsing at each keycode
Parsing the RC press state is invariant wrt. the keycode, take it out of the keycode scanning loop. Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb/m920x.c')
-rw-r--r--drivers/media/usb/dvb-usb/m920x.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/usb/dvb-usb/m920x.c b/drivers/media/usb/dvb-usb/m920x.c
index 581c5deffb6e..5f6ca753e293 100644
--- a/drivers/media/usb/dvb-usb/m920x.c
+++ b/drivers/media/usb/dvb-usb/m920x.c
@@ -197,10 +197,11 @@ static int m920x_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
if ((ret = m920x_read(d->udev, M9206_CORE, 0x0, M9206_RC_KEY, rc_state + 1, 1)) != 0)
goto out;
+ m920x_parse_rc_state(d, rc_state[0], state);
+
for (i = 0; i < d->props.rc.legacy.rc_map_size; i++)
if (rc5_data(&d->props.rc.legacy.rc_map_table[i]) == rc_state[1]) {
*event = d->props.rc.legacy.rc_map_table[i].keycode;
- m920x_parse_rc_state(d, rc_state[0], state);
goto out;
}