mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net/rose: 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: Ralf Baechle <ralf@linux-mips.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-hams@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
83a37b3292
commit
4966babd90
5 changed files with 36 additions and 44 deletions
|
@ -19,12 +19,13 @@ static struct sk_buff_head loopback_queue;
|
|||
static struct timer_list loopback_timer;
|
||||
|
||||
static void rose_set_loopback_timer(void);
|
||||
static void rose_loopback_timer(struct timer_list *unused);
|
||||
|
||||
void rose_loopback_init(void)
|
||||
{
|
||||
skb_queue_head_init(&loopback_queue);
|
||||
|
||||
init_timer(&loopback_timer);
|
||||
timer_setup(&loopback_timer, rose_loopback_timer, 0);
|
||||
}
|
||||
|
||||
static int rose_loopback_running(void)
|
||||
|
@ -50,20 +51,16 @@ int rose_loopback_queue(struct sk_buff *skb, struct rose_neigh *neigh)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void rose_loopback_timer(unsigned long);
|
||||
|
||||
static void rose_set_loopback_timer(void)
|
||||
{
|
||||
del_timer(&loopback_timer);
|
||||
|
||||
loopback_timer.data = 0;
|
||||
loopback_timer.function = &rose_loopback_timer;
|
||||
loopback_timer.expires = jiffies + 10;
|
||||
|
||||
add_timer(&loopback_timer);
|
||||
}
|
||||
|
||||
static void rose_loopback_timer(unsigned long param)
|
||||
static void rose_loopback_timer(struct timer_list *unused)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
struct net_device *dev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue