[PATCH 02/10] staging: mt7621-mmc: Remove constant flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The MSDC_SYS_SUSPEND flag is always set and is never unset. Removing
it cleans up the code.

Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx>
---
 drivers/staging/mt7621-mmc/board.h | 1 -
 drivers/staging/mt7621-mmc/sd.c    | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h
index aa62a7243c80..ca07608b8f44 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_SYS_SUSPEND    (1 << 6)  /* suspended by system           */
 #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 63ec0e7360bc..a2e7341372be 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -184,8 +184,8 @@ struct msdc_hw msdc0_hw = {
 	.cmd_drv        = 4,
 	.dat_drv        = 4,
 	.data_offset    = 0,
-	.flags          = MSDC_SYS_SUSPEND | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,
-//	.flags          = MSDC_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,
+	.flags          = MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,
+//	.flags          = MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE,
 };
 
 /* end of +++ */
@@ -2700,7 +2700,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_SYS_SUSPEND | MSDC_WP_PIN_EN | MSDC_CD_PIN_EN | MSDC_REMOVABLE | MSDC_HIGHSPEED,
+	/* 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;
@@ -2874,7 +2874,7 @@ static void msdc_drv_pm(struct platform_device *pdev, pm_message_t state)
 	struct mmc_host *mmc = platform_get_drvdata(pdev);
 	struct msdc_host *host = mmc_priv(mmc);
 
-	if (mmc && (host->hw->flags & MSDC_SYS_SUSPEND))
+	if (mmc)
 		msdc_pm(state, (void *)host);
 }
 
-- 
2.16.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux