usb: gadget: udc: snps_udc_core: use setup_timer() helper.

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>
This commit is contained in:
Allen Pais 2017-09-22 14:29:43 +05:30 committed by Greg Kroah-Hartman
parent eb72ca98e6
commit fb9bbce6e6
1 changed files with 2 additions and 6 deletions

View File

@ -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);