at91: fix enable/disable_irq_wake symmetry in pcmcia driver
Subsystems (2)
PATCH 1/1 at91: fix enable/disable_irq_wake symmetry in pcmcia driver
from Marc Pignat <[email protected]>
fix enable_irq_wake and disable_irq_wake symmetry in at91 pcmcia driver
Signed-off-by Marc Pignat <[email protected]>
---
This patch applies to the 2.6.21.1 kernel.
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.
Regards
Marc
drivers/pcmcia/at91_cf.c renamed from drivers/pcmcia/at91_cf.c.orig +6 -4
@@ -336,16 +336,18 @@ static int at91_cf_suspend(struct platfoenable_irq_wake (board->det_pin);if (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 ; }static int at91_cf_resume (struct platform_device *pdev) { +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);return 0 ; }