From: Shawn Lin Date: Fri, 27 May 2016 07:40:08 +0000 (+0800) Subject: mmc: dw_mmc: remove redundant of set_bit and clear_bit X-Git-Tag: firefly_0821_release~2590 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=firefly-linux-kernel-4.4.55.git;a=commitdiff_plain;h=da072376421ae6a1773a9977fd831d611171aa31 mmc: dw_mmc: remove redundant of set_bit and clear_bit 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 --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 1ed0bc865cfc..763c38dfa8c1 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -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)