[PATCH 31/34] staging: mt7621-mmc: Remove dead codepath from probe function

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

 



The probe function contains lots of code, that is never used, because
the fields it checks for in the msdc_hw structure are never
initialized. Removing them should be safe.

Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx>
---
 drivers/staging/mt7621-mmc/sd.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index acee35282678..86b2f4e0833c 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -153,7 +153,6 @@
 static struct msdc_regs *msdc_reg[HOST_MAX_NUM];
 #endif
 
-
 static int cd_active_low = 1;
 
 //=================================
@@ -2807,25 +2806,6 @@ static int msdc_drv_probe(struct platform_device *pdev)
 		goto release;
 	// mt65xx_irq_unmask(irq); /* --- by chhung */
 
-	if (hw->flags & MSDC_CD_PIN_EN) { /* not set for sdio */
-		if (hw->request_cd_eirq) { /* not set for MT6575 */
-			hw->request_cd_eirq(msdc_eirq_cd, (void *)host); /* msdc_eirq_cd will not be used! */
-		}
-	}
-
-	if (hw->request_sdio_eirq) /* set to combo_sdio_request_eirq() for WIFI */
-		hw->request_sdio_eirq(msdc_eirq_sdio, (void *)host); /* msdc_eirq_sdio() will be called when EIRQ */
-
-	if (hw->register_pm) {/* yes for sdio */
-#ifdef CONFIG_PM
-		hw->register_pm(msdc_pm, (void *)host);  /* combo_sdio_register_pm() */
-#endif
-		if (hw->flags & MSDC_SYS_SUSPEND) { /* will not set for WIFI */
-			ERR_MSG("MSDC_SYS_SUSPEND and register_pm both set");
-		}
-		//mmc->pm_flags |= MMC_PM_IGNORE_PM_NOTIFY; /* pm not controlled by system but by client. */ /* --- by chhung */
-	}
-
 	platform_set_drvdata(pdev, mmc);
 
 	ret = mmc_add_host(mmc);
-- 
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