[PATCH 7/8] staging: mt7621-mmc: Remove old references to tasklet

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

 



In the current code there are '#if 0' out references on using a
tasklet instead of delayed_work. Removing these improves readability.

Signed-off-by: Christian Lütke-Stetzkamp <christian@xxxxxxxx>
Reviewed-by: NeilBrown <neil@xxxxxxxxx>
---
 drivers/staging/mt7621-mmc/mt6575_sd.h |  1 -
 drivers/staging/mt7621-mmc/sd.c        | 23 -----------------------
 2 files changed, 24 deletions(-)

diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h
index ce14881d8fda..ae9b36a0bd45 100644
--- a/drivers/staging/mt7621-mmc/mt6575_sd.h
+++ b/drivers/staging/mt7621-mmc/mt6575_sd.h
@@ -931,7 +931,6 @@ struct msdc_host {
 
 	int                         irq;            /* host interrupt */
 
-	struct tasklet_struct       card_tasklet;
 #if 0
 	struct work_struct		card_workqueue;
 #else
diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.c
index 9476728c925c..ae70f9d0b346 100644
--- a/drivers/staging/mt7621-mmc/sd.c
+++ b/drivers/staging/mt7621-mmc/sd.c
@@ -485,16 +485,10 @@ static void msdc_set_timeout(struct msdc_host *host, u32 ns, u32 clks)
 	      ns, clks, timeout + 1);
 }
 
-#if 0
-static void msdc_tasklet_card(unsigned long arg)
-{
-	struct msdc_host *host = (struct msdc_host *)arg;
-#else
 static void msdc_tasklet_card(struct work_struct *work)
 {
 	struct msdc_host *host = (struct msdc_host *)container_of(work,
 				struct msdc_host, card_delaywork.work);
-#endif
 	void __iomem *base = host->base;
 	u32 inserted;
 	u32 status = 0;
@@ -2210,11 +2204,7 @@ static irqreturn_t msdc_irq(int irq, void *dev_id)
 		if (host->mmc->caps & MMC_CAP_NEEDS_POLL)
 			return IRQ_HANDLED;
 		IRQ_MSG("MSDC_INT_CDSC irq<0x%.8x>", intsts);
-#if 0 /* ---/+++ by chhung: fix slot mechanical bounce issue */
-		tasklet_hi_schedule(&host->card_tasklet);
-#else
 		schedule_delayed_work(&host->card_delaywork, HZ);
-#endif
 		/* tuning when plug card ? */
 	}
 
@@ -2617,11 +2607,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
 	}
 	msdc_init_gpd_bd(host, &host->dma);
 
-#if 0
-	tasklet_init(&host->card_tasklet, msdc_tasklet_card, (ulong)host);
-#else
 	INIT_DELAYED_WORK(&host->card_delaywork, msdc_tasklet_card);
-#endif
 	spin_lock_init(&host->lock);
 	msdc_init_hw(host);
 
@@ -2655,12 +2641,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
 release:
 	platform_set_drvdata(pdev, NULL);
 	msdc_deinit_hw(host);
-
-#if 0
-	tasklet_kill(&host->card_tasklet);
-#else
 	cancel_delayed_work_sync(&host->card_delaywork);
-#endif
 
 release_mem:
 	if (host->dma.gpd)
@@ -2693,11 +2674,7 @@ static int msdc_drv_remove(struct platform_device *pdev)
 	mmc_remove_host(host->mmc);
 	msdc_deinit_hw(host);
 
-#if 0
-	tasklet_kill(&host->card_tasklet);
-#else
 	cancel_delayed_work_sync(&host->card_delaywork);
-#endif
 
 	dma_free_coherent(&pdev->dev, MAX_GPD_NUM * sizeof(struct gpd),
 			  host->dma.gpd, host->dma.gpd_addr);
-- 
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