diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2008-02-05 01:30:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 12:44:23 -0500 |
commit | 3506e0c49a5ceba72c0405d1a470184c2d6705f7 (patch) | |
tree | 960333db4879feb5a0615d96687909a186a83ff3 /drivers/net/wireless/b43/leds.c | |
parent | fa23f5cce8cda2095013afc837ccf74b352f9f7b (diff) |
b43: avoid unregistering device objects during suspend
Modify the b43 driver to avoid deadlocking suspend and resume, which happens
as a result of attempting to unregister device objects locked by the PM core
during suspend/resume cycles. Also, make it use a suspend-safe method of
unregistering device object in the resume error path.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Michael Buesch <mb@bu3sch.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/wireless/b43/leds.c')
-rw-r--r-- | drivers/net/wireless/b43/leds.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c index 4b590d8c65ff..0908335892db 100644 --- a/drivers/net/wireless/b43/leds.c +++ b/drivers/net/wireless/b43/leds.c | |||
@@ -116,7 +116,10 @@ static void b43_unregister_led(struct b43_led *led) | |||
116 | { | 116 | { |
117 | if (!led->dev) | 117 | if (!led->dev) |
118 | return; | 118 | return; |
119 | led_classdev_unregister(&led->led_dev); | 119 | if (led->dev->suspend_in_progress) |
120 | led_classdev_unregister_suspended(&led->led_dev); | ||
121 | else | ||
122 | led_classdev_unregister(&led->led_dev); | ||
120 | b43_led_turn_off(led->dev, led->index, led->activelow); | 123 | b43_led_turn_off(led->dev, led->index, led->activelow); |
121 | led->dev = NULL; | 124 | led->dev = NULL; |
122 | } | 125 | } |