lirc_zilog: fix spinning rx thread
commitbc3ab9505120e944244508c60786616f904e246a
authorJarod Wilson <jarod@redhat.com>
Wed, 8 Jun 2011 21:56:56 +0000 (8 18:56 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 9 Jul 2011 06:15:16 +0000 (8 23:15 -0700)
tree916f11db092860879e29eec3e125c9ac6c17f3b7
parent1601e4bd145b1309894cfe42c2de5795a01db4d8
lirc_zilog: fix spinning rx thread

commit 6a8c97ac92461ec57e36b10572e78d4221e8faa8 upstream.

We were calling schedule_timeout with the rx thread's task state still
at TASK_RUNNING, which it shouldn't be. Make sure we call
set_current_state(TASK_INTERRUPTIBLE) *before* schedule_timeout, and
we're all good here. I believe this problem was mistakenly introduced in
commit 5bd6b0464b68d429bc8a3fe6595d19c39dfc4d95, and I'm not sure how I
missed it before, as I swear I tested the patchset that was included in,
but alas, stuff happens...

Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/lirc/lirc_zilog.c