From: Julia Lawall Date: Fri, 26 Dec 2014 14:35:54 +0000 (+0100) Subject: usb: r8a66597-hcd: Use setup_timer X-Git-Tag: v4.14-rc1~5941^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=886f310b0aee256103822e7e3062861c3357e87e;p=platform%2Fkernel%2Flinux-rpi.git usb: r8a66597-hcd: 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/) // @@ expression t,f,d; @@ -init_timer(&t); +setup_timer(&t,f,d); -t.function = f; -t.data = d; // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index c4bcfae..a048b8e 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -2483,9 +2483,8 @@ static int r8a66597_probe(struct platform_device *pdev) r8a66597->max_root_hub = 2; spin_lock_init(&r8a66597->lock); - init_timer(&r8a66597->rh_timer); - r8a66597->rh_timer.function = r8a66597_timer; - r8a66597->rh_timer.data = (unsigned long)r8a66597; + setup_timer(&r8a66597->rh_timer, r8a66597_timer, + (unsigned long)r8a66597); r8a66597->reg = reg; /* make sure no interrupts are pending */ @@ -2496,9 +2495,8 @@ static int r8a66597_probe(struct platform_device *pdev) for (i = 0; i < R8A66597_MAX_NUM_PIPE; i++) { INIT_LIST_HEAD(&r8a66597->pipe_queue[i]); - init_timer(&r8a66597->td_timer[i]); - r8a66597->td_timer[i].function = r8a66597_td_timer; - r8a66597->td_timer[i].data = (unsigned long)r8a66597; + setup_timer(&r8a66597->td_timer[i], r8a66597_td_timer, + (unsigned long)r8a66597); setup_timer(&r8a66597->interval_timer[i], r8a66597_interval_timer, (unsigned long)r8a66597);