Commit 9af20376 authored by Marc Pignat's avatar Marc Pignat Committed by Linus Torvalds

at91: fix enable/disable_irq_wake symmetry in pcmcia driver

Fix enable_irq_wake and disable_irq_wake symmetry in at91 pcmcia driver

disable_irq_wake call must be symmetric with enable_irq_wake.  This patch
fix that problem for the at91_pcmia driver.  It seems that this patch was
forgotten when we've fixed irq_wake symmetry in all at91 related drivers.
It was discussed in the "at91 drivers and [enable/disable]_irq_wake
(wrong?) usage" thread on the linux-arm-kernel mailing list.
Signed-off-by: default avatarMarc Pignat <marc.pignat@hevs.ch>
Cc: David Brownell <david-b@pacbell.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8387c1a4
...@@ -336,16 +336,21 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) ...@@ -336,16 +336,21 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg)
enable_irq_wake(board->det_pin); enable_irq_wake(board->det_pin);
if (board->irq_pin) if (board->irq_pin)
enable_irq_wake(board->irq_pin); enable_irq_wake(board->irq_pin);
} else {
disable_irq_wake(board->det_pin);
if (board->irq_pin)
disable_irq_wake(board->irq_pin);
} }
return 0; return 0;
} }
static int at91_cf_resume(struct platform_device *pdev) static int at91_cf_resume(struct platform_device *pdev)
{ {
struct at91_cf_socket *cf = platform_get_drvdata(pdev);
struct at91_cf_data *board = cf->board;
if (device_may_wakeup(&pdev->dev)) {
disable_irq_wake(board->det_pin);
if (board->irq_pin)
disable_irq_wake(board->irq_pin);
}
pcmcia_socket_dev_resume(&pdev->dev); pcmcia_socket_dev_resume(&pdev->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment