3535#include <linux/interrupt.h>
3636#include <net/lapb.h>
3737
38- static void lapb_t1timer_expiry (unsigned long );
39- static void lapb_t2timer_expiry (unsigned long );
38+ static void lapb_t1timer_expiry (struct timer_list * );
39+ static void lapb_t2timer_expiry (struct timer_list * );
4040
4141void lapb_start_t1timer (struct lapb_cb * lapb )
4242{
4343 del_timer (& lapb -> t1timer );
4444
45- lapb -> t1timer .data = (unsigned long )lapb ;
46- lapb -> t1timer .function = & lapb_t1timer_expiry ;
45+ lapb -> t1timer .function = (TIMER_FUNC_TYPE )lapb_t1timer_expiry ;
4746 lapb -> t1timer .expires = jiffies + lapb -> t1 ;
4847
4948 add_timer (& lapb -> t1timer );
@@ -53,8 +52,7 @@ void lapb_start_t2timer(struct lapb_cb *lapb)
5352{
5453 del_timer (& lapb -> t2timer );
5554
56- lapb -> t2timer .data = (unsigned long )lapb ;
57- lapb -> t2timer .function = & lapb_t2timer_expiry ;
55+ lapb -> t2timer .function = (TIMER_FUNC_TYPE )lapb_t2timer_expiry ;
5856 lapb -> t2timer .expires = jiffies + lapb -> t2 ;
5957
6058 add_timer (& lapb -> t2timer );
@@ -75,19 +73,19 @@ int lapb_t1timer_running(struct lapb_cb *lapb)
7573 return timer_pending (& lapb -> t1timer );
7674}
7775
78- static void lapb_t2timer_expiry (unsigned long param )
76+ static void lapb_t2timer_expiry (struct timer_list * t )
7977{
80- struct lapb_cb * lapb = ( struct lapb_cb * ) param ;
78+ struct lapb_cb * lapb = from_timer ( lapb , t , t2timer ) ;
8179
8280 if (lapb -> condition & LAPB_ACK_PENDING_CONDITION ) {
8381 lapb -> condition &= ~LAPB_ACK_PENDING_CONDITION ;
8482 lapb_timeout_response (lapb );
8583 }
8684}
8785
88- static void lapb_t1timer_expiry (unsigned long param )
86+ static void lapb_t1timer_expiry (struct timer_list * t )
8987{
90- struct lapb_cb * lapb = ( struct lapb_cb * ) param ;
88+ struct lapb_cb * lapb = from_timer ( lapb , t , t1timer ) ;
9189
9290 switch (lapb -> state ) {
9391
0 commit comments