mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
b678b91f22
commit
4137e50494
2 changed files with 2 additions and 6 deletions
|
@ -71,6 +71,6 @@ SD/MMC/SDIO Clock Gating Attribute
|
||||||
Read and write access is provided to following attribute.
|
Read and write access is provided to following attribute.
|
||||||
This attribute appears only if CONFIG_MMC_CLKGATE is enabled.
|
This attribute appears only if CONFIG_MMC_CLKGATE is enabled.
|
||||||
|
|
||||||
clkgate_delay Tune the clock gating delay with desired value in milli seconds.
|
clkgate_delay Tune the clock gating delay with desired value in milliseconds.
|
||||||
|
|
||||||
echo <desired delay> > /sys/class/mmc_host/mmcX/clkgate_delay
|
echo <desired delay> > /sys/class/mmc_host/mmcX/clkgate_delay
|
||||||
|
|
|
@ -58,8 +58,7 @@ static ssize_t clkgate_delay_show(struct device *dev,
|
||||||
struct device_attribute *attr, char *buf)
|
struct device_attribute *attr, char *buf)
|
||||||
{
|
{
|
||||||
struct mmc_host *host = cls_dev_to_mmc_host(dev);
|
struct mmc_host *host = cls_dev_to_mmc_host(dev);
|
||||||
return snprintf(buf, PAGE_SIZE, "%lu millisecs\n",
|
return snprintf(buf, PAGE_SIZE, "%lu\n", host->clkgate_delay);
|
||||||
host->clkgate_delay);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t clkgate_delay_store(struct device *dev,
|
static ssize_t clkgate_delay_store(struct device *dev,
|
||||||
|
@ -74,9 +73,6 @@ static ssize_t clkgate_delay_store(struct device *dev,
|
||||||
spin_lock_irqsave(&host->clk_lock, flags);
|
spin_lock_irqsave(&host->clk_lock, flags);
|
||||||
host->clkgate_delay = value;
|
host->clkgate_delay = value;
|
||||||
spin_unlock_irqrestore(&host->clk_lock, flags);
|
spin_unlock_irqrestore(&host->clk_lock, flags);
|
||||||
|
|
||||||
pr_info("%s: clock gate delay set to %lu ms\n",
|
|
||||||
mmc_hostname(host), value);
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue