diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/mx_sdhci.c | 11 | ||||
-rw-r--r-- | drivers/net/smsc911x.c | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c index 22d18b0bf110..5a68a8e02fe2 100644 --- a/drivers/mmc/host/mx_sdhci.c +++ b/drivers/mmc/host/mx_sdhci.c @@ -37,6 +37,7 @@ #include <linux/mmc/card.h> #include <linux/clk.h> #include <linux/regulator/consumer.h> +#include <linux/irq.h> #include <asm/dma.h> #include <asm/io.h> @@ -1650,6 +1651,8 @@ static int sdhci_suspend(struct platform_device *pdev, pm_message_t state) { struct sdhci_chip *chip; int i, ret; + struct irq_desc *desc; + int irq; chip = dev_get_drvdata(&pdev->dev); if (!chip) @@ -1657,8 +1660,14 @@ static int sdhci_suspend(struct platform_device *pdev, pm_message_t state) DBG("Suspending...\n"); + irq = platform_get_irq(pdev, 1); if( device_may_wakeup( &pdev->dev ) ) - enable_irq_wake(platform_get_irq(pdev, 1)); + enable_irq_wake(irq); + else { + desc = irq_to_desc(irq); + if(desc->status & IRQ_WAKEUP) + disable_irq_wake(irq); + } for (i = 0; i < chip->num_slots; i++) { if (!chip->hosts[i]) diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 89c1f3d258e7..d4c82f5fa555 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -2349,6 +2349,7 @@ static int smsc911x_suspend(struct platform_device *pdev, pm_message_t state) { struct net_device *ndev; struct smsc911x_data *pdata; int retval; + struct irq_desc *desc; ndev = platform_get_drvdata(pdev); pdata = netdev_priv(ndev); @@ -2398,6 +2399,9 @@ static int smsc911x_suspend(struct platform_device *pdev, pm_message_t state) { enable_irq_wake(ndev->irq); } else { + desc = irq_to_desc(ndev->irq); + if(desc->status & IRQ_WAKEUP) + disable_irq_wake(ndev->irq); /* * Enter into the power mode D2 (the controller doesn't * support the mode D3) |