Skip to contentSkip to conversation

drivers:usb: use setup_timer

PATCH In review Allen Pais 1 participant 2 messages Sep 21, 2017 1 message not in the archive USB

lore
Share & tools
lore

Allen Pais

author
#0 lore raw

PATCH 1/1 drivers:usb: use setup_timer

Use setup_timer function instead of initializing timer with the function and data fields.

---
 drivers/usb/gadget/udc/omap_udc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/usb/gadget/udc/omap_udc.c +1 -3
index f05ba68..b4e4c70 100644
@@ -2546,9 +2546,7 @@ omap_ep_setup(char *name, u8 addr, u8 type,
 		}
 		if (dbuf && addr)
 			epn_rxtx |= UDC_EPN_RX_DB;
-		init_timer(&ep->timer);
-		ep->timer.function = pio_out_timer;
-		ep->timer.data = (unsigned long) ep;
+		setup_timer(&ep->timer, pio_out_timer, (unsigned long)ep);
 	}
 	if (addr)
 		epn_rxtx |= UDC_EPN_RX_VALID;
Signature · 1 line
2.7.4

A message that is not in the archive (sent off-list or not yet received): CAH8TKc-F0=cL-YBetuM_5LShEjWpwAic+T8Wy7eBKhv5d6c6Zg@mail.gmail.com

author
#2 lore raw
Quoted 10 lines

subject should've been something like:

usb: gadget: udc: omap: use setup_timer() helper

Also, you should've Cced [email protected] and [email protected]

Quoted 1 line · Allen Pais
Quoted 8 lines
Quoted 2 lines

Use setup_timer function instead of initializing timer with the function and data fields.

the spaces a the beginning of each line are pointless, please remove.

Other than that, patch looks good. Please fix these details and resend.

Sure.

Signature · 1 line
       - Allen