]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: dw_mmc: silent verbose log when calling from PM context
authorShawn Lin <shawn.lin@rock-chips.com>
Tue, 17 Jan 2017 01:22:55 +0000 (09:22 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 13 Feb 2017 12:20:53 +0000 (13:20 +0100)
When deploying runtime PM, it's quite verbose to print the
log of ios setting. Also it's useless to print it from system
PM as it should be the same with booting time. We also have
sysfs to get all these information from ios attribute, so let's
skip this print from PM context.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c

index c04a5769e2ead5b436466f7a4aa4780ef98a010f..a9ac0b4573131f48cad46044e018b5de479cf695 100644 (file)
@@ -1182,11 +1182,13 @@ static void dw_mci_setup_bus(struct dw_mci_slot *slot, bool force_clkinit)
                if ((clock != slot->__clk_old &&
                        !test_bit(DW_MMC_CARD_NEEDS_POLL, &slot->flags)) ||
                        force_clkinit) {
-                       dev_info(&slot->mmc->class_dev,
-                                "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n",
-                                slot->id, host->bus_hz, clock,
-                                div ? ((host->bus_hz / div) >> 1) :
-                                host->bus_hz, div);
+                       /* Silent the verbose log if calling from PM context */
+                       if (!force_clkinit)
+                               dev_info(&slot->mmc->class_dev,
+                                        "Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d)\n",
+                                        slot->id, host->bus_hz, clock,
+                                        div ? ((host->bus_hz / div) >> 1) :
+                                        host->bus_hz, div);
 
                        /*
                         * If card is polling, display the message only