]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
dmaengine: ioat: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Sun, 9 Apr 2017 01:41:30 +0000 (09:41 +0800)
committerVinod Koul <vinod.koul@intel.com>
Mon, 24 Apr 2017 04:08:41 +0000 (09:38 +0530)
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/ioat/init.c

index cc5259b881d47ffa48322e2a537397317e8b8be1..6ad4384b3fa871cccb8c46cf8e934a10a6b4452b 100644 (file)
@@ -760,9 +760,7 @@ ioat_init_channel(struct ioatdma_device *ioat_dma,
        dma_cookie_init(&ioat_chan->dma_chan);
        list_add_tail(&ioat_chan->dma_chan.device_node, &dma->channels);
        ioat_dma->idx[idx] = ioat_chan;
-       init_timer(&ioat_chan->timer);
-       ioat_chan->timer.function = ioat_timer_event;
-       ioat_chan->timer.data = data;
+       setup_timer(&ioat_chan->timer, ioat_timer_event, data);
        tasklet_init(&ioat_chan->cleanup_task, ioat_cleanup_event, data);
 }