This patch introduces the use of function setup_timer.
This is done using Coccinelle and semantic patch used is
as follows:
@@
expression x,y,z;
@@
- init_timer (&x);
+ setup_timer (&x, y, z);
- x.function = y;
- x.data = z;
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        cf = kzalloc(sizeof *cf, GFP_KERNEL);
        if (!cf)
                return -ENOMEM;
-       init_timer(&cf->timer);
-       cf->timer.function = omap_cf_timer;
-       cf->timer.data = (unsigned long) cf;
+       setup_timer(&cf->timer, omap_cf_timer, (unsigned long)cf);
 
        cf->pdev = pdev;
        platform_set_drvdata(pdev, cf);
 
 {
        int ret;
 
-       init_timer(&skt->poll_timer);
-       skt->poll_timer.function = soc_common_pcmcia_poll_event;
-       skt->poll_timer.data = (unsigned long)skt;
+       setup_timer(&skt->poll_timer, soc_common_pcmcia_poll_event,
+                   (unsigned long)skt);
        skt->poll_timer.expires = jiffies + SOC_PCMCIA_POLL_PERIOD;
 
        ret = request_resource(&iomem_resource, &skt->res_skt);