Commit 6aef2eec authored by Ulf Hansson's avatar Ulf Hansson

mmc: tmio: Remove redundant runtime PM calls

Commit 9250aea7 ("mmc: core: Enable runtime PM management of host
devices"), made some calls to the runtime PM API from the driver
redundant. Especially those which deals with runtime PM reference
counting, so let's remove them.

Cc: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent c8037e79
...@@ -271,9 +271,6 @@ static void tmio_mmc_reset_work(struct work_struct *work) ...@@ -271,9 +271,6 @@ static void tmio_mmc_reset_work(struct work_struct *work)
tmio_mmc_abort_dma(host); tmio_mmc_abort_dma(host);
mmc_request_done(host->mmc, mrq); mmc_request_done(host->mmc, mrq);
pm_runtime_mark_last_busy(mmc_dev(host->mmc));
pm_runtime_put_autosuspend(mmc_dev(host->mmc));
} }
/* called with host->lock held, interrupts disabled */ /* called with host->lock held, interrupts disabled */
...@@ -303,9 +300,6 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host) ...@@ -303,9 +300,6 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
tmio_mmc_abort_dma(host); tmio_mmc_abort_dma(host);
mmc_request_done(host->mmc, mrq); mmc_request_done(host->mmc, mrq);
pm_runtime_mark_last_busy(mmc_dev(host->mmc));
pm_runtime_put_autosuspend(mmc_dev(host->mmc));
} }
static void tmio_mmc_done_work(struct work_struct *work) static void tmio_mmc_done_work(struct work_struct *work)
...@@ -819,8 +813,6 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) ...@@ -819,8 +813,6 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
spin_unlock_irqrestore(&host->lock, flags); spin_unlock_irqrestore(&host->lock, flags);
pm_runtime_get_sync(mmc_dev(mmc));
if (mrq->data) { if (mrq->data) {
ret = tmio_mmc_start_data(host, mrq->data); ret = tmio_mmc_start_data(host, mrq->data);
if (ret) if (ret)
...@@ -839,9 +831,6 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) ...@@ -839,9 +831,6 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
host->mrq = NULL; host->mrq = NULL;
mrq->cmd->error = ret; mrq->cmd->error = ret;
mmc_request_done(mmc, mrq); mmc_request_done(mmc, mrq);
pm_runtime_mark_last_busy(mmc_dev(mmc));
pm_runtime_put_autosuspend(mmc_dev(mmc));
} }
static int tmio_mmc_clk_enable(struct tmio_mmc_host *host) static int tmio_mmc_clk_enable(struct tmio_mmc_host *host)
...@@ -925,8 +914,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -925,8 +914,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
struct device *dev = &host->pdev->dev; struct device *dev = &host->pdev->dev;
unsigned long flags; unsigned long flags;
pm_runtime_get_sync(mmc_dev(mmc));
mutex_lock(&host->ios_lock); mutex_lock(&host->ios_lock);
spin_lock_irqsave(&host->lock, flags); spin_lock_irqsave(&host->lock, flags);
...@@ -981,9 +968,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -981,9 +968,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
host->clk_cache = ios->clock; host->clk_cache = ios->clock;
mutex_unlock(&host->ios_lock); mutex_unlock(&host->ios_lock);
pm_runtime_mark_last_busy(mmc_dev(mmc));
pm_runtime_put_autosuspend(mmc_dev(mmc));
} }
static int tmio_mmc_get_ro(struct mmc_host *mmc) static int tmio_mmc_get_ro(struct mmc_host *mmc)
...@@ -994,11 +978,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) ...@@ -994,11 +978,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
if (ret >= 0) if (ret >= 0)
return ret; return ret;
pm_runtime_get_sync(mmc_dev(mmc));
ret = !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || ret = !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
pm_runtime_mark_last_busy(mmc_dev(mmc));
pm_runtime_put_autosuspend(mmc_dev(mmc));
return ret; return ret;
} }
......
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