From 872e234be9b2aede96a597379ef34509d86fe5ce Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Mon, 21 Jun 2010 16:45:22 +0900 Subject: [PATCH] mmc: version checking is unnecessary version is already checked top of this function Signed-off-by: Minkyu Kang --- drivers/mmc/mmc.c | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 67f8fb3..317de3c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -435,33 +435,31 @@ int mmc_change_freq(struct mmc *mmc) return err; /* Check MMC version 4.X */ - if (mmc->version == MMC_VERSION_4) { - switch (ext_csd[192]) { - case EXT_CSD_REV_1_0: - /* MMC v4.0 */ - mmc->version |= EXT_CSD_REV_1_0; - break; - case EXT_CSD_REV_1_1: - /* MMC v4.1 */ - mmc->version |= EXT_CSD_REV_1_1; - break; - case EXT_CSD_REV_1_2: - /* MMC v4.2 */ - mmc->version |= EXT_CSD_REV_1_2; - break; - case EXT_CSD_REV_1_3: - /* MMC v4.3 */ - mmc->version |= EXT_CSD_REV_1_3; - break; - case EXT_CSD_REV_1_4: - /* Obeolete */ - mmc->version |= EXT_CSD_REV_1_4; - break; - case EXT_CSD_REV_1_5: - /* MMC v4.41 */ - mmc->version |= EXT_CSD_REV_1_5; - break; - } + switch (ext_csd[192]) { + case EXT_CSD_REV_1_0: + /* MMC v4.0 */ + mmc->version |= EXT_CSD_REV_1_0; + break; + case EXT_CSD_REV_1_1: + /* MMC v4.1 */ + mmc->version |= EXT_CSD_REV_1_1; + break; + case EXT_CSD_REV_1_2: + /* MMC v4.2 */ + mmc->version |= EXT_CSD_REV_1_2; + break; + case EXT_CSD_REV_1_3: + /* MMC v4.3 */ + mmc->version |= EXT_CSD_REV_1_3; + break; + case EXT_CSD_REV_1_4: + /* Obeolete */ + mmc->version |= EXT_CSD_REV_1_4; + break; + case EXT_CSD_REV_1_5: + /* MMC v4.41 */ + mmc->version |= EXT_CSD_REV_1_5; + break; } /* No high-speed support */ -- 2.7.4