diff options
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/card/block.c | 2 | ||||
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index a9b6146807db..efacee0404a0 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -84,7 +84,7 @@ static void mmc_blk_put(struct mmc_blk_data *md) | |||
84 | mutex_lock(&open_lock); | 84 | mutex_lock(&open_lock); |
85 | md->usage--; | 85 | md->usage--; |
86 | if (md->usage == 0) { | 86 | if (md->usage == 0) { |
87 | int devidx = md->disk->first_minor >> MMC_SHIFT; | 87 | int devidx = MINOR(disk_devt(md->disk)) >> MMC_SHIFT; |
88 | __clear_bit(devidx, dev_use); | 88 | __clear_bit(devidx, dev_use); |
89 | 89 | ||
90 | put_disk(md->disk); | 90 | put_disk(md->disk); |
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index 917035e16da4..00008967ef7a 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -426,8 +426,6 @@ static u32 atmci_submit_data(struct mmc_host *mmc, struct mmc_data *data) | |||
426 | host->sg = NULL; | 426 | host->sg = NULL; |
427 | host->data = data; | 427 | host->data = data; |
428 | 428 | ||
429 | mci_writel(host, BLKR, MCI_BCNT(data->blocks) | ||
430 | | MCI_BLKLEN(data->blksz)); | ||
431 | dev_vdbg(&mmc->class_dev, "BLKR=0x%08x\n", | 429 | dev_vdbg(&mmc->class_dev, "BLKR=0x%08x\n", |
432 | MCI_BCNT(data->blocks) | MCI_BLKLEN(data->blksz)); | 430 | MCI_BCNT(data->blocks) | MCI_BLKLEN(data->blksz)); |
433 | 431 | ||
@@ -483,6 +481,10 @@ static void atmci_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
483 | if (data->blocks > 1 && data->blksz & 3) | 481 | if (data->blocks > 1 && data->blksz & 3) |
484 | goto fail; | 482 | goto fail; |
485 | atmci_set_timeout(host, data); | 483 | atmci_set_timeout(host, data); |
484 | |||
485 | /* Must set block count/size before sending command */ | ||
486 | mci_writel(host, BLKR, MCI_BCNT(data->blocks) | ||
487 | | MCI_BLKLEN(data->blksz)); | ||
486 | } | 488 | } |
487 | 489 | ||
488 | iflags = MCI_CMDRDY; | 490 | iflags = MCI_CMDRDY; |