Skip to content

Commit

Permalink
mmc: core: Remove redundant check while selecting powerclass
Browse files Browse the repository at this point in the history
The validation of the buswidth and the MMC spec version in
__mmc_select_powerclass() is redundant, let's remove it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Ulf Hansson committed Nov 10, 2014
1 parent fd372f7 commit 56d09b1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,14 +793,6 @@ static int __mmc_select_powerclass(struct mmc_card *card,
unsigned int pwrclass_val = 0;
int err = 0;

/* Power class selection is supported for versions >= 4.0 */
if (card->csd.mmca_vsn < CSD_SPEC_VER_4)
return 0;

/* Power class values are defined only for 4/8 bit bus */
if (bus_width == EXT_CSD_BUS_WIDTH_1)
return 0;

switch (1 << host->ios.vdd) {
case MMC_VDD_165_195:
if (host->ios.clock <= MMC_HIGH_26_MAX_DTR)
Expand Down

0 comments on commit 56d09b1

Please sign in to comment.