Skip to content

Commit

Permalink
mmc: sdhci-pxav3: fix device wakeup initialization
Browse files Browse the repository at this point in the history
MMC_PM_KEEP_POWER doesn't imply MMC_PM_WAKE_SDIO_IRQ, we should only
enable device wake up when MMC_PM_WAKE_SDIO_IRQ is set. And "pm_flags"
is the requested pm features, we should not set it in the host driver.

At the same time, device wakeup is disabled by default, so there's no
need to disable device wakeup explicitly.

This patch fixes the warning as following:

[   64.616651] ------------[ cut here ]------------
[   64.616665] WARNING: CPU: 0 PID: 79 at linux/kernel/irq/manage.c:603 irq_set_irq_wake+0xf0/0x11c()
[   64.616667] Unbalanced IRQ 87 wake disable

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Jisheng Zhang authored and Ulf Hansson committed Jun 4, 2015
1 parent 1ef48e3 commit 83dc9fe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/mmc/host/sdhci-pxav3.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,8 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, host);

if (host->mmc->pm_caps & MMC_PM_KEEP_POWER) {
if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
device_init_wakeup(&pdev->dev, 1);
host->mmc->pm_flags |= MMC_PM_WAKE_SDIO_IRQ;
} else {
device_init_wakeup(&pdev->dev, 0);
}

pm_runtime_put_autosuspend(&pdev->dev);

Expand Down

0 comments on commit 83dc9fe

Please sign in to comment.