aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r--drivers/mmc/card/block.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index eed213a5c8cb..b1809650b7aa 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1623,24 +1623,6 @@ static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md)
1623 return ret; 1623 return ret;
1624} 1624}
1625 1625
1626static int
1627mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
1628{
1629 int err;
1630
1631 mmc_claim_host(card->host);
1632 err = mmc_set_blocklen(card, 512);
1633 mmc_release_host(card->host);
1634
1635 if (err) {
1636 pr_err("%s: unable to set block size to 512: %d\n",
1637 md->disk->disk_name, err);
1638 return -EINVAL;
1639 }
1640
1641 return 0;
1642}
1643
1644static void mmc_blk_remove_req(struct mmc_blk_data *md) 1626static void mmc_blk_remove_req(struct mmc_blk_data *md)
1645{ 1627{
1646 struct mmc_card *card; 1628 struct mmc_card *card;
@@ -1768,7 +1750,6 @@ static const struct mmc_fixup blk_fixups[] =
1768static int mmc_blk_probe(struct mmc_card *card) 1750static int mmc_blk_probe(struct mmc_card *card)
1769{ 1751{
1770 struct mmc_blk_data *md, *part_md; 1752 struct mmc_blk_data *md, *part_md;
1771 int err;
1772 char cap_str[10]; 1753 char cap_str[10];
1773 1754
1774 /* 1755 /*
@@ -1781,10 +1762,6 @@ static int mmc_blk_probe(struct mmc_card *card)
1781 if (IS_ERR(md)) 1762 if (IS_ERR(md))
1782 return PTR_ERR(md); 1763 return PTR_ERR(md);
1783 1764
1784 err = mmc_blk_set_blksize(md, card);
1785 if (err)
1786 goto out;
1787
1788 string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2, 1765 string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2,
1789 cap_str, sizeof(cap_str)); 1766 cap_str, sizeof(cap_str));
1790 pr_info("%s: %s %s %s %s\n", 1767 pr_info("%s: %s %s %s %s\n",
@@ -1809,7 +1786,7 @@ static int mmc_blk_probe(struct mmc_card *card)
1809 out: 1786 out:
1810 mmc_blk_remove_parts(card, md); 1787 mmc_blk_remove_parts(card, md);
1811 mmc_blk_remove_req(md); 1788 mmc_blk_remove_req(md);
1812 return err; 1789 return 0;
1813} 1790}
1814 1791
1815static void mmc_blk_remove(struct mmc_card *card) 1792static void mmc_blk_remove(struct mmc_card *card)
@@ -1845,8 +1822,6 @@ static int mmc_blk_resume(struct mmc_card *card)
1845 struct mmc_blk_data *md = mmc_get_drvdata(card); 1822 struct mmc_blk_data *md = mmc_get_drvdata(card);
1846 1823
1847 if (md) { 1824 if (md) {
1848 mmc_blk_set_blksize(md, card);
1849
1850 /* 1825 /*
1851 * Resume involves the card going into idle state, 1826 * Resume involves the card going into idle state,
1852 * so current partition is always the main one. 1827 * so current partition is always the main one.