From 997ae819a8a686e5b613953d89c4a3ce23c3a389 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20L=C3=BCtke-Stetzkamp?= Date: Sat, 7 Apr 2018 10:16:20 +0200 Subject: [PATCH] staging: mt7621-mmc: Remove constant flag MSDC_HIGHSPEED MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The MSDC_HIGHSPEED flag is always set and never unset, remove it to clean up the code. Signed-off-by: Christian Lütke-Stetzkamp Reviewed-by: NeilBrown Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mt7621-mmc/board.h | 1 - drivers/staging/mt7621-mmc/sd.c | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h index ca07608..312cd511 100644 --- a/drivers/staging/mt7621-mmc/board.h +++ b/drivers/staging/mt7621-mmc/board.h @@ -52,7 +52,6 @@ typedef void (*pm_callback_t)(pm_message_t state, void *data); #define MSDC_SDIO_IRQ (1 << 3) /* use internal sdio irq (bus) */ #define MSDC_EXT_SDIO_IRQ (1 << 4) /* use external sdio irq */ #define MSDC_REMOVABLE (1 << 5) /* removable slot */ -#define MSDC_HIGHSPEED (1 << 7) /* high-speed mode support */ #define MSDC_UHS1 (1 << 8) /* uhs-1 mode support */ #define MSDC_DDR (1 << 9) /* ddr mode support */ diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c index b42c1ea..feebeed 100644 --- a/drivers/staging/mt7621-mmc/sd.c +++ b/drivers/staging/mt7621-mmc/sd.c @@ -183,7 +183,7 @@ struct msdc_hw msdc0_hw = { .cmd_drv = 4, .dat_drv = 4, .data_offset = 0, - .flags = MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, + .flags = MSDC_CD_PIN_EN | MSDC_REMOVABLE, // .flags = MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE, }; @@ -2675,10 +2675,7 @@ static int msdc_drv_probe(struct platform_device *pdev) mmc->f_max = HOST_MAX_MCLK; mmc->ocr_avail = MSDC_OCR_AVAIL; - /* For sd card: MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED, - For sdio : MSDC_EXT_SDIO_IRQ | MSDC_HIGHSPEED */ - if (hw->flags & MSDC_HIGHSPEED) - mmc->caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; + mmc->caps = MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED; //TODO: read this as bus-width from dt (via mmc_of_parse) mmc->caps |= MMC_CAP_4_BIT_DATA; -- 2.7.4