Commit d7b74e0d authored by Allen Pais's avatar Allen Pais Committed by Greg Kroah-Hartman

usb: mos7720: convert tasklets to use new tasklet_setup() API

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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200817090209.26351-8-allen.cryptic@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 81d324cd
...@@ -282,11 +282,12 @@ static void destroy_urbtracker(struct kref *kref) ...@@ -282,11 +282,12 @@ static void destroy_urbtracker(struct kref *kref)
* port callback had to be deferred because the disconnect mutex could not be * port callback had to be deferred because the disconnect mutex could not be
* obtained at the time. * obtained at the time.
*/ */
static void send_deferred_urbs(unsigned long _mos_parport) static void send_deferred_urbs(struct tasklet_struct *t)
{ {
int ret_val; int ret_val;
unsigned long flags; unsigned long flags;
struct mos7715_parport *mos_parport = (void *)_mos_parport; struct mos7715_parport *mos_parport = from_tasklet(mos_parport, t,
urb_tasklet);
struct urbtracker *urbtrack, *tmp; struct urbtracker *urbtrack, *tmp;
struct list_head *cursor, *next; struct list_head *cursor, *next;
struct device *dev; struct device *dev;
...@@ -716,8 +717,7 @@ static int mos7715_parport_init(struct usb_serial *serial) ...@@ -716,8 +717,7 @@ static int mos7715_parport_init(struct usb_serial *serial)
INIT_LIST_HEAD(&mos_parport->deferred_urbs); INIT_LIST_HEAD(&mos_parport->deferred_urbs);
usb_set_serial_data(serial, mos_parport); /* hijack private pointer */ usb_set_serial_data(serial, mos_parport); /* hijack private pointer */
mos_parport->serial = serial; mos_parport->serial = serial;
tasklet_init(&mos_parport->urb_tasklet, send_deferred_urbs, tasklet_setup(&mos_parport->urb_tasklet, send_deferred_urbs);
(unsigned long) mos_parport);
init_completion(&mos_parport->syncmsg_compl); init_completion(&mos_parport->syncmsg_compl);
/* cycle parallel port reset bit */ /* cycle parallel port reset bit */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment