diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-02-09 22:57:13 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-03-27 18:20:16 +0200 |
commit | c391e1b9ebfe31514fa95a0cdd30c2cbc9652c89 (patch) | |
tree | a126e9621172ead9bede04f2413fa79ffd3871d2 /drivers/mmc/host/tmio_mmc_pio.c | |
parent | mmc: sh_mobile_sdhi: pass card hotplug GPIO number to TMIO MMC (diff) | |
download | linux-c391e1b9ebfe31514fa95a0cdd30c2cbc9652c89.tar.xz linux-c391e1b9ebfe31514fa95a0cdd30c2cbc9652c89.zip |
mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data
The controller power status flag does not have to be accessed from the
hot-plug detection code any more, it can now be removed from the platform
data and put in the controller private struct.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_pio.c')
-rw-r--r-- | drivers/mmc/host/tmio_mmc_pio.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 42970ab6e803..9f22681a37bd 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -762,7 +762,6 @@ fail: static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct tmio_mmc_host *host = mmc_priv(mmc); - struct tmio_mmc_data *pdata = host->pdata; unsigned long flags; mutex_lock(&host->ios_lock); @@ -792,15 +791,15 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) spin_unlock_irqrestore(&host->lock, flags); /* - * pdata->power toggles between false and true in both cases - either + * host->power toggles between false and true in both cases - either * or not the controller can be runtime-suspended during inactivity. * But if the controller has to be kept on, the runtime-pm usage_count * is kept positive, so no suspending actually takes place. */ if (ios->power_mode == MMC_POWER_ON && ios->clock) { - if (!pdata->power) { + if (!host->power) { pm_runtime_get_sync(&host->pdev->dev); - pdata->power = true; + host->power = true; } tmio_mmc_set_clock(host, ios->clock); /* power up SD bus */ @@ -811,8 +810,8 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) } else if (ios->power_mode != MMC_POWER_UP) { if (host->set_pwr && ios->power_mode == MMC_POWER_OFF) host->set_pwr(host->pdev, 0); - if (pdata->power) { - pdata->power = false; + if (host->power) { + host->power = false; pm_runtime_put(&host->pdev->dev); } tmio_mmc_clk_stop(host); @@ -923,7 +922,7 @@ int __devinit tmio_mmc_host_probe(struct tmio_mmc_host **host, mmc->caps & MMC_CAP_NEEDS_POLL || mmc->caps & MMC_CAP_NONREMOVABLE); - pdata->power = false; + _host->power = false; pm_runtime_enable(&pdev->dev); ret = pm_runtime_resume(&pdev->dev); if (ret < 0) |