diff options
author | Anti Sullin <anti.sullin@artecdesign.ee> | 2007-08-30 10:15:16 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-09-11 11:21:51 -0400 |
commit | e0cda54e4414e98f0bf72116d8522f4e434f6b4b (patch) | |
tree | e875e7dad2dacf9a009208a1202ba5d7435e2e2a /drivers | |
parent | b67ac3f339c76dfea3cc75fc0285b6d13edc35fa (diff) |
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 <anti.sullin@artecdesign.ee>
Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers')
-rw-r--r-- | 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 bfebd2fa7ada..955ea60583b5 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) | |||
941 | 941 | ||
942 | host = mmc_priv(mmc); | 942 | host = mmc_priv(mmc); |
943 | 943 | ||
944 | if (host->present != -1) { | 944 | if (host->board->det_pin) { |
945 | device_init_wakeup(&pdev->dev, 0); | 945 | device_init_wakeup(&pdev->dev, 0); |
946 | free_irq(host->board->det_pin, host); | 946 | free_irq(host->board->det_pin, host); |
947 | cancel_delayed_work(&host->mmc->detect); | 947 | cancel_delayed_work(&host->mmc->detect); |
@@ -972,7 +972,7 @@ static int at91_mci_suspend(struct platform_device *pdev, pm_message_t state) | |||
972 | struct at91mci_host *host = mmc_priv(mmc); | 972 | struct at91mci_host *host = mmc_priv(mmc); |
973 | int ret = 0; | 973 | int ret = 0; |
974 | 974 | ||
975 | if (device_may_wakeup(&pdev->dev)) | 975 | if (host->board->det_pin && device_may_wakeup(&pdev->dev)) |
976 | enable_irq_wake(host->board->det_pin); | 976 | enable_irq_wake(host->board->det_pin); |
977 | 977 | ||
978 | if (mmc) | 978 | if (mmc) |
@@ -987,7 +987,7 @@ static int at91_mci_resume(struct platform_device *pdev) | |||
987 | struct at91mci_host *host = mmc_priv(mmc); | 987 | struct at91mci_host *host = mmc_priv(mmc); |
988 | int ret = 0; | 988 | int ret = 0; |
989 | 989 | ||
990 | if (device_may_wakeup(&pdev->dev)) | 990 | if (host->board->det_pin && device_may_wakeup(&pdev->dev)) |
991 | disable_irq_wake(host->board->det_pin); | 991 | disable_irq_wake(host->board->det_pin); |
992 | 992 | ||
993 | if (mmc) | 993 | if (mmc) |