aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPierre Ossman <drzeus-list@drzeus.cx>2008-09-06 04:57:57 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 12:46:15 -0400
commita7bbb57333447d0cf950992653b6b079585f3531 (patch)
treebdd96f1f2076a58b96330adc0e8981ae643e5411 /drivers/mmc
parenta30c3f69e6336cb9b09a989595e417367e4e9b1b (diff)
[SCSI] mmc_block: use generic helper to print capacities
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index ebc8b9d77613..a9b6146807db 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -29,6 +29,7 @@
29#include <linux/blkdev.h> 29#include <linux/blkdev.h>
30#include <linux/mutex.h> 30#include <linux/mutex.h>
31#include <linux/scatterlist.h> 31#include <linux/scatterlist.h>
32#include <linux/string_helpers.h>
32 33
33#include <linux/mmc/card.h> 34#include <linux/mmc/card.h>
34#include <linux/mmc/host.h> 35#include <linux/mmc/host.h>
@@ -532,6 +533,8 @@ static int mmc_blk_probe(struct mmc_card *card)
532 struct mmc_blk_data *md; 533 struct mmc_blk_data *md;
533 int err; 534 int err;
534 535
536 char cap_str[10];
537
535 /* 538 /*
536 * Check that the card supports the command class(es) we need. 539 * Check that the card supports the command class(es) we need.
537 */ 540 */
@@ -546,10 +549,11 @@ static int mmc_blk_probe(struct mmc_card *card)
546 if (err) 549 if (err)
547 goto out; 550 goto out;
548 551
549 printk(KERN_INFO "%s: %s %s %lluKiB %s\n", 552 string_get_size(get_capacity(md->disk) << 9, STRING_UNITS_2,
553 cap_str, sizeof(cap_str));
554 printk(KERN_INFO "%s: %s %s %s %s\n",
550 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), 555 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
551 (unsigned long long)(get_capacity(md->disk) >> 1), 556 cap_str, md->read_only ? "(ro)" : "");
552 md->read_only ? "(ro)" : "");
553 557
554 mmc_set_drvdata(card, md); 558 mmc_set_drvdata(card, md);
555 add_disk(md->disk); 559 add_disk(md->disk);