Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0cda54e4414e98f0bf72116d8522f4e434f6b4b
Commit:     e0cda54e4414e98f0bf72116d8522f4e434f6b4b
Parent:     b67ac3f339c76dfea3cc75fc0285b6d13edc35fa
Author:     Anti Sullin <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 16:15:16 2007 +0200
Committer:  Pierre Ossman <[EMAIL PROTECTED]>
CommitDate: Tue Sep 11 17:21:51 2007 +0200

    bug in AT91 MCI suspend routines
    
    This patch fixes a bug in AT91 mmc host driver, that enables the wakeup
    from suspend on card detection pin even if the card detect pin is not
    available (==0). If not card detection pin is defined, IRQ0 == FIQ gets
    enabled and if some activity is present on that pin, the system gets a
    FIQ request, that causes a crash.
    
    Signed-off-by: Anti Sullin <[EMAIL PROTECTED]>
    Signed-off-by: Nicolas Ferre <[EMAIL PROTECTED]>
    Signed-off-by: Pierre Ossman <[EMAIL PROTECTED]>
---
 drivers/mmc/host/at91_mci.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index bfebd2f..955ea60 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -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)
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to