linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] usb: hcd: convert tasklets to use new tasklet_setup() API
@ 2020-08-19 10:08 Andy Shevchenko
  2020-08-28  7:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2020-08-19 10:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-usb; +Cc: Andy Shevchenko

In preparation for unconditionally passing the struct tasklet_struct
pointer to all tasklet callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/usb/core/hcd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index a33b849e8beb..2c6b9578a7d3 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1657,9 +1657,9 @@ static void __usb_hcd_giveback_urb(struct urb *urb)
 	usb_put_urb(urb);
 }
 
-static void usb_giveback_urb_bh(unsigned long param)
+static void usb_giveback_urb_bh(struct tasklet_struct *t)
 {
-	struct giveback_urb_bh *bh = (struct giveback_urb_bh *)param;
+	struct giveback_urb_bh *bh = from_tasklet(bh, t, bh);
 	struct list_head local_list;
 
 	spin_lock_irq(&bh->lock);
@@ -2403,7 +2403,7 @@ static void init_giveback_urb_bh(struct giveback_urb_bh *bh)
 
 	spin_lock_init(&bh->lock);
 	INIT_LIST_HEAD(&bh->head);
-	tasklet_init(&bh->bh, usb_giveback_urb_bh, (unsigned long)bh);
+	tasklet_setup(&bh->bh, usb_giveback_urb_bh);
 }
 
 struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver,
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] usb: hcd: convert tasklets to use new tasklet_setup() API
  2020-08-19 10:08 [PATCH v1] usb: hcd: convert tasklets to use new tasklet_setup() API Andy Shevchenko
@ 2020-08-28  7:51 ` Greg Kroah-Hartman
  2020-08-28  8:00   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2020-08-28  7:51 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-usb

On Wed, Aug 19, 2020 at 01:08:26PM +0300, Andy Shevchenko wrote:
> In preparation for unconditionally passing the struct tasklet_struct
> pointer to all tasklet callbacks, switch to using the new tasklet_setup()
> and from_tasklet() to pass the tasklet pointer explicitly.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Does not apply to my tree as I think someone already did all of these
conversions.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] usb: hcd: convert tasklets to use new tasklet_setup() API
  2020-08-28  7:51 ` Greg Kroah-Hartman
@ 2020-08-28  8:00   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-08-28  8:00 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Andy Shevchenko, USB

On Fri, Aug 28, 2020 at 10:53 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Wed, Aug 19, 2020 at 01:08:26PM +0300, Andy Shevchenko wrote:
> > In preparation for unconditionally passing the struct tasklet_struct
> > pointer to all tasklet callbacks, switch to using the new tasklet_setup()
> > and from_tasklet() to pass the tasklet pointer explicitly.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Does not apply to my tree as I think someone already did all of these
> conversions.

Yes, that is the case.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-28  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-19 10:08 [PATCH v1] usb: hcd: convert tasklets to use new tasklet_setup() API Andy Shevchenko
2020-08-28  7:51 ` Greg Kroah-Hartman
2020-08-28  8:00   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).