diff options
author | Allen Pais <allen.lkml@gmail.com> | 2017-09-22 10:59:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-04 09:59:30 +0200 |
commit | eb72ca98e6b8cb7136e00b1774af4841e304bc9b (patch) | |
tree | c533ebec7df08e9ae738d52679326ca6f42f204b /drivers/usb/gadget/udc/dummy_hcd.c | |
parent | drivers: usb: speedtch: use setup_timer() helper. (diff) | |
download | linux-eb72ca98e6b8cb7136e00b1774af4841e304bc9b.tar.xz linux-eb72ca98e6b8cb7136e00b1774af4841e304bc9b.zip |
usb: gadget: udc: dummy_hcd: 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>
Diffstat (limited to 'drivers/usb/gadget/udc/dummy_hcd.c')
-rw-r--r-- | drivers/usb/gadget/udc/dummy_hcd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index a030d7923d7d..c9ac44d81d0c 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -2389,9 +2389,7 @@ static DEVICE_ATTR_RO(urbs); static int dummy_start_ss(struct dummy_hcd *dum_hcd) { - init_timer(&dum_hcd->timer); - dum_hcd->timer.function = dummy_timer; - dum_hcd->timer.data = (unsigned long)dum_hcd; + setup_timer(&dum_hcd->timer, dummy_timer, (unsigned long)dum_hcd); dum_hcd->rh_state = DUMMY_RH_RUNNING; dum_hcd->stream_en_ep = 0; INIT_LIST_HEAD(&dum_hcd->urbp_list); @@ -2420,9 +2418,7 @@ static int dummy_start(struct usb_hcd *hcd) return dummy_start_ss(dum_hcd); spin_lock_init(&dum_hcd->dum->lock); - init_timer(&dum_hcd->timer); - dum_hcd->timer.function = dummy_timer; - dum_hcd->timer.data = (unsigned long)dum_hcd; + setup_timer(&dum_hcd->timer, dummy_timer, (unsigned long)dum_hcd); dum_hcd->rh_state = DUMMY_RH_RUNNING; INIT_LIST_HEAD(&dum_hcd->urbp_list); |