]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Sep 2007 17:12:34 +0000 (10:12 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Sep 2007 17:12:34 +0000 (10:12 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  bug in AT91 MCI suspend routines

drivers/mmc/host/at91_mci.c

index bfebd2fa7ada9a50c9359fe463f68565e492adae..955ea60583b5f5c77438c0ea166d6be060f37dcd 100644 (file)
@@ -941,7 +941,7 @@ static int __exit at91_mci_remove(struct platform_device *pdev)
 
        host = mmc_priv(mmc);
 
-       if (host->present != -1) {
+       if (host->board->det_pin) {
                device_init_wakeup(&pdev->dev, 0);
                free_irq(host->board->det_pin, host);
                cancel_delayed_work(&host->mmc->detect);
@@ -972,7 +972,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state)
        struct at91mci_host *host = mmc_priv(mmc);
        int ret = 0;
 
-       if (device_may_wakeup(&pdev->dev))
+       if (host->board->det_pin && device_may_wakeup(&pdev->dev))
                enable_irq_wake(host->board->det_pin);
 
        if (mmc)
@@ -987,7 +987,7 @@ static int at91_mci_resume(struct platform_device *pdev)
        struct at91mci_host *host = mmc_priv(mmc);
        int ret = 0;
 
-       if (device_may_wakeup(&pdev->dev))
+       if (host->board->det_pin && device_may_wakeup(&pdev->dev))
                disable_irq_wake(host->board->det_pin);
 
        if (mmc)