diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/block.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 97156b689e82..efacee0404a0 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); |