summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-02-09 22:57:16 +0100
committerChris Ball <cjb@laptop.org>2012-03-27 12:20:18 -0400
commit4932bd64a2bb4e80b79efb20c4736ac3b30ba7fe (patch)
treeeaf041e32a0bc13612186bfe304d75b55e6b969d /drivers/mmc
parent996bc8aebd2cd5b6d4c5d85085f171fa2447f364 (diff)
downloadop-kernel-dev-4932bd64a2bb4e80b79efb20c4736ac3b30ba7fe.zip
op-kernel-dev-4932bd64a2bb4e80b79efb20c4736ac3b30ba7fe.tar.gz
mmc: tmio: cosmetic: prettify the tmio_mmc_set_ios() function
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 950824a..9a7996a 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -760,6 +760,7 @@ fail:
static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{
struct tmio_mmc_host *host = mmc_priv(mmc);
+ struct device *dev = &host->pdev->dev;
unsigned long flags;
mutex_lock(&host->ios_lock);
@@ -767,13 +768,13 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
spin_lock_irqsave(&host->lock, flags);
if (host->mrq) {
if (IS_ERR(host->mrq)) {
- dev_dbg(&host->pdev->dev,
+ dev_dbg(dev,
"%s.%d: concurrent .set_ios(), clk %u, mode %u\n",
current->comm, task_pid_nr(current),
ios->clock, ios->power_mode);
host->mrq = ERR_PTR(-EINTR);
} else {
- dev_dbg(&host->pdev->dev,
+ dev_dbg(dev,
"%s.%d: CMD%u active since %lu, now %lu!\n",
current->comm, task_pid_nr(current),
host->mrq->cmd->opcode, host->last_req_ts, jiffies);
@@ -796,7 +797,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
*/
if (ios->power_mode == MMC_POWER_ON && ios->clock) {
if (!host->power) {
- pm_runtime_get_sync(&host->pdev->dev);
+ pm_runtime_get_sync(dev);
host->power = true;
}
tmio_mmc_set_clock(host, ios->clock);
@@ -810,7 +811,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
host->set_pwr(host->pdev, 0);
if (host->power) {
host->power = false;
- pm_runtime_put(&host->pdev->dev);
+ pm_runtime_put(dev);
}
tmio_mmc_clk_stop(host);
}
OpenPOWER on IntegriCloud