diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-18 13:24:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-20 14:42:49 +0200 |
commit | a83f4340dc900a875c9ed0cb58bfa2d930a8eb66 (patch) | |
tree | e097565367f45ef00ef690b6e698f22d1352ef01 /drivers/staging/irda/include | |
parent | 4bdd439fe2a7ce14f2b86bf138b24e2fa3615507 (diff) | |
download | linux-stable-a83f4340dc900a875c9ed0cb58bfa2d930a8eb66.tar.gz linux-stable-a83f4340dc900a875c9ed0cb58bfa2d930a8eb66.tar.bz2 linux-stable-a83f4340dc900a875c9ed0cb58bfa2d930a8eb66.zip |
staging/irda/net: 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.
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/irda/include')
-rw-r--r-- | drivers/staging/irda/include/net/irda/irlmp_event.h | 6 | ||||
-rw-r--r-- | drivers/staging/irda/include/net/irda/timer.h | 11 |
2 files changed, 7 insertions, 10 deletions
diff --git a/drivers/staging/irda/include/net/irda/irlmp_event.h b/drivers/staging/irda/include/net/irda/irlmp_event.h index 9e4ec17a7449..a1a082fe384e 100644 --- a/drivers/staging/irda/include/net/irda/irlmp_event.h +++ b/drivers/staging/irda/include/net/irda/irlmp_event.h @@ -82,9 +82,9 @@ typedef enum { extern const char *const irlmp_state[]; extern const char *const irlsap_state[]; -void irlmp_watchdog_timer_expired(void *data); -void irlmp_discovery_timer_expired(void *data); -void irlmp_idle_timer_expired(void *data); +void irlmp_watchdog_timer_expired(struct timer_list *t); +void irlmp_discovery_timer_expired(struct timer_list *t); +void irlmp_idle_timer_expired(struct timer_list *t); void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event, struct sk_buff *skb); diff --git a/drivers/staging/irda/include/net/irda/timer.h b/drivers/staging/irda/include/net/irda/timer.h index d784f242cf7b..a6635f0afae9 100644 --- a/drivers/staging/irda/include/net/irda/timer.h +++ b/drivers/staging/irda/include/net/irda/timer.h @@ -72,14 +72,11 @@ struct lap_cb; #define WATCHDOG_TIMEOUT (20*HZ) /* 20 sec */ -typedef void (*TIMER_CALLBACK)(void *); - -static inline void irda_start_timer(struct timer_list *ptimer, int timeout, - void* data, TIMER_CALLBACK callback) +static inline void irda_start_timer(struct timer_list *ptimer, int timeout, + void (*callback)(struct timer_list *)) { - ptimer->function = (void (*)(unsigned long)) callback; - ptimer->data = (unsigned long) data; - + ptimer->function = (TIMER_FUNC_TYPE) callback; + /* Set new value for timer (update or add timer). * We use mod_timer() because it's more efficient and also * safer with respect to race conditions - Jean II */ |