[media] imon: don't parse scancodes until intf configured
authorJarod Wilson <jarod@redhat.com>
Tue, 19 Jul 2011 15:12:47 +0000 (12:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 21 Sep 2011 17:48:15 +0000 (14:48 -0300)
commit6f6b90c9231ad6b18f7393e1b6c6cef9dc6aa77c
tree7cdedf6ca6d23a24681eaf54e6ab20c0682cac94
parent59152b1cf1182fd671dafa056cebeed95d0b1468
[media] imon: don't parse scancodes until intf configured

The imon devices have either 1 or 2 usb interfaces on them, each wired
up to its own urb callback. The interface 0 urb callback is wired up
before the imon context's rc_dev pointer is filled in, which is
necessary for imon 0xffdc device auto-detection to work properly, but we
need to make sure we don't actually run the callback routines until
we've entirely filled in the necessary bits for each given interface,
lest we wind up oopsing. Technically, any imon device could have hit
this, but the issue is exacerbated on the 0xffdc devices, which send a
constant stream of interrupts, even when they have no valid key data.

CC: Andy Walls <awalls@md.metrocast.net>
CC: Chris W <lkml@psychogeeks.com>
Reported-by: Chris W <lkml@psychogeeks.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/imon.c