Rename callout member in struct timer_list to match the one in struct

delayed_work in the LinuxKPI. This allows the timer_pending() function
macro to be used with delayed work structures.

No functional nor structural change.

MFC after:	1 week
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Sponsored by:	Mellanox Technologies
Sponsored by:	Limelight Networks
This commit is contained in:
Hans Petter Selasky 2018-03-02 08:52:27 +00:00
parent 90575a0ec9
commit 9555cfd2b2
2 changed files with 9 additions and 9 deletions

View File

@ -38,7 +38,7 @@
#include <sys/callout.h>
struct timer_list {
struct callout timer_callout;
struct callout callout;
void (*function) (unsigned long);
unsigned long data;
int expires;
@ -51,7 +51,7 @@ extern unsigned long linux_timer_hz_mask;
#define setup_timer(timer, func, dat) do { \
(timer)->function = (func); \
(timer)->data = (dat); \
callout_init(&(timer)->timer_callout, 1); \
callout_init(&(timer)->callout, 1); \
} while (0)
#define __setup_timer(timer, func, dat, flags) do { \
@ -62,16 +62,16 @@ extern unsigned long linux_timer_hz_mask;
#define init_timer(timer) do { \
(timer)->function = NULL; \
(timer)->data = 0; \
callout_init(&(timer)->timer_callout, 1); \
callout_init(&(timer)->callout, 1); \
} while (0)
extern void mod_timer(struct timer_list *, int);
extern void add_timer(struct timer_list *);
extern void add_timer_on(struct timer_list *, int cpu);
#define del_timer(timer) (void)callout_stop(&(timer)->timer_callout)
#define del_timer_sync(timer) (void)callout_drain(&(timer)->timer_callout)
#define timer_pending(timer) callout_pending(&(timer)->timer_callout)
#define del_timer(timer) (void)callout_stop(&(timer)->callout)
#define del_timer_sync(timer) (void)callout_drain(&(timer)->callout)
#define timer_pending(timer) callout_pending(&(timer)->callout)
#define round_jiffies(j) \
((int)(((j) + linux_timer_hz_mask) & ~linux_timer_hz_mask))
#define round_jiffies_relative(j) round_jiffies(j)

View File

@ -1734,7 +1734,7 @@ mod_timer(struct timer_list *timer, int expires)
{
timer->expires = expires;
callout_reset(&timer->timer_callout,
callout_reset(&timer->callout,
linux_timer_jiffies_until(expires),
&linux_timer_callback_wrapper, timer);
}
@ -1743,7 +1743,7 @@ void
add_timer(struct timer_list *timer)
{
callout_reset(&timer->timer_callout,
callout_reset(&timer->callout,
linux_timer_jiffies_until(timer->expires),
&linux_timer_callback_wrapper, timer);
}
@ -1752,7 +1752,7 @@ void
add_timer_on(struct timer_list *timer, int cpu)
{
callout_reset_on(&timer->timer_callout,
callout_reset_on(&timer->callout,
linux_timer_jiffies_until(timer->expires),
&linux_timer_callback_wrapper, timer, cpu);
}