@@ -139,7 +139,8 @@ struct speedtch_instance_data {
139
139
140
140
struct speedtch_params params ; /* set in probe, constant afterwards */
141
141
142
- struct delayed_work status_checker ;
142
+ struct timer_list status_check_timer ;
143
+ struct work_struct status_check_work ;
143
144
144
145
unsigned char last_status ;
145
146
@@ -498,7 +499,7 @@ static void speedtch_check_status(struct work_struct *work)
498
499
{
499
500
struct speedtch_instance_data * instance =
500
501
container_of (work , struct speedtch_instance_data ,
501
- status_checker . work );
502
+ status_check_work );
502
503
struct usbatm_data * usbatm = instance -> usbatm ;
503
504
struct atm_dev * atm_dev = usbatm -> atm_dev ;
504
505
unsigned char * buf = instance -> scratch_buffer ;
@@ -575,11 +576,11 @@ static void speedtch_status_poll(unsigned long data)
575
576
{
576
577
struct speedtch_instance_data * instance = (void * )data ;
577
578
578
- schedule_delayed_work (& instance -> status_checker , 0 );
579
+ schedule_work (& instance -> status_check_work );
579
580
580
581
/* The following check is racy, but the race is harmless */
581
582
if (instance -> poll_delay < MAX_POLL_DELAY )
582
- mod_timer (& instance -> status_checker . timer , jiffies + msecs_to_jiffies (instance -> poll_delay ));
583
+ mod_timer (& instance -> status_check_timer , jiffies + msecs_to_jiffies (instance -> poll_delay ));
583
584
else
584
585
atm_warn (instance -> usbatm , "Too many failures - disabling line status polling\n" );
585
586
}
@@ -595,7 +596,7 @@ static void speedtch_resubmit_int(unsigned long data)
595
596
if (int_urb ) {
596
597
ret = usb_submit_urb (int_urb , GFP_ATOMIC );
597
598
if (!ret )
598
- schedule_delayed_work (& instance -> status_checker , 0 );
599
+ schedule_work (& instance -> status_check_work );
599
600
else {
600
601
atm_dbg (instance -> usbatm , "%s: usb_submit_urb failed with result %d\n" , __func__ , ret );
601
602
mod_timer (& instance -> resubmit_timer , jiffies + msecs_to_jiffies (RESUBMIT_DELAY ));
@@ -624,7 +625,7 @@ static void speedtch_handle_int(struct urb *int_urb)
624
625
}
625
626
626
627
if ((count == 6 ) && !memcmp (up_int , instance -> int_data , 6 )) {
627
- del_timer (& instance -> status_checker . timer );
628
+ del_timer (& instance -> status_check_timer );
628
629
atm_info (usbatm , "DSL line goes up\n" );
629
630
} else if ((count == 6 ) && !memcmp (down_int , instance -> int_data , 6 )) {
630
631
atm_info (usbatm , "DSL line goes down\n" );
@@ -640,7 +641,7 @@ static void speedtch_handle_int(struct urb *int_urb)
640
641
641
642
if ((int_urb = instance -> int_urb )) {
642
643
ret = usb_submit_urb (int_urb , GFP_ATOMIC );
643
- schedule_delayed_work (& instance -> status_checker , 0 );
644
+ schedule_work (& instance -> status_check_work );
644
645
if (ret < 0 ) {
645
646
atm_dbg (usbatm , "%s: usb_submit_urb failed with result %d\n" , __func__ , ret );
646
647
goto fail ;
@@ -686,7 +687,7 @@ static int speedtch_atm_start(struct usbatm_data *usbatm, struct atm_dev *atm_de
686
687
}
687
688
688
689
/* Start status polling */
689
- mod_timer (& instance -> status_checker . timer , jiffies + msecs_to_jiffies (1000 ));
690
+ mod_timer (& instance -> status_check_timer , jiffies + msecs_to_jiffies (1000 ));
690
691
691
692
return 0 ;
692
693
}
@@ -698,7 +699,7 @@ static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_de
698
699
699
700
atm_dbg (usbatm , "%s entered\n" , __func__ );
700
701
701
- del_timer_sync (& instance -> status_checker . timer );
702
+ del_timer_sync (& instance -> status_check_timer );
702
703
703
704
/*
704
705
* Since resubmit_timer and int_urb can schedule themselves and
@@ -869,10 +870,11 @@ static int speedtch_bind(struct usbatm_data *usbatm,
869
870
870
871
usbatm -> flags |= (use_isoc ? UDSL_USE_ISOC : 0 );
871
872
872
- INIT_DELAYED_WORK (& instance -> status_checker , speedtch_check_status );
873
+ INIT_WORK (& instance -> status_check_work , speedtch_check_status );
874
+ init_timer (& instance -> status_check_timer );
873
875
874
- instance -> status_checker . timer .function = speedtch_status_poll ;
875
- instance -> status_checker . timer .data = (unsigned long )instance ;
876
+ instance -> status_check_timer .function = speedtch_status_poll ;
877
+ instance -> status_check_timer .data = (unsigned long )instance ;
876
878
instance -> last_status = 0xff ;
877
879
instance -> poll_delay = MIN_POLL_DELAY ;
878
880
0 commit comments