aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc_pio.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-02-09 16:57:16 -0500
committerChris Ball <cjb@laptop.org>2012-03-27 12:20:18 -0400
commit4932bd64a2bb4e80b79efb20c4736ac3b30ba7fe (patch)
treeeaf041e32a0bc13612186bfe304d75b55e6b969d /drivers/mmc/host/tmio_mmc_pio.c
parent996bc8aebd2cd5b6d4c5d85085f171fa2447f364 (diff)
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/host/tmio_mmc_pio.c')
-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 950824a00717..9a7996ade58e 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -760,6 +760,7 @@ fail:
760static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) 760static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
761{ 761{
762 struct tmio_mmc_host *host = mmc_priv(mmc); 762 struct tmio_mmc_host *host = mmc_priv(mmc);
763 struct device *dev = &host->pdev->dev;
763 unsigned long flags; 764 unsigned long flags;
764 765
765 mutex_lock(&host->ios_lock); 766 mutex_lock(&host->ios_lock);
@@ -767,13 +768,13 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
767 spin_lock_irqsave(&host->lock, flags); 768 spin_lock_irqsave(&host->lock, flags);
768 if (host->mrq) { 769 if (host->mrq) {
769 if (IS_ERR(host->mrq)) { 770 if (IS_ERR(host->mrq)) {
770 dev_dbg(&host->pdev->dev, 771 dev_dbg(dev,
771 "%s.%d: concurrent .set_ios(), clk %u, mode %u\n", 772 "%s.%d: concurrent .set_ios(), clk %u, mode %u\n",
772 current->comm, task_pid_nr(current), 773 current->comm, task_pid_nr(current),
773 ios->clock, ios->power_mode); 774 ios->clock, ios->power_mode);
774 host->mrq = ERR_PTR(-EINTR); 775 host->mrq = ERR_PTR(-EINTR);
775 } else { 776 } else {
776 dev_dbg(&host->pdev->dev, 777 dev_dbg(dev,
777 "%s.%d: CMD%u active since %lu, now %lu!\n", 778 "%s.%d: CMD%u active since %lu, now %lu!\n",
778 current->comm, task_pid_nr(current), 779 current->comm, task_pid_nr(current),
779 host->mrq->cmd->opcode, host->last_req_ts, jiffies); 780 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)
796 */ 797 */
797 if (ios->power_mode == MMC_POWER_ON && ios->clock) { 798 if (ios->power_mode == MMC_POWER_ON && ios->clock) {
798 if (!host->power) { 799 if (!host->power) {
799 pm_runtime_get_sync(&host->pdev->dev); 800 pm_runtime_get_sync(dev);
800 host->power = true; 801 host->power = true;
801 } 802 }
802 tmio_mmc_set_clock(host, ios->clock); 803 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)
810 host->set_pwr(host->pdev, 0); 811 host->set_pwr(host->pdev, 0);
811 if (host->power) { 812 if (host->power) {
812 host->power = false; 813 host->power = false;
813 pm_runtime_put(&host->pdev->dev); 814 pm_runtime_put(dev);
814 } 815 }
815 tmio_mmc_clk_stop(host); 816 tmio_mmc_clk_stop(host);
816 } 817 }