aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 37b55b095daf..0aa39975f33b 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2991,9 +2991,9 @@ no_dma:
2991 host->use_dma = TRANS_MODE_PIO; 2991 host->use_dma = TRANS_MODE_PIO;
2992} 2992}
2993 2993
2994static void dw_mci_cmd11_timer(unsigned long arg) 2994static void dw_mci_cmd11_timer(struct timer_list *t)
2995{ 2995{
2996 struct dw_mci *host = (struct dw_mci *)arg; 2996 struct dw_mci *host = from_timer(host, t, cmd11_timer);
2997 2997
2998 if (host->state != STATE_SENDING_CMD11) { 2998 if (host->state != STATE_SENDING_CMD11) {
2999 dev_warn(host->dev, "Unexpected CMD11 timeout\n"); 2999 dev_warn(host->dev, "Unexpected CMD11 timeout\n");
@@ -3005,9 +3005,9 @@ static void dw_mci_cmd11_timer(unsigned long arg)
3005 tasklet_schedule(&host->tasklet); 3005 tasklet_schedule(&host->tasklet);
3006} 3006}
3007 3007
3008static void dw_mci_cto_timer(unsigned long arg) 3008static void dw_mci_cto_timer(struct timer_list *t)
3009{ 3009{
3010 struct dw_mci *host = (struct dw_mci *)arg; 3010 struct dw_mci *host = from_timer(host, t, cto_timer);
3011 unsigned long irqflags; 3011 unsigned long irqflags;
3012 u32 pending; 3012 u32 pending;
3013 3013
@@ -3060,9 +3060,9 @@ exit:
3060 spin_unlock_irqrestore(&host->irq_lock, irqflags); 3060 spin_unlock_irqrestore(&host->irq_lock, irqflags);
3061} 3061}
3062 3062
3063static void dw_mci_dto_timer(unsigned long arg) 3063static void dw_mci_dto_timer(struct timer_list *t)
3064{ 3064{
3065 struct dw_mci *host = (struct dw_mci *)arg; 3065 struct dw_mci *host = from_timer(host, t, dto_timer);
3066 unsigned long irqflags; 3066 unsigned long irqflags;
3067 u32 pending; 3067 u32 pending;
3068 3068
@@ -3257,14 +3257,9 @@ int dw_mci_probe(struct dw_mci *host)
3257 } 3257 }
3258 } 3258 }
3259 3259
3260 setup_timer(&host->cmd11_timer, 3260 timer_setup(&host->cmd11_timer, dw_mci_cmd11_timer, 0);
3261 dw_mci_cmd11_timer, (unsigned long)host); 3261 timer_setup(&host->cto_timer, dw_mci_cto_timer, 0);
3262 3262 timer_setup(&host->dto_timer, dw_mci_dto_timer, 0);
3263 setup_timer(&host->cto_timer,
3264 dw_mci_cto_timer, (unsigned long)host);
3265
3266 setup_timer(&host->dto_timer,
3267 dw_mci_dto_timer, (unsigned long)host);
3268 3263
3269 spin_lock_init(&host->lock); 3264 spin_lock_init(&host->lock);
3270 spin_lock_init(&host->irq_lock); 3265 spin_lock_init(&host->irq_lock);