V4L/DVB: IR/mceusb: more streamlining of device init
authorJarod Wilson <jarod@redhat.com>
Thu, 8 Jul 2010 15:38:57 +0000 (12:38 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 19:42:43 +0000 (16:42 -0300)
commit22b0766b62d517a597d8155d828c5f93e3523cfa
tree142cf3481a52076fa182ef53ae51615a768b39fc
parentca17a4f0bfc48feb3b4eb3f671a82adfe89530fb
V4L/DVB: IR/mceusb: more streamlining of device init

Spent a while last night getting device initialization packet captures
under Windows for all generations of devices. There are a few places
where we were doing things differently, and few things we were doing
that we don't need to do, particularly on gen3 hardware, and I *think*
one of those things is what was locking up my pinnacle hw from time to
time -- at least, its been perfectly well behaved every time its been
plugged in since making this change.

First up, we're adding a bit more to the gen1 init routine here. Its
not absolutely necessary, the hardware works the same both with and
without it, but I'd like to be consistent w/Windows here.

Second, DEVICE_RESET is never called when initializing either of my
gen3 devices, its only called for gen1 and gen2. The bits in the gen3
init after removing that, are safe (and interesting) to run on all
hardware, so there's no more gen3-specific init done, there's instead
a generic mceusb_get_parameters() that is run for all hardware.

Third, the gen3 flag isn't needed. We only care if hardware is gen3
during probe, so I've dropped that from the device flags struct.

Successfully tested on all three generations of mceusb hardware.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/IR/mceusb.c