Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] s2255drv: Use setup_timer

Convert a call to init_timer and accompanying intializations of
the timer's data and function fields to a call to setup_timer.

A simplified version of the semantic match that fixes this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression t,f,d;
@@

-init_timer(&t);
+setup_timer(&t,f,d);
-t.function = f;
-t.data = d;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Julia Lawall and committed by
Mauro Carvalho Chehab
8bf554ca 30a8f2a0

+1 -3
+1 -3
drivers/media/usb/s2255/s2255drv.c
··· 2274 2274 dev_err(&interface->dev, "Could not find bulk-in endpoint\n"); 2275 2275 goto errorEP; 2276 2276 } 2277 - init_timer(&dev->timer); 2278 - dev->timer.function = s2255_timer; 2279 - dev->timer.data = (unsigned long)dev->fw_data; 2277 + setup_timer(&dev->timer, s2255_timer, (unsigned long)dev->fw_data); 2280 2278 init_waitqueue_head(&dev->fw_data->wait_fw); 2281 2279 for (i = 0; i < MAX_CHANNELS; i++) { 2282 2280 struct s2255_vc *vc = &dev->vc[i];