Skip to content

Commit

Permalink
usb: gadget: udc: snps_udc_core: use setup_timer() helper.
Browse files Browse the repository at this point in the history
   Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Allen Pais authored and Greg Kroah-Hartman committed Oct 4, 2017
1 parent eb72ca9 commit fb9bbce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/usb/gadget/udc/snps_udc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3207,13 +3207,9 @@ int udc_probe(struct udc *dev)
goto finished;

/* timer init */
init_timer(&udc_timer);
udc_timer.function = udc_timer_function;
udc_timer.data = 1;
setup_timer(&udc_timer, udc_timer_function, 1);
/* timer pollstall init */
init_timer(&udc_pollstall_timer);
udc_pollstall_timer.function = udc_pollstall_timer_function;
udc_pollstall_timer.data = 1;
setup_timer(&udc_pollstall_timer, udc_pollstall_timer_function, 1);

/* set SD */
reg = readl(&dev->regs->ctl);
Expand Down

0 comments on commit fb9bbce

Please sign in to comment.