From 743cd0f5c29af3646e62412fa17e3dddbe9bbb28 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Thu, 19 Aug 2010 19:12:11 +0900 Subject: [PATCH] s5pc110: mmc: code clean up Signed-off-by: Jaehoon Chung --- drivers/mmc/mmc.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 4b9a75a..dea6af1 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -424,16 +424,13 @@ int mmc_change_freq(struct mmc *mmc) if (err) return err; - /* set previous value to mmc->boot_config */ - if (!mmc->boot_config) - mmc->boot_config = ext_csd[179]; - /* partition configuration */ - err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, - EXT_CSD_BOOT_CONFIG, mmc->boot_config); - if (err) - return err; - + if (mmc->boot_config) { + err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_BOOT_CONFIG, mmc->boot_config); + if (err) + return err; + } /* * Boot bus width configuration -- 2.7.4