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>
This commit is contained in:
committed by
Linus Torvalds
parent
fa23f5cce8
commit
3506e0c49a
@@ -116,7 +116,10 @@ static void b43_unregister_led(struct b43_led *led)
|
||||
{
|
||||
if (!led->dev)
|
||||
return;
|
||||
led_classdev_unregister(&led->led_dev);
|
||||
if (led->dev->suspend_in_progress)
|
||||
led_classdev_unregister_suspended(&led->led_dev);
|
||||
else
|
||||
led_classdev_unregister(&led->led_dev);
|
||||
b43_led_turn_off(led->dev, led->index, led->activelow);
|
||||
led->dev = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user