[media] bt8xx: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Sun, 9 Apr 2017 01:33:59 +0000 (22:33 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 10 Apr 2017 17:46:46 +0000 (14:46 -0300)
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/bt8xx/bttv-driver.c

index fb4aefb..ed319f1 100644 (file)
@@ -4043,9 +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);
 
-       init_timer(&btv->timeout);
-       btv->timeout.function = bttv_irq_timeout;
-       btv->timeout.data     = (unsigned long)btv;
+       setup_timer(&btv->timeout, bttv_irq_timeout, (unsigned long)btv);
 
        btv->i2c_rc = -1;
        btv->tuner_type  = UNSET;