From 8e4e276a3857461b2bb5dd596768fcbe2a469d5a Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Tue, 24 Oct 2017 03:08:42 -0700 Subject: usb: r8a66597-hcd: Convert timers to use timer_setup() In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This rearranges the arrays of timers to minimize the need for a pointer back to the main structure. Cc: Chris Brandt Cc: Julia Lawall Signed-off-by: Kees Cook Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/r8a66597.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers/usb/host/r8a66597.h') diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h index 672cea307abb..b8406c07f363 100644 --- a/drivers/usb/host/r8a66597.h +++ b/drivers/usb/host/r8a66597.h @@ -107,6 +107,14 @@ struct r8a66597_root_hub { struct r8a66597_device *dev; }; +struct r8a66597; + +struct r8a66597_timers { + struct timer_list td; + struct timer_list interval; + struct r8a66597 *r8a66597; +}; + struct r8a66597 { spinlock_t lock; void __iomem *reg; @@ -117,8 +125,7 @@ struct r8a66597 { struct list_head pipe_queue[R8A66597_MAX_NUM_PIPE]; struct timer_list rh_timer; - struct timer_list td_timer[R8A66597_MAX_NUM_PIPE]; - struct timer_list interval_timer[R8A66597_MAX_NUM_PIPE]; + struct r8a66597_timers timers[R8A66597_MAX_NUM_PIPE]; unsigned short address_map; unsigned short timeout_map; -- cgit v1.2.3