aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-08-29 01:35:06 -0400
committerChris Ball <cjb@laptop.org>2012-09-04 13:58:28 -0400
commit2ad0b2494f83d87046db2c4fe6256546d44b3160 (patch)
tree24ace34a5146c1fabf2c2c4d90f26e50edb549d7
parent3339d1e33185798a45dbdb5ea6c0bec1c27ca5fd (diff)
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: Jingoo Han <jg1.han@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/host/sdhci-s3c.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index a50c205ea208..00969ba03277 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -166,7 +166,7 @@ static unsigned int sdhci_s3c_consider_clock(struct sdhci_s3c *ourhost,
166 dev_dbg(&ourhost->pdev->dev, "clk %d: rate %ld, want %d, got %ld\n", 166 dev_dbg(&ourhost->pdev->dev, "clk %d: rate %ld, want %d, got %ld\n",
167 src, rate, wanted, rate / div); 167 src, rate, wanted, rate / div);
168 168
169 return (wanted - (rate / div)); 169 return wanted - (rate / div);
170} 170}
171 171
172/** 172/**
@@ -288,6 +288,7 @@ static unsigned int sdhci_cmu_get_min_clock(struct sdhci_host *host)
288static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock) 288static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
289{ 289{
290 struct sdhci_s3c *ourhost = to_s3c(host); 290 struct sdhci_s3c *ourhost = to_s3c(host);
291 struct device *dev = &ourhost->pdev->dev;
291 unsigned long timeout; 292 unsigned long timeout;
292 u16 clk = 0; 293 u16 clk = 0;
293 294
@@ -309,8 +310,8 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
309 while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) 310 while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL))
310 & SDHCI_CLOCK_INT_STABLE)) { 311 & SDHCI_CLOCK_INT_STABLE)) {
311 if (timeout == 0) { 312 if (timeout == 0) {
312 printk(KERN_ERR "%s: Internal clock never " 313 dev_err(dev, "%s: Internal clock never stabilised.\n",
313 "stabilised.\n", mmc_hostname(host->mmc)); 314 mmc_hostname(host->mmc));
314 return; 315 return;
315 } 316 }
316 timeout--; 317 timeout--;
@@ -404,7 +405,9 @@ static void sdhci_s3c_setup_card_detect_gpio(struct sdhci_s3c *sc)
404 if (sc->ext_cd_irq && 405 if (sc->ext_cd_irq &&
405 request_threaded_irq(sc->ext_cd_irq, NULL, 406 request_threaded_irq(sc->ext_cd_irq, NULL,
406 sdhci_s3c_gpio_card_detect_thread, 407 sdhci_s3c_gpio_card_detect_thread,
407 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, 408 IRQF_TRIGGER_RISING |
409 IRQF_TRIGGER_FALLING |
410 IRQF_ONESHOT,
408 dev_name(dev), sc) == 0) { 411 dev_name(dev), sc) == 0) {
409 int status = gpio_get_value(sc->ext_cd_gpio); 412 int status = gpio_get_value(sc->ext_cd_gpio);
410 if (pdata->ext_cd_gpio_invert) 413 if (pdata->ext_cd_gpio_invert)
@@ -486,9 +489,8 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
486 489
487 snprintf(name, 14, "mmc_busclk.%d", ptr); 490 snprintf(name, 14, "mmc_busclk.%d", ptr);
488 clk = clk_get(dev, name); 491 clk = clk_get(dev, name);
489 if (IS_ERR(clk)) { 492 if (IS_ERR(clk))
490 continue; 493 continue;
491 }
492 494
493 clks++; 495 clks++;
494 sc->clk_bus[ptr] = clk; 496 sc->clk_bus[ptr] = clk;