mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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/) // <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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5d31a6dc78
commit
886f310b0a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user