aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-03-22 09:37:21 -0400
committerChris Ball <cjb@laptop.org>2013-03-22 13:29:47 -0400
commite573d6985e315fd307862c2142dfd41731e9f209 (patch)
treecaf607297f568b773cf02704808a8d75bef680d8 /drivers/mmc/host
parent5e81441e24336f8fa475ab3eae12c2195e0d9064 (diff)
mmc: mvsdio: use dev_*() API instead of pr_*() API
The mvsdio driver was already using some dev_*() functions to print some messages, but still using pr_*() functions for some others. This patch converts all messages to use dev_*() functions. Many of the pr_*() function calls were printing the output of mmc_hostname() to preprend the message with an identifier for the device. Since the dev_*() functions do that automatically, this patch also gets rid of those string prefixes. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r--drivers/mmc/host/mvsdio.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index ae08b32170f2..8960fc846c77 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -119,10 +119,8 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
119 host->pio_size = data->blocks * data->blksz; 119 host->pio_size = data->blocks * data->blksz;
120 host->pio_ptr = sg_virt(data->sg); 120 host->pio_ptr = sg_virt(data->sg);
121 if (!nodma) 121 if (!nodma)
122 pr_debug("%s: fallback to PIO for data " 122 dev_dbg(host->dev, "fallback to PIO for data at 0x%p size %d\n",
123 "at 0x%p size %d\n", 123 host->pio_ptr, host->pio_size);
124 mmc_hostname(host->mmc),
125 host->pio_ptr, host->pio_size);
126 return 1; 124 return 1;
127 } else { 125 } else {
128 dma_addr_t phys_addr; 126 dma_addr_t phys_addr;
@@ -473,8 +471,8 @@ static irqreturn_t mvsd_irq(int irq, void *dev)
473 if (mrq->data) 471 if (mrq->data)
474 err_status = mvsd_finish_data(host, mrq->data, err_status); 472 err_status = mvsd_finish_data(host, mrq->data, err_status);
475 if (err_status) { 473 if (err_status) {
476 pr_err("%s: unhandled error status %#04x\n", 474 dev_err(host->dev, "unhandled error status %#04x\n",
477 mmc_hostname(host->mmc), err_status); 475 err_status);
478 cmd->error = -ENOMSG; 476 cmd->error = -ENOMSG;
479 } 477 }
480 478
@@ -491,9 +489,8 @@ static irqreturn_t mvsd_irq(int irq, void *dev)
491 if (irq_handled) 489 if (irq_handled)
492 return IRQ_HANDLED; 490 return IRQ_HANDLED;
493 491
494 pr_err("%s: unhandled interrupt status=0x%04x en=0x%04x " 492 dev_err(host->dev, "unhandled interrupt status=0x%04x en=0x%04x pio=%d\n",
495 "pio=%d\n", mmc_hostname(host->mmc), intr_status, 493 intr_status, host->intr_en, host->pio_size);
496 host->intr_en, host->pio_size);
497 return IRQ_NONE; 494 return IRQ_NONE;
498} 495}
499 496
@@ -507,13 +504,11 @@ static void mvsd_timeout_timer(unsigned long data)
507 spin_lock_irqsave(&host->lock, flags); 504 spin_lock_irqsave(&host->lock, flags);
508 mrq = host->mrq; 505 mrq = host->mrq;
509 if (mrq) { 506 if (mrq) {
510 pr_err("%s: Timeout waiting for hardware interrupt.\n", 507 dev_err(host->dev, "Timeout waiting for hardware interrupt.\n");
511 mmc_hostname(host->mmc)); 508 dev_err(host->dev, "hw_state=0x%04x, intr_status=0x%04x intr_en=0x%04x\n",
512 pr_err("%s: hw_state=0x%04x, intr_status=0x%04x " 509 mvsd_read(MVSD_HW_STATE),
513 "intr_en=0x%04x\n", mmc_hostname(host->mmc), 510 mvsd_read(MVSD_NOR_INTR_STATUS),
514 mvsd_read(MVSD_HW_STATE), 511 mvsd_read(MVSD_NOR_INTR_EN));
515 mvsd_read(MVSD_NOR_INTR_STATUS),
516 mvsd_read(MVSD_NOR_INTR_EN));
517 512
518 host->mrq = NULL; 513 host->mrq = NULL;
519 514
@@ -778,7 +773,7 @@ static int __init mvsd_probe(struct platform_device *pdev)
778 773
779 ret = devm_request_irq(&pdev->dev, irq, mvsd_irq, 0, DRIVER_NAME, host); 774 ret = devm_request_irq(&pdev->dev, irq, mvsd_irq, 0, DRIVER_NAME, host);
780 if (ret) { 775 if (ret) {
781 pr_err("%s: cannot assign irq %d\n", DRIVER_NAME, irq); 776 dev_err(&pdev->dev, "cannot assign irq %d\n", irq);
782 goto out; 777 goto out;
783 } 778 }
784 779
@@ -797,13 +792,11 @@ static int __init mvsd_probe(struct platform_device *pdev)
797 if (ret) 792 if (ret)
798 goto out; 793 goto out;
799 794
800 pr_notice("%s: %s driver initialized, ",
801 mmc_hostname(mmc), DRIVER_NAME);
802 if (!(mmc->caps & MMC_CAP_NEEDS_POLL)) 795 if (!(mmc->caps & MMC_CAP_NEEDS_POLL))
803 printk("using GPIO %d for card detection\n", 796 dev_notice(&pdev->dev, "using GPIO %d for card detection\n",
804 gpio_card_detect); 797 gpio_card_detect);
805 else 798 else
806 printk("lacking card detect (fall back to polling)\n"); 799 dev_notice(&pdev->dev, "lacking card detect (fall back to polling)\n");
807 return 0; 800 return 0;
808 801
809out: 802out: