[PATCH 03/31] staging: mt7621-mmc: Remove unused field enable_cd_eirq from msdc_hw

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

 



The enable_cd_eirq() field of msdc_hw is never set and only once
checked for not being zero, so it is removed.

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

diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h
index 833d8770fc46..ce33d599fe29 100644
--- a/drivers/staging/mt7621-mmc/board.h
+++ b/drivers/staging/mt7621-mmc/board.h
@@ -74,7 +74,6 @@ struct msdc_hw {
 	void (*disable_sdio_eirq)(void);
 
 	/* external cd irq operations */
-	void (*enable_cd_eirq)(void);
 	void (*disable_cd_eirq)(void);
 };
 
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 8c08a99a0bbf..12d7151d8686 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -2453,23 +2453,19 @@ static void msdc_enable_cd_irq(struct msdc_host *host, int enable)
 	N_MSG(CFG, "CD IRQ Eanable(%d)", enable);
 
 	if (enable) {
-		if (hw->enable_cd_eirq) { /* not set, never enter */
-			hw->enable_cd_eirq();
-		} else {
-			/* card detection circuit relies on the core power so that the core power
-			 * shouldn't be turned off. Here adds a reference count to keep
-			 * the core power alive.
-			 */
-			//msdc_vcore_on(host); //did in msdc_init_hw()
+		/* card detection circuit relies on the core power so that the core power
+		 * shouldn't be turned off. Here adds a reference count to keep
+		 * the core power alive.
+		 */
+		//msdc_vcore_on(host); //did in msdc_init_hw()
 
-			if (hw->config_gpio_pin) /* NULL */
-				hw->config_gpio_pin(MSDC_CD_PIN, GPIO_PULL_UP);
+		if (hw->config_gpio_pin) /* NULL */
+			hw->config_gpio_pin(MSDC_CD_PIN, GPIO_PULL_UP);
 
-			sdr_set_field(MSDC_PS, MSDC_PS_CDDEBOUNCE, DEFAULT_DEBOUNCE);
-			sdr_set_bits(MSDC_PS, MSDC_PS_CDEN);
-			sdr_set_bits(MSDC_INTEN, MSDC_INTEN_CDSC);
-			sdr_set_bits(SDC_CFG, SDC_CFG_INSWKUP);  /* not in document! Fix me */
-		}
+		sdr_set_field(MSDC_PS, MSDC_PS_CDDEBOUNCE, DEFAULT_DEBOUNCE);
+		sdr_set_bits(MSDC_PS, MSDC_PS_CDEN);
+		sdr_set_bits(MSDC_INTEN, MSDC_INTEN_CDSC);
+		sdr_set_bits(SDC_CFG, SDC_CFG_INSWKUP);  /* not in document! Fix me */
 	} else {
 		if (hw->disable_cd_eirq) {
 			hw->disable_cd_eirq();
-- 
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