aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card
diff options
context:
space:
mode:
authorGirish K S <girish.shivananjappa@linaro.org>2011-10-11 02:14:09 -0400
committerChris Ball <cjb@laptop.org>2011-10-26 16:32:22 -0400
commita3c76eb9d4a1e68a69dd880cf0bcb8a52418b993 (patch)
tree968fb0009edad3defcda8bb40df21837868705dd /drivers/mmc/card
parentb23cf0bd55b0c6b703982446f679e00d6d929524 (diff)
mmc: replace printk with appropriate display macro
All the files using printk function for displaying kernel messages in the mmc driver have been replaced with corresponding macro. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r--drivers/mmc/card/block.c10
-rw-r--r--drivers/mmc/card/mmc_test.c34
-rw-r--r--drivers/mmc/card/queue.c4
-rw-r--r--drivers/mmc/card/sdio_uart.c10
4 files changed, 29 insertions, 29 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 2cf1ba6db910..049445eb4f74 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -937,7 +937,7 @@ static int mmc_blk_err_check(struct mmc_card *card,
937 do { 937 do {
938 int err = get_card_status(card, &status, 5); 938 int err = get_card_status(card, &status, 5);
939 if (err) { 939 if (err) {
940 printk(KERN_ERR "%s: error %d requesting status\n", 940 pr_err("%s: error %d requesting status\n",
941 req->rq_disk->disk_name, err); 941 req->rq_disk->disk_name, err);
942 return MMC_BLK_CMD_ERR; 942 return MMC_BLK_CMD_ERR;
943 } 943 }
@@ -1187,7 +1187,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *rqc)
1187 * were returned by the host controller, it's a bug. 1187 * were returned by the host controller, it's a bug.
1188 */ 1188 */
1189 if (status == MMC_BLK_SUCCESS && ret) { 1189 if (status == MMC_BLK_SUCCESS && ret) {
1190 printk(KERN_ERR "%s BUG rq_tot %d d_xfer %d\n", 1190 pr_err("%s BUG rq_tot %d d_xfer %d\n",
1191 __func__, blk_rq_bytes(req), 1191 __func__, blk_rq_bytes(req),
1192 brq->data.bytes_xfered); 1192 brq->data.bytes_xfered);
1193 rqc = NULL; 1193 rqc = NULL;
@@ -1467,7 +1467,7 @@ static int mmc_blk_alloc_part(struct mmc_card *card,
1467 1467
1468 string_get_size((u64)get_capacity(part_md->disk) << 9, STRING_UNITS_2, 1468 string_get_size((u64)get_capacity(part_md->disk) << 9, STRING_UNITS_2,
1469 cap_str, sizeof(cap_str)); 1469 cap_str, sizeof(cap_str));
1470 printk(KERN_INFO "%s: %s %s partition %u %s\n", 1470 pr_info("%s: %s %s partition %u %s\n",
1471 part_md->disk->disk_name, mmc_card_id(card), 1471 part_md->disk->disk_name, mmc_card_id(card),
1472 mmc_card_name(card), part_md->part_type, cap_str); 1472 mmc_card_name(card), part_md->part_type, cap_str);
1473 return 0; 1473 return 0;
@@ -1511,7 +1511,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
1511 mmc_release_host(card->host); 1511 mmc_release_host(card->host);
1512 1512
1513 if (err) { 1513 if (err) {
1514 printk(KERN_ERR "%s: unable to set block size to 512: %d\n", 1514 pr_err("%s: unable to set block size to 512: %d\n",
1515 md->disk->disk_name, err); 1515 md->disk->disk_name, err);
1516 return -EINVAL; 1516 return -EINVAL;
1517 } 1517 }
@@ -1613,7 +1613,7 @@ static int mmc_blk_probe(struct mmc_card *card)
1613 1613
1614 string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2, 1614 string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2,
1615 cap_str, sizeof(cap_str)); 1615 cap_str, sizeof(cap_str));
1616 printk(KERN_INFO "%s: %s %s %s %s\n", 1616 pr_info("%s: %s %s %s %s\n",
1617 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), 1617 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
1618 cap_str, md->read_only ? "(ro)" : ""); 1618 cap_str, md->read_only ? "(ro)" : "");
1619 1619
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index d8705add3c98..b038c4a9468b 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -251,7 +251,7 @@ static int mmc_test_wait_busy(struct mmc_test_card *test)
251 if (!busy && mmc_test_busy(&cmd)) { 251 if (!busy && mmc_test_busy(&cmd)) {
252 busy = 1; 252 busy = 1;
253 if (test->card->host->caps & MMC_CAP_WAIT_WHILE_BUSY) 253 if (test->card->host->caps & MMC_CAP_WAIT_WHILE_BUSY)
254 printk(KERN_INFO "%s: Warning: Host did not " 254 pr_info("%s: Warning: Host did not "
255 "wait for busy state to end.\n", 255 "wait for busy state to end.\n",
256 mmc_hostname(test->card->host)); 256 mmc_hostname(test->card->host));
257 } 257 }
@@ -553,7 +553,7 @@ static void mmc_test_print_rate(struct mmc_test_card *test, uint64_t bytes,
553 rate = mmc_test_rate(bytes, &ts); 553 rate = mmc_test_rate(bytes, &ts);
554 iops = mmc_test_rate(100, &ts); /* I/O ops per sec x 100 */ 554 iops = mmc_test_rate(100, &ts); /* I/O ops per sec x 100 */
555 555
556 printk(KERN_INFO "%s: Transfer of %u sectors (%u%s KiB) took %lu.%09lu " 556 pr_info("%s: Transfer of %u sectors (%u%s KiB) took %lu.%09lu "
557 "seconds (%u kB/s, %u KiB/s, %u.%02u IOPS)\n", 557 "seconds (%u kB/s, %u KiB/s, %u.%02u IOPS)\n",
558 mmc_hostname(test->card->host), sectors, sectors >> 1, 558 mmc_hostname(test->card->host), sectors, sectors >> 1,
559 (sectors & 1 ? ".5" : ""), (unsigned long)ts.tv_sec, 559 (sectors & 1 ? ".5" : ""), (unsigned long)ts.tv_sec,
@@ -579,7 +579,7 @@ static void mmc_test_print_avg_rate(struct mmc_test_card *test, uint64_t bytes,
579 rate = mmc_test_rate(tot, &ts); 579 rate = mmc_test_rate(tot, &ts);
580 iops = mmc_test_rate(count * 100, &ts); /* I/O ops per sec x 100 */ 580 iops = mmc_test_rate(count * 100, &ts); /* I/O ops per sec x 100 */
581 581
582 printk(KERN_INFO "%s: Transfer of %u x %u sectors (%u x %u%s KiB) took " 582 pr_info("%s: Transfer of %u x %u sectors (%u x %u%s KiB) took "
583 "%lu.%09lu seconds (%u kB/s, %u KiB/s, " 583 "%lu.%09lu seconds (%u kB/s, %u KiB/s, "
584 "%u.%02u IOPS, sg_len %d)\n", 584 "%u.%02u IOPS, sg_len %d)\n",
585 mmc_hostname(test->card->host), count, sectors, count, 585 mmc_hostname(test->card->host), count, sectors, count,
@@ -1409,7 +1409,7 @@ static int mmc_test_multi_read_high(struct mmc_test_card *test)
1409 1409
1410static int mmc_test_no_highmem(struct mmc_test_card *test) 1410static int mmc_test_no_highmem(struct mmc_test_card *test)
1411{ 1411{
1412 printk(KERN_INFO "%s: Highmem not configured - test skipped\n", 1412 pr_info("%s: Highmem not configured - test skipped\n",
1413 mmc_hostname(test->card->host)); 1413 mmc_hostname(test->card->host));
1414 return 0; 1414 return 0;
1415} 1415}
@@ -1436,7 +1436,7 @@ static int mmc_test_area_map(struct mmc_test_card *test, unsigned long sz,
1436 t->max_seg_sz, &t->sg_len, min_sg_len); 1436 t->max_seg_sz, &t->sg_len, min_sg_len);
1437 } 1437 }
1438 if (err) 1438 if (err)
1439 printk(KERN_INFO "%s: Failed to map sg list\n", 1439 pr_info("%s: Failed to map sg list\n",
1440 mmc_hostname(test->card->host)); 1440 mmc_hostname(test->card->host));
1441 return err; 1441 return err;
1442} 1442}
@@ -2136,7 +2136,7 @@ static int mmc_test_rw_multiple(struct mmc_test_card *test,
2136 2136
2137 return ret; 2137 return ret;
2138 err: 2138 err:
2139 printk(KERN_INFO "[%s] error\n", __func__); 2139 pr_info("[%s] error\n", __func__);
2140 return ret; 2140 return ret;
2141} 2141}
2142 2142
@@ -2150,7 +2150,7 @@ static int mmc_test_rw_multiple_size(struct mmc_test_card *test,
2150 2150
2151 if (rw->do_nonblock_req && 2151 if (rw->do_nonblock_req &&
2152 ((!pre_req && post_req) || (pre_req && !post_req))) { 2152 ((!pre_req && post_req) || (pre_req && !post_req))) {
2153 printk(KERN_INFO "error: only one of pre/post is defined\n"); 2153 pr_info("error: only one of pre/post is defined\n");
2154 return -EINVAL; 2154 return -EINVAL;
2155 } 2155 }
2156 2156
@@ -2691,7 +2691,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
2691{ 2691{
2692 int i, ret; 2692 int i, ret;
2693 2693
2694 printk(KERN_INFO "%s: Starting tests of card %s...\n", 2694 pr_info("%s: Starting tests of card %s...\n",
2695 mmc_hostname(test->card->host), mmc_card_id(test->card)); 2695 mmc_hostname(test->card->host), mmc_card_id(test->card));
2696 2696
2697 mmc_claim_host(test->card->host); 2697 mmc_claim_host(test->card->host);
@@ -2702,14 +2702,14 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
2702 if (testcase && ((i + 1) != testcase)) 2702 if (testcase && ((i + 1) != testcase))
2703 continue; 2703 continue;
2704 2704
2705 printk(KERN_INFO "%s: Test case %d. %s...\n", 2705 pr_info("%s: Test case %d. %s...\n",
2706 mmc_hostname(test->card->host), i + 1, 2706 mmc_hostname(test->card->host), i + 1,
2707 mmc_test_cases[i].name); 2707 mmc_test_cases[i].name);
2708 2708
2709 if (mmc_test_cases[i].prepare) { 2709 if (mmc_test_cases[i].prepare) {
2710 ret = mmc_test_cases[i].prepare(test); 2710 ret = mmc_test_cases[i].prepare(test);
2711 if (ret) { 2711 if (ret) {
2712 printk(KERN_INFO "%s: Result: Prepare " 2712 pr_info("%s: Result: Prepare "
2713 "stage failed! (%d)\n", 2713 "stage failed! (%d)\n",
2714 mmc_hostname(test->card->host), 2714 mmc_hostname(test->card->host),
2715 ret); 2715 ret);
@@ -2739,25 +2739,25 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
2739 ret = mmc_test_cases[i].run(test); 2739 ret = mmc_test_cases[i].run(test);
2740 switch (ret) { 2740 switch (ret) {
2741 case RESULT_OK: 2741 case RESULT_OK:
2742 printk(KERN_INFO "%s: Result: OK\n", 2742 pr_info("%s: Result: OK\n",
2743 mmc_hostname(test->card->host)); 2743 mmc_hostname(test->card->host));
2744 break; 2744 break;
2745 case RESULT_FAIL: 2745 case RESULT_FAIL:
2746 printk(KERN_INFO "%s: Result: FAILED\n", 2746 pr_info("%s: Result: FAILED\n",
2747 mmc_hostname(test->card->host)); 2747 mmc_hostname(test->card->host));
2748 break; 2748 break;
2749 case RESULT_UNSUP_HOST: 2749 case RESULT_UNSUP_HOST:
2750 printk(KERN_INFO "%s: Result: UNSUPPORTED " 2750 pr_info("%s: Result: UNSUPPORTED "
2751 "(by host)\n", 2751 "(by host)\n",
2752 mmc_hostname(test->card->host)); 2752 mmc_hostname(test->card->host));
2753 break; 2753 break;
2754 case RESULT_UNSUP_CARD: 2754 case RESULT_UNSUP_CARD:
2755 printk(KERN_INFO "%s: Result: UNSUPPORTED " 2755 pr_info("%s: Result: UNSUPPORTED "
2756 "(by card)\n", 2756 "(by card)\n",
2757 mmc_hostname(test->card->host)); 2757 mmc_hostname(test->card->host));
2758 break; 2758 break;
2759 default: 2759 default:
2760 printk(KERN_INFO "%s: Result: ERROR (%d)\n", 2760 pr_info("%s: Result: ERROR (%d)\n",
2761 mmc_hostname(test->card->host), ret); 2761 mmc_hostname(test->card->host), ret);
2762 } 2762 }
2763 2763
@@ -2768,7 +2768,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
2768 if (mmc_test_cases[i].cleanup) { 2768 if (mmc_test_cases[i].cleanup) {
2769 ret = mmc_test_cases[i].cleanup(test); 2769 ret = mmc_test_cases[i].cleanup(test);
2770 if (ret) { 2770 if (ret) {
2771 printk(KERN_INFO "%s: Warning: Cleanup " 2771 pr_info("%s: Warning: Cleanup "
2772 "stage failed! (%d)\n", 2772 "stage failed! (%d)\n",
2773 mmc_hostname(test->card->host), 2773 mmc_hostname(test->card->host),
2774 ret); 2774 ret);
@@ -2778,7 +2778,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
2778 2778
2779 mmc_release_host(test->card->host); 2779 mmc_release_host(test->card->host);
2780 2780
2781 printk(KERN_INFO "%s: Tests completed.\n", 2781 pr_info("%s: Tests completed.\n",
2782 mmc_hostname(test->card->host)); 2782 mmc_hostname(test->card->host));
2783} 2783}
2784 2784
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 5196312bb55e..fed290ecc242 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -197,13 +197,13 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
197 if (bouncesz > 512) { 197 if (bouncesz > 512) {
198 mqrq_cur->bounce_buf = kmalloc(bouncesz, GFP_KERNEL); 198 mqrq_cur->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
199 if (!mqrq_cur->bounce_buf) { 199 if (!mqrq_cur->bounce_buf) {
200 printk(KERN_WARNING "%s: unable to " 200 pr_warning("%s: unable to "
201 "allocate bounce cur buffer\n", 201 "allocate bounce cur buffer\n",
202 mmc_card_name(card)); 202 mmc_card_name(card));
203 } 203 }
204 mqrq_prev->bounce_buf = kmalloc(bouncesz, GFP_KERNEL); 204 mqrq_prev->bounce_buf = kmalloc(bouncesz, GFP_KERNEL);
205 if (!mqrq_prev->bounce_buf) { 205 if (!mqrq_prev->bounce_buf) {
206 printk(KERN_WARNING "%s: unable to " 206 pr_warning("%s: unable to "
207 "allocate bounce prev buffer\n", 207 "allocate bounce prev buffer\n",
208 mmc_card_name(card)); 208 mmc_card_name(card));
209 kfree(mqrq_cur->bounce_buf); 209 kfree(mqrq_cur->bounce_buf);
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c
index c8c9edb3d7cb..2c151e18c9e8 100644
--- a/drivers/mmc/card/sdio_uart.c
+++ b/drivers/mmc/card/sdio_uart.c
@@ -1082,7 +1082,7 @@ static int sdio_uart_probe(struct sdio_func *func,
1082 return -ENOMEM; 1082 return -ENOMEM;
1083 1083
1084 if (func->class == SDIO_CLASS_UART) { 1084 if (func->class == SDIO_CLASS_UART) {
1085 printk(KERN_WARNING "%s: need info on UART class basic setup\n", 1085 pr_warning("%s: need info on UART class basic setup\n",
1086 sdio_func_id(func)); 1086 sdio_func_id(func));
1087 kfree(port); 1087 kfree(port);
1088 return -ENOSYS; 1088 return -ENOSYS;
@@ -1101,23 +1101,23 @@ static int sdio_uart_probe(struct sdio_func *func,
1101 break; 1101 break;
1102 } 1102 }
1103 if (!tpl) { 1103 if (!tpl) {
1104 printk(KERN_WARNING 1104 pr_warning(
1105 "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n", 1105 "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n",
1106 sdio_func_id(func)); 1106 sdio_func_id(func));
1107 kfree(port); 1107 kfree(port);
1108 return -EINVAL; 1108 return -EINVAL;
1109 } 1109 }
1110 printk(KERN_DEBUG "%s: Register ID = 0x%02x, Exp ID = 0x%02x\n", 1110 pr_debug("%s: Register ID = 0x%02x, Exp ID = 0x%02x\n",
1111 sdio_func_id(func), tpl->data[2], tpl->data[3]); 1111 sdio_func_id(func), tpl->data[2], tpl->data[3]);
1112 port->regs_offset = (tpl->data[4] << 0) | 1112 port->regs_offset = (tpl->data[4] << 0) |
1113 (tpl->data[5] << 8) | 1113 (tpl->data[5] << 8) |
1114 (tpl->data[6] << 16); 1114 (tpl->data[6] << 16);
1115 printk(KERN_DEBUG "%s: regs offset = 0x%x\n", 1115 pr_debug("%s: regs offset = 0x%x\n",
1116 sdio_func_id(func), port->regs_offset); 1116 sdio_func_id(func), port->regs_offset);
1117 port->uartclk = tpl->data[7] * 115200; 1117 port->uartclk = tpl->data[7] * 115200;
1118 if (port->uartclk == 0) 1118 if (port->uartclk == 0)
1119 port->uartclk = 115200; 1119 port->uartclk = 115200;
1120 printk(KERN_DEBUG "%s: clk %d baudcode %u 4800-div %u\n", 1120 pr_debug("%s: clk %d baudcode %u 4800-div %u\n",
1121 sdio_func_id(func), port->uartclk, 1121 sdio_func_id(func), port->uartclk,
1122 tpl->data[7], tpl->data[8] | (tpl->data[9] << 8)); 1122 tpl->data[7], tpl->data[8] | (tpl->data[9] << 8));
1123 } else { 1123 } else {