All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] usb: gadget: udc: omap: use setup_timer() helper
@ 2017-09-21 12:35 Allen Pais
  0 siblings, 0 replies; only message in thread
From: Allen Pais @ 2017-09-21 12:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: balbi, gregkh, Allen Pais

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

    V2: fixed the subject line and spaces.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 drivers/usb/gadget/udc/omap_udc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c
index f05ba68..b4e4c70 100644
--- a/drivers/usb/gadget/udc/omap_udc.c
+++ b/drivers/usb/gadget/udc/omap_udc.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-21 12:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-21 12:35 [PATCH v2 1/1] usb: gadget: udc: omap: use setup_timer() helper Allen Pais

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.