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/misc/phidgetkit.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/misc/phidgetkit.c')
-rw-r--r-- | drivers/usb/misc/phidgetkit.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index abb4dcd811ac..33e716c6a79b 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c | |||
@@ -81,8 +81,8 @@ struct interfacekit { | |||
81 | unsigned char *data; | 81 | unsigned char *data; |
82 | dma_addr_t data_dma; | 82 | dma_addr_t data_dma; |
83 | 83 | ||
84 | struct work_struct do_notify; | 84 | struct delayed_work do_notify; |
85 | struct work_struct do_resubmit; | 85 | struct delayed_work do_resubmit; |
86 | unsigned long input_events; | 86 | unsigned long input_events; |
87 | unsigned long sensor_events; | 87 | unsigned long sensor_events; |
88 | }; | 88 | }; |
@@ -374,7 +374,7 @@ static void interfacekit_irq(struct urb *urb) | |||
374 | } | 374 | } |
375 | 375 | ||
376 | if (kit->input_events || kit->sensor_events) | 376 | if (kit->input_events || kit->sensor_events) |
377 | schedule_work(&kit->do_notify); | 377 | schedule_delayed_work(&kit->do_notify, 0); |
378 | 378 | ||
379 | resubmit: | 379 | resubmit: |
380 | status = usb_submit_urb(urb, SLAB_ATOMIC); | 380 | status = usb_submit_urb(urb, SLAB_ATOMIC); |
@@ -384,9 +384,10 @@ resubmit: | |||
384 | kit->udev->devpath, status); | 384 | kit->udev->devpath, status); |
385 | } | 385 | } |
386 | 386 | ||
387 | static void do_notify(void *data) | 387 | static void do_notify(struct work_struct *work) |
388 | { | 388 | { |
389 | struct interfacekit *kit = data; | 389 | struct interfacekit *kit = |
390 | container_of(work, struct interfacekit, do_notify.work); | ||
390 | int i; | 391 | int i; |
391 | char sysfs_file[8]; | 392 | char sysfs_file[8]; |
392 | 393 | ||
@@ -405,9 +406,11 @@ static void do_notify(void *data) | |||
405 | } | 406 | } |
406 | } | 407 | } |
407 | 408 | ||
408 | static void do_resubmit(void *data) | 409 | static void do_resubmit(struct work_struct *work) |
409 | { | 410 | { |
410 | set_outputs(data); | 411 | struct interfacekit *kit = |
412 | container_of(work, struct interfacekit, do_resubmit.work); | ||
413 | set_outputs(kit); | ||
411 | } | 414 | } |
412 | 415 | ||
413 | #define show_set_output(value) \ | 416 | #define show_set_output(value) \ |
@@ -575,8 +578,8 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic | |||
575 | 578 | ||
576 | kit->udev = usb_get_dev(dev); | 579 | kit->udev = usb_get_dev(dev); |
577 | kit->intf = intf; | 580 | kit->intf = intf; |
578 | INIT_WORK(&kit->do_notify, do_notify, kit); | 581 | INIT_DELAYED_WORK(&kit->do_notify, do_notify); |
579 | INIT_WORK(&kit->do_resubmit, do_resubmit, kit); | 582 | INIT_DELAYED_WORK(&kit->do_resubmit, do_resubmit); |
580 | usb_fill_int_urb(kit->irq, kit->udev, pipe, kit->data, | 583 | usb_fill_int_urb(kit->irq, kit->udev, pipe, kit->data, |
581 | maxp > URB_INT_SIZE ? URB_INT_SIZE : maxp, | 584 | maxp > URB_INT_SIZE ? URB_INT_SIZE : maxp, |
582 | interfacekit_irq, kit, endpoint->bInterval); | 585 | interfacekit_irq, kit, endpoint->bInterval); |