Commit 2ad0b249 authored by Jingoo Han's avatar Jingoo Han Committed by Chris Ball

mmc: sdhci-s3c: fix checkpatch error and warnings

This patch fixes the checkpatch error and warnings listed below:

ERROR: return is not a function, parentheses are not required
WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
WARNING: quoted string split across lines
WARNING: line over 80 characters
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Acked-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 3339d1e3
...@@ -166,7 +166,7 @@ static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost, ...@@ -166,7 +166,7 @@ static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost,
dev_dbg(&ourhost->pdev->dev, "clk %d: rate %ld, want %d, got %ld\n", dev_dbg(&ourhost->pdev->dev, "clk %d: rate %ld, want %d, got %ld\n",
src, rate, wanted, rate / div); src, rate, wanted, rate / div);
return (wanted - (rate / div)); return wanted - (rate / div);
} }
/** /**
...@@ -288,6 +288,7 @@ static unsigned int sdhci_cmu_get_min_clock(struct sdhci_host *host) ...@@ -288,6 +288,7 @@ static unsigned int sdhci_cmu_get_min_clock(struct sdhci_host *host)
static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock) static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
{ {
struct sdhci_s3c *ourhost = to_s3c(host); struct sdhci_s3c *ourhost = to_s3c(host);
struct device *dev = &ourhost->pdev->dev;
unsigned long timeout; unsigned long timeout;
u16 clk = 0; u16 clk = 0;
...@@ -309,8 +310,8 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock) ...@@ -309,8 +310,8 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL))
& SDHCI_CLOCK_INT_STABLE)) { & SDHCI_CLOCK_INT_STABLE)) {
if (timeout == 0) { if (timeout == 0) {
printk(KERN_ERR "%s: Internal clock never " dev_err(dev, "%s: Internal clock never stabilised.\n",
"stabilised.\n", mmc_hostname(host->mmc)); mmc_hostname(host->mmc));
return; return;
} }
timeout--; timeout--;
...@@ -404,7 +405,9 @@ static void sdhci_s3c_setup_card_detect_gpio(struct sdhci_s3c *sc) ...@@ -404,7 +405,9 @@ static void sdhci_s3c_setup_card_detect_gpio(struct sdhci_s3c *sc)
if (sc->ext_cd_irq && if (sc->ext_cd_irq &&
request_threaded_irq(sc->ext_cd_irq, NULL, request_threaded_irq(sc->ext_cd_irq, NULL,
sdhci_s3c_gpio_card_detect_thread, sdhci_s3c_gpio_card_detect_thread,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, IRQF_TRIGGER_RISING |
IRQF_TRIGGER_FALLING |
IRQF_ONESHOT,
dev_name(dev), sc) == 0) { dev_name(dev), sc) == 0) {
int status = gpio_get_value(sc->ext_cd_gpio); int status = gpio_get_value(sc->ext_cd_gpio);
if (pdata->ext_cd_gpio_invert) if (pdata->ext_cd_gpio_invert)
...@@ -486,9 +489,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev) ...@@ -486,9 +489,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
snprintf(name, 14, "mmc_busclk.%d", ptr); snprintf(name, 14, "mmc_busclk.%d", ptr);
clk = clk_get(dev, name); clk = clk_get(dev, name);
if (IS_ERR(clk)) { if (IS_ERR(clk))
continue; continue;
}
clks++; clks++;
sc->clk_bus[ptr] = clk; sc->clk_bus[ptr] = clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment