[PATCH 04/31] staging: mt7621-mmc: Remove unused field disable_cd_eirq

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

 



The disable_cd_eirq() field of msdc_hw is never set and only once
checked for being non zero, so it is deleted.

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

diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h
index ce33d599fe29..e4230770cd33 100644
--- a/drivers/staging/mt7621-mmc/board.h
+++ b/drivers/staging/mt7621-mmc/board.h
@@ -72,9 +72,6 @@ struct msdc_hw {
 	/* external sdio irq operations */
 	void (*enable_sdio_eirq)(void);
 	void (*disable_sdio_eirq)(void);
-
-	/* external cd irq operations */
-	void (*disable_cd_eirq)(void);
 };
 
 extern struct msdc_hw msdc0_hw;
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 12d7151d8686..226ffb2589a9 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -2467,21 +2467,17 @@ static void msdc_enable_cd_irq(struct msdc_host *host, int enable)
 		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();
-		} else {
-			if (hw->config_gpio_pin) /* NULL */
-				hw->config_gpio_pin(MSDC_CD_PIN, GPIO_PULL_DOWN);
+		if (hw->config_gpio_pin) /* NULL */
+			hw->config_gpio_pin(MSDC_CD_PIN, GPIO_PULL_DOWN);
 
-			sdr_clr_bits(SDC_CFG, SDC_CFG_INSWKUP);
-			sdr_clr_bits(MSDC_PS, MSDC_PS_CDEN);
-			sdr_clr_bits(MSDC_INTEN, MSDC_INTEN_CDSC);
+		sdr_clr_bits(SDC_CFG, SDC_CFG_INSWKUP);
+		sdr_clr_bits(MSDC_PS, MSDC_PS_CDEN);
+		sdr_clr_bits(MSDC_INTEN, MSDC_INTEN_CDSC);
 
-			/* Here decreases a reference count to core power since card
-			 * detection circuit is shutdown.
-			 */
-			//msdc_vcore_off(host);
-		}
+		/* Here decreases a reference count to core power since card
+		 * detection circuit is shutdown.
+		 */
+		//msdc_vcore_off(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