diff options
author | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
commit | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch) | |
tree | 1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/usb/atm/speedtch.c | |
parent | 65f27f38446e1976cc98fd3004b110fedcddd189 (diff) |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/usb/atm/speedtch.c')
-rw-r--r-- | drivers/usb/atm/speedtch.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index c870c804470f..7ed34bb1c50f 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
@@ -142,7 +142,7 @@ struct speedtch_instance_data { | |||
142 | 142 | ||
143 | struct speedtch_params params; /* set in probe, constant afterwards */ | 143 | struct speedtch_params params; /* set in probe, constant afterwards */ |
144 | 144 | ||
145 | struct work_struct status_checker; | 145 | struct delayed_work status_checker; |
146 | 146 | ||
147 | unsigned char last_status; | 147 | unsigned char last_status; |
148 | 148 | ||
@@ -498,8 +498,11 @@ static int speedtch_start_synchro(struct speedtch_instance_data *instance) | |||
498 | return ret; | 498 | return ret; |
499 | } | 499 | } |
500 | 500 | ||
501 | static void speedtch_check_status(struct speedtch_instance_data *instance) | 501 | static void speedtch_check_status(struct work_struct *work) |
502 | { | 502 | { |
503 | struct speedtch_instance_data *instance = | ||
504 | container_of(work, struct speedtch_instance_data, | ||
505 | status_checker.work); | ||
503 | struct usbatm_data *usbatm = instance->usbatm; | 506 | struct usbatm_data *usbatm = instance->usbatm; |
504 | struct atm_dev *atm_dev = usbatm->atm_dev; | 507 | struct atm_dev *atm_dev = usbatm->atm_dev; |
505 | unsigned char *buf = instance->scratch_buffer; | 508 | unsigned char *buf = instance->scratch_buffer; |
@@ -576,7 +579,7 @@ static void speedtch_status_poll(unsigned long data) | |||
576 | { | 579 | { |
577 | struct speedtch_instance_data *instance = (void *)data; | 580 | struct speedtch_instance_data *instance = (void *)data; |
578 | 581 | ||
579 | schedule_work(&instance->status_checker); | 582 | schedule_delayed_work(&instance->status_checker, 0); |
580 | 583 | ||
581 | /* The following check is racy, but the race is harmless */ | 584 | /* The following check is racy, but the race is harmless */ |
582 | if (instance->poll_delay < MAX_POLL_DELAY) | 585 | if (instance->poll_delay < MAX_POLL_DELAY) |
@@ -596,7 +599,7 @@ static void speedtch_resubmit_int(unsigned long data) | |||
596 | if (int_urb) { | 599 | if (int_urb) { |
597 | ret = usb_submit_urb(int_urb, GFP_ATOMIC); | 600 | ret = usb_submit_urb(int_urb, GFP_ATOMIC); |
598 | if (!ret) | 601 | if (!ret) |
599 | schedule_work(&instance->status_checker); | 602 | schedule_delayed_work(&instance->status_checker, 0); |
600 | else { | 603 | else { |
601 | atm_dbg(instance->usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); | 604 | atm_dbg(instance->usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); |
602 | mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY)); | 605 | mod_timer(&instance->resubmit_timer, jiffies + msecs_to_jiffies(RESUBMIT_DELAY)); |
@@ -640,7 +643,7 @@ static void speedtch_handle_int(struct urb *int_urb) | |||
640 | 643 | ||
641 | if ((int_urb = instance->int_urb)) { | 644 | if ((int_urb = instance->int_urb)) { |
642 | ret = usb_submit_urb(int_urb, GFP_ATOMIC); | 645 | ret = usb_submit_urb(int_urb, GFP_ATOMIC); |
643 | schedule_work(&instance->status_checker); | 646 | schedule_delayed_work(&instance->status_checker, 0); |
644 | if (ret < 0) { | 647 | if (ret < 0) { |
645 | atm_dbg(usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); | 648 | atm_dbg(usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); |
646 | goto fail; | 649 | goto fail; |
@@ -855,7 +858,7 @@ static int speedtch_bind(struct usbatm_data *usbatm, | |||
855 | 858 | ||
856 | usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); | 859 | usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); |
857 | 860 | ||
858 | INIT_WORK(&instance->status_checker, (void *)speedtch_check_status, instance); | 861 | INIT_DELAYED_WORK(&instance->status_checker, speedtch_check_status); |
859 | 862 | ||
860 | instance->status_checker.timer.function = speedtch_status_poll; | 863 | instance->status_checker.timer.function = speedtch_status_poll; |
861 | instance->status_checker.timer.data = (unsigned long)instance; | 864 | instance->status_checker.timer.data = (unsigned long)instance; |