mmc: dw_mmc: remove redundant of set_bit and clear_bit
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 27 May 2016 07:40:08 +0000 (15:40 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 30 May 2016 09:34:23 +0000 (17:34 +0800)
dw_mci_get_cd have already dealt with these for
both of internal card-detect and gpio card-detect.

Change-Id: I59eb591d2dace127bae3520d7920056d704ed1e6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
drivers/mmc/host/dw_mmc.c

index 1ed0bc865cfc5c4d8132b7f8d338e73a5c9e6520..763c38dfa8c1ba3fdd889ebbcca41b76b200c609 100644 (file)
@@ -2630,10 +2630,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
                mmc->max_seg_size = mmc->max_req_size;
        }
 
-       if (dw_mci_get_cd(mmc))
-               set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
-       else
-               clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
+       dw_mci_get_cd(mmc);
 
        ret = mmc_add_host(mmc);
        if (ret)