usb: convert tasklets to use new tasklet_setup()
Subsystems (7)
cover usb: convert tasklets to use new tasklet_setup()
From: Allen Pais <[email protected]>
Commit 12cc923f1ccc ("tasklet: Introduce new initialization API")' introduced a new tasklet initialization API. This series converts all the usb drivers to use the new tasklet_setup() API
Allen Pais (7):
usb: atm: convert tasklets to use new tasklet_setup() API
usb: c67x00: convert tasklets to use new tasklet_setup() API
usb: hcd: convert tasklets to use new tasklet_setup() API usb/gadget: f_midi: convert tasklets to use new tasklet_setup() API usb/gadget: fsl_qe_udc: convert tasklets to use new tasklet_setup()
API
usb: xhci: convert tasklets to use new tasklet_setup() API
usb: mos7720: convert tasklets to use new tasklet_setup() API
drivers/usb/atm/usbatm.c | 14 ++++++++------ drivers/usb/c67x00/c67x00-sched.c | 7 +++---- drivers/usb/core/hcd.c | 6 +++--- drivers/usb/gadget/function/f_midi.c | 6 +++--- drivers/usb/gadget/udc/fsl_qe_udc.c | 7 +++---- drivers/usb/host/xhci-dbgtty.c | 6 +++--- drivers/usb/serial/mos7720.c | 8 ++++---- 7 files changed, 27 insertions(+), 27 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/7 usb: atm: convert tasklets to use new tasklet_setup() API
From: Allen Pais <[email protected]>
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.
--- drivers/usb/atm/usbatm.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/usb/atm/usbatm.c +8 -6
@@ -511,9 +511,10 @@ static unsigned int usbatm_write_cells(struct usbatm_data *instance,** receive ** **************/ -static void usbatm_rx_process (unsigned long data) +static void usbatm_rx_process (struct tasklet_struct *t) { -struct usbatm_data *instance = (struct usbatm_data *)data; +struct usbatm_data *instance =from_tasklet (instance, t, + rx_channel.tasklet);struct urb *urb;while ((urb =usbatm_pop_urb (&instance->rx_channel))) {
@@ -564,9 +565,10 @@ static void usbatm_rx_process(unsigned long data)** send ** ***********/ -static void usbatm_tx_process (unsigned long data) +static void usbatm_tx_process (struct tasklet_struct *t) { -struct usbatm_data *instance = (struct usbatm_data *)data; +struct usbatm_data *instance =from_tasklet (instance, t, + tx_channel.tasklet);struct sk_buff *skb = instance->current_skb;struct urb *urb =NULL ;const unsigned int buf_size = instance->tx_channel.buf_size;
@@ -1069,8 +1071,8 @@ int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,usbatm_init_channel (&instance->rx_channel);usbatm_init_channel (&instance->tx_channel); -tasklet_init (&instance->rx_channel.tasklet, usbatm_rx_process, (unsigned long )instance); -tasklet_init (&instance->tx_channel.tasklet, usbatm_tx_process, (unsigned long )instance); +tasklet_setup (&instance->rx_channel.tasklet, usbatm_rx_process); +tasklet_setup (&instance->tx_channel.tasklet, usbatm_tx_process); instance->rx_channel.stride =ATM_CELL_SIZE + driver->rx_padding; instance->tx_channel.stride =ATM_CELL_SIZE + driver->tx_padding; instance->rx_channel.usbatm = instance->tx_channel.usbatm = instance;
Signature · 1 line
2.17.1
PATCH 2/7 usb: c67x00: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/usb/c67x00/c67x00-sched.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/usb/c67x00/c67x00-sched.c +3 -4
@@ -1122,9 +1122,9 @@ static void c67x00_do_work(struct c67x00_hcd *c67x00)/* -------------------------------------------------------------------------- */ -static void c67x00_sched_tasklet (unsigned long __c67x00) +static void c67x00_sched_tasklet (struct tasklet_struct *t) { -struct c67x00_hcd *c67x00 = (struct c67x00_hcd *)__c67x00; +struct c67x00_hcd *c67x00 =from_tasklet (c67x00, t, tasklet);c67x00_do_work (c67x00); }
@@ -1135,8 +1135,7 @@ void c67x00_sched_kick(struct c67x00_hcd *c67x00)int c67x00_sched_start_scheduler (struct c67x00_hcd *c67x00) { -tasklet_init (&c67x00->tasklet, c67x00_sched_tasklet, - (unsigned long )c67x00); +tasklet_setup (&c67x00->tasklet, c67x00_sched_tasklet);return 0 ; }
Signature · 1 line
2.17.1
PATCH 3/7 usb: hcd: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/usb/core/hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/core/hcd.c +3 -3
@@ -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,
Signature · 1 line
2.17.1
PATCH 4/7 usb/gadget: f_midi: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/usb/gadget/function/f_midi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/gadget/function/f_midi.c +3 -3
@@ -698,9 +698,9 @@ static void f_midi_transmit(struct f_midi *midi)f_midi_drop_out_substreams (midi); } -static void f_midi_in_tasklet (unsigned long data) +static void f_midi_in_tasklet (struct tasklet_struct *t) { -struct f_midi *midi = (struct f_midi *) data; +struct f_midi *midi =from_tasklet (midi, t, tasklet);f_midi_transmit (midi); }
@@ -875,7 +875,7 @@ static int f_midi_bind(struct usb_configuration *c, struct usb_function *f)int status, n, jack =1 , i =0 , endpoint_descriptor_index =0 ; midi->gadget = cdev->gadget; -tasklet_init (&midi->tasklet, f_midi_in_tasklet, (unsigned long ) midi); +tasklet_setup (&midi->tasklet, f_midi_in_tasklet); status =f_midi_register_card (midi);if (status <0 ) goto fail_register;
Signature · 1 line
2.17.1
PATCH 5/7 usb/gadget: fsl_qe_udc: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/usb/gadget/udc/fsl_qe_udc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/usb/gadget/udc/fsl_qe_udc.c +3 -4
@@ -923,9 +923,9 @@ static int qe_ep_rxframe_handle(struct qe_ep *ep)return 0 ; } -static void ep_rx_tasklet (unsigned long data) +static void ep_rx_tasklet (struct tasklet_struct *t) { -struct qe_udc *udc = (struct qe_udc *)data; +struct qe_udc *udc =from_tasklet (udc, t, rx_tasklet);struct qe_ep *ep;struct qe_frame *pframe;struct qe_bd __iomem *bd;
@@ -2553,8 +2553,7 @@ static int qe_udc_probe(struct platform_device *ofdev) DMA_TO_DEVICE); } -tasklet_init (&udc->rx_tasklet, ep_rx_tasklet, - (unsigned long )udc); +tasklet_setup (&udc->rx_tasklet, ep_rx_tasklet);/* request irq and disable DR */ udc->usb_irq =irq_of_parse_and_map (np,0 );if (!udc->usb_irq) {
Signature · 1 line
2.17.1
PATCH 6/7 usb: xhci: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/usb/host/xhci-dbgtty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/usb/host/xhci-dbgtty.c +3 -3
@@ -288,14 +288,14 @@ static const struct tty_operations dbc_tty_ops = { .unthrottle = dbc_tty_unthrottle, }; -static void dbc_rx_push (unsigned long _port) +static void dbc_rx_push (struct tasklet_struct *t) {struct dbc_request *req;struct tty_struct *tty;unsigned long flags;bool do_push = false;bool disconnect = false; -struct dbc_port *port = (void *)_port; +struct dbc_port *port =from_tasklet (port, t, push);struct list_head *queue = &port->read_queue;spin_lock_irqsave (&port->port_lock, flags);
@@ -382,7 +382,7 @@ xhci_dbc_tty_init_port(struct xhci_dbc *dbc, struct dbc_port *port) {tty_port_init (&port->port);spin_lock_init (&port->port_lock); -tasklet_init (&port->push, dbc_rx_push, (unsigned long )port); +tasklet_setup (&port->push, dbc_rx_push);INIT_LIST_HEAD (&port->read_pool);INIT_LIST_HEAD (&port->read_queue);INIT_LIST_HEAD (&port->write_pool);
Signature · 1 line
2.17.1
PATCH 7/7 usb: mos7720: convert tasklets to use new tasklet_setup() API
In reply to Allen PaisFrom: Allen Pais <[email protected]>
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.
--- drivers/usb/serial/mos7720.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/usb/serial/mos7720.c +4 -4
@@ -282,11 +282,12 @@ static void destroy_urbtracker(struct kref *kref)* port callback had to be deferred because the disconnect mutex could not be * 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;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 list_head *cursor, *next;struct device *dev;
@@ -716,8 +717,7 @@ static int mos7715_parport_init(struct usb_serial *serial)INIT_LIST_HEAD (&mos_parport->deferred_urbs);usb_set_serial_data (serial, mos_parport);/* hijack private pointer */ mos_parport->serial = serial; -tasklet_init (&mos_parport->urb_tasklet, send_deferred_urbs, - (unsigned long ) mos_parport); +tasklet_setup (&mos_parport->urb_tasklet, send_deferred_urbs);init_completion (&mos_parport->syncmsg_compl);/* cycle parallel port reset bit */
Signature · 1 line
2.17.1