Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1736564 > unrolled thread

[PATCH 1/1] drivers:usb: use setup_timer

Started byAllen Pais <allen.lkml@gmail.com>
First post2017-09-21 13:30 +0200
Last post2017-09-21 14:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] drivers:usb: use setup_timer Allen Pais <allen.lkml@gmail.com> - 2017-09-21 13:30 +0200
    Re: [PATCH 1/1] drivers:usb: use setup_timer Allen <allen.lkml@gmail.com> - 2017-09-21 14:40 +0200

#1736564 — [PATCH 1/1] drivers:usb: use setup_timer

FromAllen Pais <allen.lkml@gmail.com>
Date2017-09-21 13:30 +0200
Subject[PATCH 1/1] drivers:usb: use setup_timer
Message-ID<us7Q7-kv-29@gated-at.bofh.it>
    Use setup_timer function instead of initializing timer with the
    function and data fields.

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

[toc] | [next] | [standalone]


#1736626

FromAllen <allen.lkml@gmail.com>
Date2017-09-21 14:40 +0200
Message-ID<us8VP-Zu-9@gated-at.bofh.it>
In reply to#1736564
>
> subject should've been something like:
>
> usb: gadget: udc: omap: use setup_timer() helper
>
> Also, you should've Cced linux-usb@vger.kernel.org and
> linux-omap@vger.kernel.org
>
> On Thu, Sep 21, 2017 at 2:28 PM Allen Pais <allen.lkml@gmail.com> wrote:
>>
>>     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.


-- 
       - Allen

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web