Commit f9dc3713 authored by Kees Cook's avatar Kees Cook

usb: gadget: udc: Avoid tasklet passing a global

There's no reason for the tasklet callback to set an argument since it
always uses a global. Instead, use the global directly, in preparation
for converting the tasklet subsystem to modern callback conventions.
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 11ba4688
...@@ -96,9 +96,7 @@ static int stop_pollstall_timer; ...@@ -96,9 +96,7 @@ static int stop_pollstall_timer;
static DECLARE_COMPLETION(on_pollstall_exit); static DECLARE_COMPLETION(on_pollstall_exit);
/* tasklet for usb disconnect */ /* tasklet for usb disconnect */
static DECLARE_TASKLET(disconnect_tasklet, udc_tasklet_disconnect, static DECLARE_TASKLET(disconnect_tasklet, udc_tasklet_disconnect, 0);
(unsigned long) &udc);
/* endpoint names used for print */ /* endpoint names used for print */
static const char ep0_string[] = "ep0in"; static const char ep0_string[] = "ep0in";
...@@ -1661,7 +1659,7 @@ static void usb_disconnect(struct udc *dev) ...@@ -1661,7 +1659,7 @@ static void usb_disconnect(struct udc *dev)
/* Tasklet for disconnect to be outside of interrupt context */ /* Tasklet for disconnect to be outside of interrupt context */
static void udc_tasklet_disconnect(unsigned long par) static void udc_tasklet_disconnect(unsigned long par)
{ {
struct udc *dev = (struct udc *)(*((struct udc **) par)); struct udc *dev = udc;
u32 tmp; u32 tmp;
DBG(dev, "Tasklet disconnect\n"); DBG(dev, "Tasklet disconnect\n");
......
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