diff options
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r-- | drivers/mmc/card/block.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 8eba037a18e0..8a84e4dc1b2a 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -226,8 +226,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
226 | struct mmc_blk_request brq; | 226 | struct mmc_blk_request brq; |
227 | int ret = 1, sg_pos, data_size; | 227 | int ret = 1, sg_pos, data_size; |
228 | 228 | ||
229 | if (mmc_card_claim_host(card)) | 229 | mmc_claim_host(card->host); |
230 | goto flush_queue; | ||
231 | 230 | ||
232 | do { | 231 | do { |
233 | struct mmc_command cmd; | 232 | struct mmc_command cmd; |
@@ -357,7 +356,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
357 | spin_unlock_irq(&md->lock); | 356 | spin_unlock_irq(&md->lock); |
358 | } while (ret); | 357 | } while (ret); |
359 | 358 | ||
360 | mmc_card_release_host(card); | 359 | mmc_release_host(card->host); |
361 | 360 | ||
362 | return 1; | 361 | return 1; |
363 | 362 | ||
@@ -393,9 +392,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
393 | spin_unlock_irq(&md->lock); | 392 | spin_unlock_irq(&md->lock); |
394 | } | 393 | } |
395 | 394 | ||
396 | flush_queue: | 395 | mmc_release_host(card->host); |
397 | |||
398 | mmc_card_release_host(card); | ||
399 | 396 | ||
400 | spin_lock_irq(&md->lock); | 397 | spin_lock_irq(&md->lock); |
401 | while (ret) { | 398 | while (ret) { |
@@ -526,12 +523,12 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card) | |||
526 | if (mmc_card_blockaddr(card)) | 523 | if (mmc_card_blockaddr(card)) |
527 | return 0; | 524 | return 0; |
528 | 525 | ||
529 | mmc_card_claim_host(card); | 526 | mmc_claim_host(card->host); |
530 | cmd.opcode = MMC_SET_BLOCKLEN; | 527 | cmd.opcode = MMC_SET_BLOCKLEN; |
531 | cmd.arg = 1 << md->block_bits; | 528 | cmd.arg = 1 << md->block_bits; |
532 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; | 529 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
533 | err = mmc_wait_for_cmd(card->host, &cmd, 5); | 530 | err = mmc_wait_for_cmd(card->host, &cmd, 5); |
534 | mmc_card_release_host(card); | 531 | mmc_release_host(card->host); |
535 | 532 | ||
536 | if (err) { | 533 | if (err) { |
537 | printk(KERN_ERR "%s: unable to set block size to %d: %d\n", | 534 | printk(KERN_ERR "%s: unable to set block size to %d: %d\n", |