]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] fsl-viu: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Sun, 9 Apr 2017 01:34:04 +0000 (22:34 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 10 Apr 2017 17:55:57 +0000 (14:55 -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/platform/fsl-viu.c

index ae8c6b35a3571114b55f9fd3bb47bd33affed4d1..97e164b2075a4ffebc53dbba66ef5e355845e72a 100644 (file)
@@ -1466,9 +1466,8 @@ static int viu_of_probe(struct platform_device *op)
        viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad,
                        "saa7113", VIU_VIDEO_DECODER_ADDR, NULL);
 
-       viu_dev->vidq.timeout.function = viu_vid_timeout;
-       viu_dev->vidq.timeout.data     = (unsigned long)viu_dev;
-       init_timer(&viu_dev->vidq.timeout);
+       setup_timer(&viu_dev->vidq.timeout, viu_vid_timeout,
+                   (unsigned long)viu_dev);
        viu_dev->std = V4L2_STD_NTSC_M;
        viu_dev->first = 1;