Commit 5865f287 authored by Ulf Hansson's avatar Ulf Hansson Committed by Chris Ball

mmc: block: Remove use of mmc_blk_set_blksize

According to the specifications for SD and (e)MMC default
blocksize (named BLOCKLEN in Spec.) must always be 512
bytes. Since we hardcoded to always use 512 bytes, we do
not explicitly have to set it. Future improvements should
potentially make it possible to use a greater blocksize
than 512 bytes, but until then let's skip this.
Signed-off-by: default avatarUlf Hansson <ulf.hansson@stericsson.com>
Reviewed-by: default avatarSubhash Jadavani <subhashj@codeauora.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent faf8180b
...@@ -1623,24 +1623,6 @@ static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md) ...@@ -1623,24 +1623,6 @@ static int mmc_blk_alloc_parts(struct mmc_card *card, struct mmc_blk_data *md)
return ret; return ret;
} }
static int
mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
{
int err;
mmc_claim_host(card->host);
err = mmc_set_blocklen(card, 512);
mmc_release_host(card->host);
if (err) {
pr_err("%s: unable to set block size to 512: %d\n",
md->disk->disk_name, err);
return -EINVAL;
}
return 0;
}
static void mmc_blk_remove_req(struct mmc_blk_data *md) static void mmc_blk_remove_req(struct mmc_blk_data *md)
{ {
struct mmc_card *card; struct mmc_card *card;
...@@ -1768,7 +1750,6 @@ static const struct mmc_fixup blk_fixups[] = ...@@ -1768,7 +1750,6 @@ static const struct mmc_fixup blk_fixups[] =
static int mmc_blk_probe(struct mmc_card *card) static int mmc_blk_probe(struct mmc_card *card)
{ {
struct mmc_blk_data *md, *part_md; struct mmc_blk_data *md, *part_md;
int err;
char cap_str[10]; char cap_str[10];
/* /*
...@@ -1781,10 +1762,6 @@ static int mmc_blk_probe(struct mmc_card *card) ...@@ -1781,10 +1762,6 @@ static int mmc_blk_probe(struct mmc_card *card)
if (IS_ERR(md)) if (IS_ERR(md))
return PTR_ERR(md); return PTR_ERR(md);
err = mmc_blk_set_blksize(md, card);
if (err)
goto out;
string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2, string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2,
cap_str, sizeof(cap_str)); cap_str, sizeof(cap_str));
pr_info("%s: %s %s %s %s\n", pr_info("%s: %s %s %s %s\n",
...@@ -1809,7 +1786,7 @@ static int mmc_blk_probe(struct mmc_card *card) ...@@ -1809,7 +1786,7 @@ static int mmc_blk_probe(struct mmc_card *card)
out: out:
mmc_blk_remove_parts(card, md); mmc_blk_remove_parts(card, md);
mmc_blk_remove_req(md); mmc_blk_remove_req(md);
return err; return 0;
} }
static void mmc_blk_remove(struct mmc_card *card) static void mmc_blk_remove(struct mmc_card *card)
...@@ -1845,8 +1822,6 @@ static int mmc_blk_resume(struct mmc_card *card) ...@@ -1845,8 +1822,6 @@ static int mmc_blk_resume(struct mmc_card *card)
struct mmc_blk_data *md = mmc_get_drvdata(card); struct mmc_blk_data *md = mmc_get_drvdata(card);
if (md) { if (md) {
mmc_blk_set_blksize(md, card);
/* /*
* Resume involves the card going into idle state, * Resume involves the card going into idle state,
* so current partition is always the main one. * so current partition is always the main one.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment