s5pc110: mmc: code clean up JB19_20100227
authorJaehoon Chung <jh80.chung@samsung.com>
Sat, 27 Feb 2010 08:09:59 +0000 (17:09 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Sat, 27 Feb 2010 08:09:59 +0000 (17:09 +0900)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/mmc.c

index 346da17..6f07aaa 100644 (file)
@@ -655,7 +655,7 @@ int mmc_startup(struct mmc *mmc)
        mmc->csd[3] = cmd.response[3];
 
        if (mmc->version == MMC_VERSION_UNKNOWN) {
-               int version = (cmd.response[0] >> 26) & 0xf;
+               int version = (mmc->csd[0] >> 26) & 0xf;
 
                switch (version) {
                        case 0:
@@ -680,17 +680,17 @@ int mmc_startup(struct mmc *mmc)
        }
 
        /* divide frequency by 10, since the mults are 10x bigger */
-       freq = fbase[(cmd.response[0] & 0x7)];
-       mult = multipliers[((cmd.response[0] >> 3) & 0xf)];
+       freq = fbase[(mmc->csd[0] & 0x7)];
+       mult = multipliers[((mmc->csd[0] >> 3) & 0xf)];
 
        mmc->tran_speed = freq * mult;
 
-       mmc->read_bl_len = 1 << ((cmd.response[1] >> 16) & 0xf);
+       mmc->read_bl_len = 1 << ((mmc->csd[1] >> 16) & 0xf);
 
        if (IS_SD(mmc))
                mmc->write_bl_len = mmc->read_bl_len;
        else
-               mmc->write_bl_len = 1 << ((cmd.response[3] >> 22) & 0xf);
+               mmc->write_bl_len = 1 << ((mmc->csd[3] >> 22) & 0xf);
 
        if (mmc->high_capacity) {
                csize = (mmc->csd[1] & 0x3f) << 16