Commit:     9af20376ee65cd2d13f7eb587fab70879d8c355b
Parent:     8387c1a46376b8cfc5f4751b27a6c90f930992cf
Author:     Marc Pignat <[EMAIL PROTECTED]>
AuthorDate: Thu May 31 00:40:44 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu May 31 07:58:13 2007 -0700

    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: Marc Pignat <[EMAIL PROTECTED]>
    Cc: David Brownell <[EMAIL PROTECTED]>
    Cc: Russell King <[EMAIL PROTECTED]>
    Cc: Pavel Machek <[EMAIL PROTECTED]>
    Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]>
    Cc: Andrew Victor <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 drivers/pcmcia/at91_cf.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 948efc7..eb6abd3 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -336,16 +336,21 @@ static int at91_cf_suspend(struct platform_device *pdev, 
pm_message_t mesg)
                if (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)
+       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);
+       }
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to