set_irq_wake: fix return code and wake status tracking
authorUwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Wed, 23 Jul 2008 12:42:25 +0000 (14:42 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Jul 2008 16:35:53 +0000 (09:35 -0700)
commit2db873211ba47ef704c301f9ecf4a33413a0b649
tree1d406d7b446da8e677f6014b4fd101456e485466
parent1bad879a078111748ebc27fb0d29e8c916556835
set_irq_wake: fix return code and wake status tracking

Since 15a647eba94c3da27ccc666bea72e7cca06b2d19 set_irq_wake returned -ENXIO
if another device had it already enabled.  Zero is the right value to
return in this case.  Moreover the change to desc->status was not reverted
if desc->chip->set_wake returned an error.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/irq/manage.c