diff options
author | Vinod Koul <vinod.koul@intel.com> | 2017-11-14 00:07:18 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-11-14 00:07:18 -0500 |
commit | 40b4ed1a1a214d9da3db0298b2079103a9a7e32a (patch) | |
tree | 1cae6c386a574a8f7852e0d3d7bb9f1020e382a1 /drivers | |
parent | 8e6c1db351168393d8d4bfbcb1782cbf42d9ff74 (diff) | |
parent | bcdc4bd356c76a5bab2f480a73f089dc8e0e4e89 (diff) |
Merge branch 'topic/timer_api' into for-linus
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/imx-dma.c | 8 | ||||
-rw-r--r-- | drivers/dma/ioat/dma.c | 6 | ||||
-rw-r--r-- | drivers/dma/ioat/dma.h | 3 | ||||
-rw-r--r-- | drivers/dma/ioat/init.c | 2 |
4 files changed, 8 insertions, 11 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index f681df8f0ed3..331f863c605e 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c | |||
@@ -364,9 +364,9 @@ static void imxdma_disable_hw(struct imxdma_channel *imxdmac) | |||
364 | local_irq_restore(flags); | 364 | local_irq_restore(flags); |
365 | } | 365 | } |
366 | 366 | ||
367 | static void imxdma_watchdog(unsigned long data) | 367 | static void imxdma_watchdog(struct timer_list *t) |
368 | { | 368 | { |
369 | struct imxdma_channel *imxdmac = (struct imxdma_channel *)data; | 369 | struct imxdma_channel *imxdmac = from_timer(imxdmac, t, watchdog); |
370 | struct imxdma_engine *imxdma = imxdmac->imxdma; | 370 | struct imxdma_engine *imxdma = imxdmac->imxdma; |
371 | int channel = imxdmac->channel; | 371 | int channel = imxdmac->channel; |
372 | 372 | ||
@@ -1153,9 +1153,7 @@ static int __init imxdma_probe(struct platform_device *pdev) | |||
1153 | } | 1153 | } |
1154 | 1154 | ||
1155 | imxdmac->irq = irq + i; | 1155 | imxdmac->irq = irq + i; |
1156 | init_timer(&imxdmac->watchdog); | 1156 | timer_setup(&imxdmac->watchdog, imxdma_watchdog, 0); |
1157 | imxdmac->watchdog.function = &imxdma_watchdog; | ||
1158 | imxdmac->watchdog.data = (unsigned long)imxdmac; | ||
1159 | } | 1157 | } |
1160 | 1158 | ||
1161 | imxdmac->imxdma = imxdma; | 1159 | imxdmac->imxdma = imxdma; |
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index f70cc74032ea..58d4ccd33672 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -474,7 +474,7 @@ int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs) | |||
474 | if (time_is_before_jiffies(ioat_chan->timer.expires) | 474 | if (time_is_before_jiffies(ioat_chan->timer.expires) |
475 | && timer_pending(&ioat_chan->timer)) { | 475 | && timer_pending(&ioat_chan->timer)) { |
476 | mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT); | 476 | mod_timer(&ioat_chan->timer, jiffies + COMPLETION_TIMEOUT); |
477 | ioat_timer_event((unsigned long)ioat_chan); | 477 | ioat_timer_event(&ioat_chan->timer); |
478 | } | 478 | } |
479 | 479 | ||
480 | return -ENOMEM; | 480 | return -ENOMEM; |
@@ -862,9 +862,9 @@ static void check_active(struct ioatdma_chan *ioat_chan) | |||
862 | mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT); | 862 | mod_timer(&ioat_chan->timer, jiffies + IDLE_TIMEOUT); |
863 | } | 863 | } |
864 | 864 | ||
865 | void ioat_timer_event(unsigned long data) | 865 | void ioat_timer_event(struct timer_list *t) |
866 | { | 866 | { |
867 | struct ioatdma_chan *ioat_chan = to_ioat_chan((void *)data); | 867 | struct ioatdma_chan *ioat_chan = from_timer(ioat_chan, t, timer); |
868 | dma_addr_t phys_complete; | 868 | dma_addr_t phys_complete; |
869 | u64 status; | 869 | u64 status; |
870 | 870 | ||
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h index 56200eefcf5e..1ab42ec2b7ff 100644 --- a/drivers/dma/ioat/dma.h +++ b/drivers/dma/ioat/dma.h | |||
@@ -406,10 +406,9 @@ enum dma_status | |||
406 | ioat_tx_status(struct dma_chan *c, dma_cookie_t cookie, | 406 | ioat_tx_status(struct dma_chan *c, dma_cookie_t cookie, |
407 | struct dma_tx_state *txstate); | 407 | struct dma_tx_state *txstate); |
408 | void ioat_cleanup_event(unsigned long data); | 408 | void ioat_cleanup_event(unsigned long data); |
409 | void ioat_timer_event(unsigned long data); | 409 | void ioat_timer_event(struct timer_list *t); |
410 | int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs); | 410 | int ioat_check_space_lock(struct ioatdma_chan *ioat_chan, int num_descs); |
411 | void ioat_issue_pending(struct dma_chan *chan); | 411 | void ioat_issue_pending(struct dma_chan *chan); |
412 | void ioat_timer_event(unsigned long data); | ||
413 | 412 | ||
414 | /* IOAT Init functions */ | 413 | /* IOAT Init functions */ |
415 | bool is_bwd_ioat(struct pci_dev *pdev); | 414 | bool is_bwd_ioat(struct pci_dev *pdev); |
diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c index 93e006c3441d..2f31d3d0caa6 100644 --- a/drivers/dma/ioat/init.c +++ b/drivers/dma/ioat/init.c | |||
@@ -760,7 +760,7 @@ ioat_init_channel(struct ioatdma_device *ioat_dma, | |||
760 | dma_cookie_init(&ioat_chan->dma_chan); | 760 | dma_cookie_init(&ioat_chan->dma_chan); |
761 | list_add_tail(&ioat_chan->dma_chan.device_node, &dma->channels); | 761 | list_add_tail(&ioat_chan->dma_chan.device_node, &dma->channels); |
762 | ioat_dma->idx[idx] = ioat_chan; | 762 | ioat_dma->idx[idx] = ioat_chan; |
763 | setup_timer(&ioat_chan->timer, ioat_timer_event, data); | 763 | timer_setup(&ioat_chan->timer, ioat_timer_event, 0); |
764 | tasklet_init(&ioat_chan->cleanup_task, ioat_cleanup_event, data); | 764 | tasklet_init(&ioat_chan->cleanup_task, ioat_cleanup_event, data); |
765 | } | 765 | } |
766 | 766 | ||