summaryrefslogtreecommitdiff
path: root/drivers/media/pci/netup_unidvb
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 11:22:42 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-31 07:24:43 -0400
commit162e6376ac58440beb6a2d2ee294f5d88ea58dd1 (patch)
tree0802a11fe15c0531313d5374a54017fb5dfbeeab /drivers/media/pci/netup_unidvb
parent3ddad1ae10c23a700e060edab11eb13ec01ea380 (diff)
media: pci: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Andy Walls <awalls@md.metrocast.net> Cc: Sergey Kozlov <serjk@netup.ru> Cc: Abylay Ospan <aospan@netup.ru> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Cc: Arvind Yadav <arvind.yadav.cs@gmail.com> Cc: Geliang Tang <geliangtang@gmail.com> Cc: Sean Young <sean@mess.org> Cc: "Pali Rohár" <pali.rohar@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> [hans.verkuil@cisco.com: dropped pci/ttpci/av7110_ir.c patch chunk] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/netup_unidvb')
-rw-r--r--drivers/media/pci/netup_unidvb/netup_unidvb_core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
index 60e6cd5b3a03..11829c0fa138 100644
--- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
+++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
@@ -638,9 +638,9 @@ static void netup_unidvb_queue_cleanup(struct netup_dma *dma)
spin_unlock_irqrestore(&dma->lock, flags);
}
-static void netup_unidvb_dma_timeout(unsigned long data)
+static void netup_unidvb_dma_timeout(struct timer_list *t)
{
- struct netup_dma *dma = (struct netup_dma *)data;
+ struct netup_dma *dma = from_timer(dma, t, timeout);
struct netup_unidvb_dev *ndev = dma->ndev;
dev_dbg(&ndev->pci_dev->dev, "%s()\n", __func__);
@@ -664,8 +664,7 @@ static int netup_unidvb_dma_init(struct netup_unidvb_dev *ndev, int num)
spin_lock_init(&dma->lock);
INIT_WORK(&dma->work, netup_unidvb_dma_worker);
INIT_LIST_HEAD(&dma->free_buffers);
- setup_timer(&dma->timeout, netup_unidvb_dma_timeout,
- (unsigned long)dma);
+ timer_setup(&dma->timeout, netup_unidvb_dma_timeout, 0);
dma->ring_buffer_size = ndev->dma_size / 2;
dma->addr_virt = ndev->dma_virt + dma->ring_buffer_size * num;
dma->addr_phys = (dma_addr_t)((u64)ndev->dma_phys +