]> git.baikalelectronics.ru Git - kernel.git/commit
[media] mceusb: mce_sync_in is brain-dead
authorJarod Wilson <jarod@redhat.com>
Thu, 26 May 2011 17:23:18 +0000 (14:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 11 Jun 2011 12:02:07 +0000 (09:02 -0300)
commit8f5da9cca42a9997d88a3dcdb9b2593d2ff7a5e4
tree614c95836ee77cf58b1b24b46d55889774461468
parent13668fde026bb90d4be703305f310145aa9e7487
[media] mceusb: mce_sync_in is brain-dead

Aside from the initial "hey, lets make sure we've flushed any
pre-existing data on the device" call to mce_sync_in, every other one of
the calls was entirely superfluous. Ergo, remove them all, and rename
the one and only (questionably) useful one to reflect what it really
does. Verified on both gen2 and gen3 hardware to make zero difference.
Well, except that you no longer get a bunch of urb submit failures from
the unneeded mce_sync_in calls. Oh. And move that flush to a point
*after* we've wired up the inbound urb, or it won't do squat. I have
half a mind to just remove it entirely, but someone thought it was
necessary at some point, and it doesn't seem to hurt, so lets leave it
for the time being.

This excercise took place due to insightful questions asked by Hans
Petter Selasky, about the possible reuse of the inbound urb before it
was actually availble by mce_sync_in, so thanks to him for motivating
this cleanup.

Reported-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/mceusb.c