summaryrefslogtreecommitdiff
path: root/drivers/media/pci/bt8xx/bttv-driver.c
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/bt8xx/bttv-driver.c
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/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 227086a2e99c..b366a7e1d976 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -3652,9 +3652,9 @@ bttv_irq_wakeup_vbi(struct bttv *btv, struct bttv_buffer *wakeup,
wake_up(&wakeup->vb.done);
}
-static void bttv_irq_timeout(unsigned long data)
+static void bttv_irq_timeout(struct timer_list *t)
{
- struct bttv *btv = (struct bttv *)data;
+ struct bttv *btv = from_timer(btv, t, timeout);
struct bttv_buffer_set old,new;
struct bttv_buffer *ovbi;
struct bttv_buffer *item;
@@ -4043,7 +4043,7 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
INIT_LIST_HEAD(&btv->capture);
INIT_LIST_HEAD(&btv->vcapture);
- setup_timer(&btv->timeout, bttv_irq_timeout, (unsigned long)btv);
+ timer_setup(&btv->timeout, bttv_irq_timeout, 0);
btv->i2c_rc = -1;
btv->tuner_type = UNSET;