Commit a715dfc7 authored by Pierre Ossman's avatar Pierre Ossman

sdhci: release irq during suspend

Release the device's irq during sleep, as all well-behaved drivers
should.
Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
parent 62df67a5
...@@ -1079,6 +1079,13 @@ static int sdhci_suspend (struct pci_dev *pdev, pm_message_t state) ...@@ -1079,6 +1079,13 @@ static int sdhci_suspend (struct pci_dev *pdev, pm_message_t state)
pci_save_state(pdev); pci_save_state(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
for (i = 0;i < chip->num_slots;i++) {
if (!chip->hosts[i])
continue;
free_irq(chip->hosts[i]->irq, chip->hosts[i]);
}
pci_disable_device(pdev); pci_disable_device(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state)); pci_set_power_state(pdev, pci_choose_state(pdev, state));
...@@ -1107,6 +1114,11 @@ static int sdhci_resume (struct pci_dev *pdev) ...@@ -1107,6 +1114,11 @@ static int sdhci_resume (struct pci_dev *pdev)
continue; continue;
if (chip->hosts[i]->flags & SDHCI_USE_DMA) if (chip->hosts[i]->flags & SDHCI_USE_DMA)
pci_set_master(pdev); pci_set_master(pdev);
ret = request_irq(chip->hosts[i]->irq, sdhci_irq,
IRQF_SHARED, chip->hosts[i]->slot_descr,
chip->hosts[i]);
if (ret)
return ret;
sdhci_init(chip->hosts[i]); sdhci_init(chip->hosts[i]);
mmiowb(); mmiowb();
ret = mmc_resume_host(chip->hosts[i]->mmc); ret = mmc_resume_host(chip->hosts[i]->mmc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment