diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 13:08:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-01 18:57:23 +0300 |
commit | 8e4e276a3857461b2bb5dd596768fcbe2a469d5a (patch) | |
tree | dcf2ca3d1b28afd45c9800f0781176b346979ad3 /drivers/usb/host/r8a66597.h | |
parent | 7e33da59a6a60c7ba486b01b121b683ada3a50bc (diff) | |
download | linux-8e4e276a3857461b2bb5dd596768fcbe2a469d5a.tar.xz |
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 <chris.brandt@renesas.com>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/r8a66597.h')
-rw-r--r-- | drivers/usb/host/r8a66597.h | 11 |
1 files changed, 9 insertions, 2 deletions
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; |