aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2011-12-05 13:28:44 -0500
committerChris Ball <cjb@laptop.org>2012-01-11 23:58:43 -0500
commit4137e50494cb3496fbb6ccd27aa7b6d7c9634c1e (patch)
treeeb824b1d6b716c156d2fa3f50232c6b32e06de13
parentb678b91f22debd5f8efa04895652989004761d06 (diff)
mmc: core: Fixup delayed work clock gating patch
c31b50e (mmc: core: Use delayed work in clock gating framework, 2011-11-14) missed a few things during review: o A useless pr_info() o milliseconds was written as two words o The sysfs file had units in its output Fix all three problems. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Sujit Reddy Thumma <sthumma@codeaurora.org> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--Documentation/mmc/mmc-dev-attrs.txt2
-rw-r--r--drivers/mmc/core/host.c6
2 files changed, 2 insertions, 6 deletions
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index b0245565875a..22ae8441489f 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -71,6 +71,6 @@ SD/MMC/SDIO Clock Gating Attribute
71Read and write access is provided to following attribute. 71Read and write access is provided to following attribute.
72This attribute appears only if CONFIG_MMC_CLKGATE is enabled. 72This attribute appears only if CONFIG_MMC_CLKGATE is enabled.
73 73
74 clkgate_delay Tune the clock gating delay with desired value in milli seconds. 74 clkgate_delay Tune the clock gating delay with desired value in milliseconds.
75 75
76echo <desired delay> > /sys/class/mmc_host/mmcX/clkgate_delay 76echo <desired delay> > /sys/class/mmc_host/mmcX/clkgate_delay
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 817a76039743..30055f2b0d44 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -58,8 +58,7 @@ static ssize_t clkgate_delay_show(struct device *dev,
58 struct device_attribute *attr, char *buf) 58 struct device_attribute *attr, char *buf)
59{ 59{
60 struct mmc_host *host = cls_dev_to_mmc_host(dev); 60 struct mmc_host *host = cls_dev_to_mmc_host(dev);
61 return snprintf(buf, PAGE_SIZE, "%lu millisecs\n", 61 return snprintf(buf, PAGE_SIZE, "%lu\n", host->clkgate_delay);
62 host->clkgate_delay);
63} 62}
64 63
65static ssize_t clkgate_delay_store(struct device *dev, 64static ssize_t clkgate_delay_store(struct device *dev,
@@ -74,9 +73,6 @@ static ssize_t clkgate_delay_store(struct device *dev,
74 spin_lock_irqsave(&host->clk_lock, flags); 73 spin_lock_irqsave(&host->clk_lock, flags);
75 host->clkgate_delay = value; 74 host->clkgate_delay = value;
76 spin_unlock_irqrestore(&host->clk_lock, flags); 75 spin_unlock_irqrestore(&host->clk_lock, flags);
77
78 pr_info("%s: clock gate delay set to %lu ms\n",
79 mmc_hostname(host), value);
80 return count; 76 return count;
81} 77}
82 78