aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c12
-rw-r--r--drivers/mmc/host/pxamci.c4
2 files changed, 10 insertions, 6 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 1d1e469e08ea..24c97d3d16bb 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>
@@ -82,7 +83,7 @@ static void mmc_blk_put(struct mmc_blk_data *md)
82 mutex_lock(&open_lock); 83 mutex_lock(&open_lock);
83 md->usage--; 84 md->usage--;
84 if (md->usage == 0) { 85 if (md->usage == 0) {
85 int devidx = md->disk->first_minor >> MMC_SHIFT; 86 int devidx = MINOR(disk_devt(md->disk)) >> MMC_SHIFT;
86 __clear_bit(devidx, dev_use); 87 __clear_bit(devidx, dev_use);
87 88
88 put_disk(md->disk); 89 put_disk(md->disk);
@@ -498,6 +499,8 @@ static int mmc_blk_probe(struct mmc_card *card)
498 struct mmc_blk_data *md; 499 struct mmc_blk_data *md;
499 int err; 500 int err;
500 501
502 char cap_str[10];
503
501 /* 504 /*
502 * Check that the card supports the command class(es) we need. 505 * Check that the card supports the command class(es) we need.
503 */ 506 */
@@ -512,10 +515,11 @@ static int mmc_blk_probe(struct mmc_card *card)
512 if (err) 515 if (err)
513 goto out; 516 goto out;
514 517
515 printk(KERN_INFO "%s: %s %s %lluKiB %s\n", 518 string_get_size(get_capacity(md->disk) << 9, STRING_UNITS_2,
519 cap_str, sizeof(cap_str));
520 printk(KERN_INFO "%s: %s %s %s %s\n",
516 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), 521 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
517 (unsigned long long)(get_capacity(md->disk) >> 1), 522 cap_str, md->read_only ? "(ro)" : "");
518 md->read_only ? "(ro)" : "");
519 523
520 mmc_set_drvdata(card, md); 524 mmc_set_drvdata(card, md);
521 add_disk(md->disk); 525 add_disk(md->disk);
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c
index 55093ad132ca..ebfaa9960939 100644
--- a/drivers/mmc/host/pxamci.c
+++ b/drivers/mmc/host/pxamci.c
@@ -520,7 +520,7 @@ static int pxamci_probe(struct platform_device *pdev)
520 /* 520 /*
521 * Block length register is only 10 bits before PXA27x. 521 * Block length register is only 10 bits before PXA27x.
522 */ 522 */
523 mmc->max_blk_size = (cpu_is_pxa21x() || cpu_is_pxa25x()) ? 1023 : 2048; 523 mmc->max_blk_size = cpu_is_pxa25x() ? 1023 : 2048;
524 524
525 /* 525 /*
526 * Block count register is 16 bits. 526 * Block count register is 16 bits.
@@ -554,7 +554,7 @@ static int pxamci_probe(struct platform_device *pdev)
554 MMC_VDD_32_33|MMC_VDD_33_34; 554 MMC_VDD_32_33|MMC_VDD_33_34;
555 mmc->caps = 0; 555 mmc->caps = 0;
556 host->cmdat = 0; 556 host->cmdat = 0;
557 if (!cpu_is_pxa21x() && !cpu_is_pxa25x()) { 557 if (!cpu_is_pxa25x()) {
558 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; 558 mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ;
559 host->cmdat |= CMDAT_SDIO_INT_EN; 559 host->cmdat |= CMDAT_SDIO_INT_EN;
560 if (cpu_is_pxa300() || cpu_is_pxa310()) 560 if (cpu_is_pxa300() || cpu_is_pxa310())