diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/aio.h | 2 | ||||
-rw-r--r-- | include/linux/connector.h | 4 | ||||
-rw-r--r-- | include/linux/i2o.h | 2 | ||||
-rw-r--r-- | include/linux/kbd_kern.h | 2 | ||||
-rw-r--r-- | include/linux/libata.h | 7 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 2 | ||||
-rw-r--r-- | include/linux/ncp_fs_sb.h | 8 | ||||
-rw-r--r-- | include/linux/nfs_fs_sb.h | 2 | ||||
-rw-r--r-- | include/linux/reiserfs_fs_sb.h | 3 | ||||
-rw-r--r-- | include/linux/relay.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 2 | ||||
-rw-r--r-- | include/linux/tty.h | 2 | ||||
-rw-r--r-- | include/linux/usb.h | 2 | ||||
-rw-r--r-- | include/linux/workqueue.h | 145 | ||||
-rw-r--r-- | include/net/ieee80211softmac.h | 4 | ||||
-rw-r--r-- | include/net/inet_timewait_sock.h | 2 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 2 | ||||
-rw-r--r-- | include/scsi/libsas.h | 23 | ||||
-rw-r--r-- | include/scsi/scsi_transport_fc.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 2 | ||||
-rw-r--r-- | include/sound/ac97_codec.h | 2 | ||||
-rw-r--r-- | include/sound/ak4114.h | 2 |
23 files changed, 168 insertions, 60 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 0d71c0041f13..9e350fd44d77 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
@@ -194,7 +194,7 @@ struct kioctx { | |||
194 | 194 | ||
195 | struct aio_ring_info ring_info; | 195 | struct aio_ring_info ring_info; |
196 | 196 | ||
197 | struct work_struct wq; | 197 | struct delayed_work wq; |
198 | }; | 198 | }; |
199 | 199 | ||
200 | /* prototypes */ | 200 | /* prototypes */ |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 4c02119c6ab9..3ea1cd58de97 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -133,7 +133,7 @@ struct cn_callback_data { | |||
133 | struct cn_callback_entry { | 133 | struct cn_callback_entry { |
134 | struct list_head callback_entry; | 134 | struct list_head callback_entry; |
135 | struct cn_callback *cb; | 135 | struct cn_callback *cb; |
136 | struct work_struct work; | 136 | struct delayed_work work; |
137 | struct cn_queue_dev *pdev; | 137 | struct cn_queue_dev *pdev; |
138 | 138 | ||
139 | struct cn_callback_id id; | 139 | struct cn_callback_id id; |
@@ -170,7 +170,7 @@ void cn_queue_free_dev(struct cn_queue_dev *dev); | |||
170 | 170 | ||
171 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 171 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
172 | 172 | ||
173 | void cn_queue_wrapper(void *data); | 173 | void cn_queue_wrapper(struct work_struct *work); |
174 | 174 | ||
175 | extern int cn_already_initialized; | 175 | extern int cn_already_initialized; |
176 | 176 | ||
diff --git a/include/linux/i2o.h b/include/linux/i2o.h index c115e9e840b4..1fb02e17f6f6 100644 --- a/include/linux/i2o.h +++ b/include/linux/i2o.h | |||
@@ -461,7 +461,7 @@ struct i2o_driver { | |||
461 | int (*reply) (struct i2o_controller *, u32, struct i2o_message *); | 461 | int (*reply) (struct i2o_controller *, u32, struct i2o_message *); |
462 | 462 | ||
463 | /* Event handler */ | 463 | /* Event handler */ |
464 | void (*event) (struct i2o_event *); | 464 | work_func_t event; |
465 | 465 | ||
466 | struct workqueue_struct *event_queue; /* Event queue */ | 466 | struct workqueue_struct *event_queue; /* Event queue */ |
467 | 467 | ||
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index efe0ee4cc80b..06c58c423fe1 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -158,7 +158,7 @@ static inline void con_schedule_flip(struct tty_struct *t) | |||
158 | if (t->buf.tail != NULL) | 158 | if (t->buf.tail != NULL) |
159 | t->buf.tail->commit = t->buf.tail->used; | 159 | t->buf.tail->commit = t->buf.tail->used; |
160 | spin_unlock_irqrestore(&t->buf.lock, flags); | 160 | spin_unlock_irqrestore(&t->buf.lock, flags); |
161 | schedule_work(&t->buf.work); | 161 | schedule_delayed_work(&t->buf.work, 0); |
162 | } | 162 | } |
163 | 163 | ||
164 | #endif | 164 | #endif |
diff --git a/include/linux/libata.h b/include/linux/libata.h index abd2debebca2..b3f32eadbef5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -568,8 +568,9 @@ struct ata_port { | |||
568 | struct ata_host *host; | 568 | struct ata_host *host; |
569 | struct device *dev; | 569 | struct device *dev; |
570 | 570 | ||
571 | struct work_struct port_task; | 571 | void *port_task_data; |
572 | struct work_struct hotplug_task; | 572 | struct delayed_work port_task; |
573 | struct delayed_work hotplug_task; | ||
573 | struct work_struct scsi_rescan_task; | 574 | struct work_struct scsi_rescan_task; |
574 | 575 | ||
575 | unsigned int hsm_task_state; | 576 | unsigned int hsm_task_state; |
@@ -747,7 +748,7 @@ extern int ata_ratelimit(void); | |||
747 | extern unsigned int ata_busy_sleep(struct ata_port *ap, | 748 | extern unsigned int ata_busy_sleep(struct ata_port *ap, |
748 | unsigned long timeout_pat, | 749 | unsigned long timeout_pat, |
749 | unsigned long timeout); | 750 | unsigned long timeout); |
750 | extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *), | 751 | extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, |
751 | void *data, unsigned long delay); | 752 | void *data, unsigned long delay); |
752 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, | 753 | extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, |
753 | unsigned long interval_msec, | 754 | unsigned long interval_msec, |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 528e7d3fecb1..c15ae1986b98 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -110,7 +110,7 @@ struct mmc_host { | |||
110 | struct mmc_card *card_busy; /* the MMC card claiming host */ | 110 | struct mmc_card *card_busy; /* the MMC card claiming host */ |
111 | struct mmc_card *card_selected; /* the selected MMC card */ | 111 | struct mmc_card *card_selected; /* the selected MMC card */ |
112 | 112 | ||
113 | struct work_struct detect; | 113 | struct delayed_work detect; |
114 | 114 | ||
115 | unsigned long private[0] ____cacheline_aligned; | 115 | unsigned long private[0] ____cacheline_aligned; |
116 | }; | 116 | }; |
diff --git a/include/linux/ncp_fs_sb.h b/include/linux/ncp_fs_sb.h index b089d9506283..a503052138bd 100644 --- a/include/linux/ncp_fs_sb.h +++ b/include/linux/ncp_fs_sb.h | |||
@@ -127,10 +127,10 @@ struct ncp_server { | |||
127 | } unexpected_packet; | 127 | } unexpected_packet; |
128 | }; | 128 | }; |
129 | 129 | ||
130 | extern void ncp_tcp_rcv_proc(void *server); | 130 | extern void ncp_tcp_rcv_proc(struct work_struct *work); |
131 | extern void ncp_tcp_tx_proc(void *server); | 131 | extern void ncp_tcp_tx_proc(struct work_struct *work); |
132 | extern void ncpdgram_rcv_proc(void *server); | 132 | extern void ncpdgram_rcv_proc(struct work_struct *work); |
133 | extern void ncpdgram_timeout_proc(void *server); | 133 | extern void ncpdgram_timeout_proc(struct work_struct *work); |
134 | extern void ncpdgram_timeout_call(unsigned long server); | 134 | extern void ncpdgram_timeout_call(unsigned long server); |
135 | extern void ncp_tcp_data_ready(struct sock* sk, int len); | 135 | extern void ncp_tcp_data_ready(struct sock* sk, int len); |
136 | extern void ncp_tcp_write_space(struct sock* sk); | 136 | extern void ncp_tcp_write_space(struct sock* sk); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 7ccfc7ef0a83..95796e6924f1 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -51,7 +51,7 @@ struct nfs_client { | |||
51 | 51 | ||
52 | unsigned long cl_lease_time; | 52 | unsigned long cl_lease_time; |
53 | unsigned long cl_last_renewal; | 53 | unsigned long cl_last_renewal; |
54 | struct work_struct cl_renewd; | 54 | struct delayed_work cl_renewd; |
55 | 55 | ||
56 | struct rpc_wait_queue cl_rpcwaitq; | 56 | struct rpc_wait_queue cl_rpcwaitq; |
57 | 57 | ||
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 62a7169aed8b..3a28742d86f9 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h | |||
@@ -249,7 +249,8 @@ struct reiserfs_journal { | |||
249 | int j_errno; | 249 | int j_errno; |
250 | 250 | ||
251 | /* when flushing ordered buffers, throttle new ordered writers */ | 251 | /* when flushing ordered buffers, throttle new ordered writers */ |
252 | struct work_struct j_work; | 252 | struct delayed_work j_work; |
253 | struct super_block *j_work_sb; | ||
253 | atomic_t j_async_throttle; | 254 | atomic_t j_async_throttle; |
254 | }; | 255 | }; |
255 | 256 | ||
diff --git a/include/linux/relay.h b/include/linux/relay.h index 24accb483849..0e3d91b76996 100644 --- a/include/linux/relay.h +++ b/include/linux/relay.h | |||
@@ -38,7 +38,7 @@ struct rchan_buf | |||
38 | size_t subbufs_consumed; /* count of sub-buffers consumed */ | 38 | size_t subbufs_consumed; /* count of sub-buffers consumed */ |
39 | struct rchan *chan; /* associated channel */ | 39 | struct rchan *chan; /* associated channel */ |
40 | wait_queue_head_t read_wait; /* reader wait queue */ | 40 | wait_queue_head_t read_wait; /* reader wait queue */ |
41 | struct work_struct wake_readers; /* reader wake-up work struct */ | 41 | struct delayed_work wake_readers; /* reader wake-up work struct */ |
42 | struct dentry *dentry; /* channel file dentry */ | 42 | struct dentry *dentry; /* channel file dentry */ |
43 | struct kref kref; /* channel buffer refcount */ | 43 | struct kref kref; /* channel buffer refcount */ |
44 | struct page **page_array; /* array of current buffer pages */ | 44 | struct page **page_array; /* array of current buffer pages */ |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index a2eb9b4a9de3..4a68125b6de6 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -30,7 +30,7 @@ struct rpc_inode { | |||
30 | #define RPC_PIPE_WAIT_FOR_OPEN 1 | 30 | #define RPC_PIPE_WAIT_FOR_OPEN 1 |
31 | int flags; | 31 | int flags; |
32 | struct rpc_pipe_ops *ops; | 32 | struct rpc_pipe_ops *ops; |
33 | struct work_struct queue_timeout; | 33 | struct delayed_work queue_timeout; |
34 | }; | 34 | }; |
35 | 35 | ||
36 | static inline struct rpc_inode * | 36 | static inline struct rpc_inode * |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 60394fbc4c70..3e04c1512fc4 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -177,7 +177,7 @@ struct rpc_xprt { | |||
177 | unsigned long connect_timeout, | 177 | unsigned long connect_timeout, |
178 | bind_timeout, | 178 | bind_timeout, |
179 | reestablish_timeout; | 179 | reestablish_timeout; |
180 | struct work_struct connect_worker; | 180 | struct delayed_work connect_worker; |
181 | unsigned short port; | 181 | unsigned short port; |
182 | 182 | ||
183 | /* | 183 | /* |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 65321f911c1e..f717f0898238 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -53,7 +53,7 @@ struct tty_buffer { | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | struct tty_bufhead { | 55 | struct tty_bufhead { |
56 | struct work_struct work; | 56 | struct delayed_work work; |
57 | struct semaphore pty_sem; | 57 | struct semaphore pty_sem; |
58 | spinlock_t lock; | 58 | spinlock_t lock; |
59 | struct tty_buffer *head; /* Queue head */ | 59 | struct tty_buffer *head; /* Queue head */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 0cd73edeef13..aab5b1b72021 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -388,7 +388,7 @@ struct usb_device { | |||
388 | 388 | ||
389 | int pm_usage_cnt; /* usage counter for autosuspend */ | 389 | int pm_usage_cnt; /* usage counter for autosuspend */ |
390 | #ifdef CONFIG_PM | 390 | #ifdef CONFIG_PM |
391 | struct work_struct autosuspend; /* for delayed autosuspends */ | 391 | struct delayed_work autosuspend; /* for delayed autosuspends */ |
392 | struct mutex pm_mutex; /* protects PM operations */ | 392 | struct mutex pm_mutex; /* protects PM operations */ |
393 | 393 | ||
394 | unsigned auto_pm:1; /* autosuspend/resume in progress */ | 394 | unsigned auto_pm:1; /* autosuspend/resume in progress */ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 9bca3539a1e5..4a3ea83c6d16 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -11,12 +11,23 @@ | |||
11 | 11 | ||
12 | struct workqueue_struct; | 12 | struct workqueue_struct; |
13 | 13 | ||
14 | struct work_struct; | ||
15 | typedef void (*work_func_t)(struct work_struct *work); | ||
16 | |||
14 | struct work_struct { | 17 | struct work_struct { |
15 | unsigned long pending; | 18 | /* the first word is the work queue pointer and the flags rolled into |
19 | * one */ | ||
20 | unsigned long management; | ||
21 | #define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ | ||
22 | #define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */ | ||
23 | #define WORK_STRUCT_FLAG_MASK (3UL) | ||
24 | #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) | ||
16 | struct list_head entry; | 25 | struct list_head entry; |
17 | void (*func)(void *); | 26 | work_func_t func; |
18 | void *data; | 27 | }; |
19 | void *wq_data; | 28 | |
29 | struct delayed_work { | ||
30 | struct work_struct work; | ||
20 | struct timer_list timer; | 31 | struct timer_list timer; |
21 | }; | 32 | }; |
22 | 33 | ||
@@ -24,36 +35,117 @@ struct execute_work { | |||
24 | struct work_struct work; | 35 | struct work_struct work; |
25 | }; | 36 | }; |
26 | 37 | ||
27 | #define __WORK_INITIALIZER(n, f, d) { \ | 38 | #define __WORK_INITIALIZER(n, f) { \ |
39 | .management = 0, \ | ||
40 | .entry = { &(n).entry, &(n).entry }, \ | ||
41 | .func = (f), \ | ||
42 | } | ||
43 | |||
44 | #define __WORK_INITIALIZER_NAR(n, f) { \ | ||
45 | .management = (1 << WORK_STRUCT_NOAUTOREL), \ | ||
28 | .entry = { &(n).entry, &(n).entry }, \ | 46 | .entry = { &(n).entry, &(n).entry }, \ |
29 | .func = (f), \ | 47 | .func = (f), \ |
30 | .data = (d), \ | 48 | } |
49 | |||
50 | #define __DELAYED_WORK_INITIALIZER(n, f) { \ | ||
51 | .work = __WORK_INITIALIZER((n).work, (f)), \ | ||
52 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | ||
53 | } | ||
54 | |||
55 | #define __DELAYED_WORK_INITIALIZER_NAR(n, f) { \ | ||
56 | .work = __WORK_INITIALIZER_NAR((n).work, (f)), \ | ||
31 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ | 57 | .timer = TIMER_INITIALIZER(NULL, 0, 0), \ |
32 | } | 58 | } |
33 | 59 | ||
34 | #define DECLARE_WORK(n, f, d) \ | 60 | #define DECLARE_WORK(n, f) \ |
35 | struct work_struct n = __WORK_INITIALIZER(n, f, d) | 61 | struct work_struct n = __WORK_INITIALIZER(n, f) |
62 | |||
63 | #define DECLARE_WORK_NAR(n, f) \ | ||
64 | struct work_struct n = __WORK_INITIALIZER_NAR(n, f) | ||
65 | |||
66 | #define DECLARE_DELAYED_WORK(n, f) \ | ||
67 | struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) | ||
68 | |||
69 | #define DECLARE_DELAYED_WORK_NAR(n, f) \ | ||
70 | struct dwork_struct n = __DELAYED_WORK_INITIALIZER_NAR(n, f) | ||
36 | 71 | ||
37 | /* | 72 | /* |
38 | * initialize a work-struct's func and data pointers: | 73 | * initialize a work item's function pointer |
39 | */ | 74 | */ |
40 | #define PREPARE_WORK(_work, _func, _data) \ | 75 | #define PREPARE_WORK(_work, _func) \ |
41 | do { \ | 76 | do { \ |
42 | (_work)->func = _func; \ | 77 | (_work)->func = (_func); \ |
43 | (_work)->data = _data; \ | ||
44 | } while (0) | 78 | } while (0) |
45 | 79 | ||
80 | #define PREPARE_DELAYED_WORK(_work, _func) \ | ||
81 | PREPARE_WORK(&(_work)->work, (_func)) | ||
82 | |||
46 | /* | 83 | /* |
47 | * initialize all of a work-struct: | 84 | * initialize all of a work item in one go |
48 | */ | 85 | */ |
49 | #define INIT_WORK(_work, _func, _data) \ | 86 | #define INIT_WORK(_work, _func) \ |
50 | do { \ | 87 | do { \ |
88 | (_work)->management = 0; \ | ||
51 | INIT_LIST_HEAD(&(_work)->entry); \ | 89 | INIT_LIST_HEAD(&(_work)->entry); \ |
52 | (_work)->pending = 0; \ | 90 | PREPARE_WORK((_work), (_func)); \ |
53 | PREPARE_WORK((_work), (_func), (_data)); \ | 91 | } while (0) |
92 | |||
93 | #define INIT_WORK_NAR(_work, _func) \ | ||
94 | do { \ | ||
95 | (_work)->management = (1 << WORK_STRUCT_NOAUTOREL); \ | ||
96 | INIT_LIST_HEAD(&(_work)->entry); \ | ||
97 | PREPARE_WORK((_work), (_func)); \ | ||
98 | } while (0) | ||
99 | |||
100 | #define INIT_DELAYED_WORK(_work, _func) \ | ||
101 | do { \ | ||
102 | INIT_WORK(&(_work)->work, (_func)); \ | ||
103 | init_timer(&(_work)->timer); \ | ||
104 | } while (0) | ||
105 | |||
106 | #define INIT_DELAYED_WORK_NAR(_work, _func) \ | ||
107 | do { \ | ||
108 | INIT_WORK_NAR(&(_work)->work, (_func)); \ | ||
54 | init_timer(&(_work)->timer); \ | 109 | init_timer(&(_work)->timer); \ |
55 | } while (0) | 110 | } while (0) |
56 | 111 | ||
112 | /** | ||
113 | * work_pending - Find out whether a work item is currently pending | ||
114 | * @work: The work item in question | ||
115 | */ | ||
116 | #define work_pending(work) \ | ||
117 | test_bit(WORK_STRUCT_PENDING, &(work)->management) | ||
118 | |||
119 | /** | ||
120 | * delayed_work_pending - Find out whether a delayable work item is currently | ||
121 | * pending | ||
122 | * @work: The work item in question | ||
123 | */ | ||
124 | #define delayed_work_pending(work) \ | ||
125 | test_bit(WORK_STRUCT_PENDING, &(work)->work.management) | ||
126 | |||
127 | /** | ||
128 | * work_release - Release a work item under execution | ||
129 | * @work: The work item to release | ||
130 | * | ||
131 | * This is used to release a work item that has been initialised with automatic | ||
132 | * release mode disabled (WORK_STRUCT_NOAUTOREL is set). This gives the work | ||
133 | * function the opportunity to grab auxiliary data from the container of the | ||
134 | * work_struct before clearing the pending bit as the work_struct may be | ||
135 | * subject to deallocation the moment the pending bit is cleared. | ||
136 | * | ||
137 | * In such a case, this should be called in the work function after it has | ||
138 | * fetched any data it may require from the containter of the work_struct. | ||
139 | * After this function has been called, the work_struct may be scheduled for | ||
140 | * further execution or it may be deallocated unless other precautions are | ||
141 | * taken. | ||
142 | * | ||
143 | * This should also be used to release a delayed work item. | ||
144 | */ | ||
145 | #define work_release(work) \ | ||
146 | clear_bit(WORK_STRUCT_PENDING, &(work)->management) | ||
147 | |||
148 | |||
57 | extern struct workqueue_struct *__create_workqueue(const char *name, | 149 | extern struct workqueue_struct *__create_workqueue(const char *name, |
58 | int singlethread); | 150 | int singlethread); |
59 | #define create_workqueue(name) __create_workqueue((name), 0) | 151 | #define create_workqueue(name) __create_workqueue((name), 0) |
@@ -62,39 +154,38 @@ extern struct workqueue_struct *__create_workqueue(const char *name, | |||
62 | extern void destroy_workqueue(struct workqueue_struct *wq); | 154 | extern void destroy_workqueue(struct workqueue_struct *wq); |
63 | 155 | ||
64 | extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); | 156 | extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); |
65 | extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct work_struct *work, unsigned long delay)); | 157 | extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay)); |
66 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, | 158 | extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, |
67 | struct work_struct *work, unsigned long delay); | 159 | struct delayed_work *work, unsigned long delay); |
68 | extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); | 160 | extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); |
69 | 161 | ||
70 | extern int FASTCALL(schedule_work(struct work_struct *work)); | 162 | extern int FASTCALL(schedule_work(struct work_struct *work)); |
71 | extern int FASTCALL(schedule_delayed_work(struct work_struct *work, unsigned long delay)); | 163 | extern int FASTCALL(schedule_delayed_work(struct delayed_work *work, unsigned long delay)); |
72 | 164 | ||
73 | extern int schedule_delayed_work_on(int cpu, struct work_struct *work, unsigned long delay); | 165 | extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, unsigned long delay); |
74 | extern int schedule_on_each_cpu(void (*func)(void *info), void *info); | 166 | extern int schedule_on_each_cpu(work_func_t func); |
75 | extern void flush_scheduled_work(void); | 167 | extern void flush_scheduled_work(void); |
76 | extern int current_is_keventd(void); | 168 | extern int current_is_keventd(void); |
77 | extern int keventd_up(void); | 169 | extern int keventd_up(void); |
78 | 170 | ||
79 | extern void init_workqueues(void); | 171 | extern void init_workqueues(void); |
80 | void cancel_rearming_delayed_work(struct work_struct *work); | 172 | void cancel_rearming_delayed_work(struct delayed_work *work); |
81 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, | 173 | void cancel_rearming_delayed_workqueue(struct workqueue_struct *, |
82 | struct work_struct *); | 174 | struct delayed_work *); |
83 | int execute_in_process_context(void (*fn)(void *), void *, | 175 | int execute_in_process_context(work_func_t fn, struct execute_work *); |
84 | struct execute_work *); | ||
85 | 176 | ||
86 | /* | 177 | /* |
87 | * Kill off a pending schedule_delayed_work(). Note that the work callback | 178 | * Kill off a pending schedule_delayed_work(). Note that the work callback |
88 | * function may still be running on return from cancel_delayed_work(). Run | 179 | * function may still be running on return from cancel_delayed_work(). Run |
89 | * flush_scheduled_work() to wait on it. | 180 | * flush_scheduled_work() to wait on it. |
90 | */ | 181 | */ |
91 | static inline int cancel_delayed_work(struct work_struct *work) | 182 | static inline int cancel_delayed_work(struct delayed_work *work) |
92 | { | 183 | { |
93 | int ret; | 184 | int ret; |
94 | 185 | ||
95 | ret = del_timer_sync(&work->timer); | 186 | ret = del_timer_sync(&work->timer); |
96 | if (ret) | 187 | if (ret) |
97 | clear_bit(0, &work->pending); | 188 | clear_bit(WORK_STRUCT_PENDING, &work->work.management); |
98 | return ret; | 189 | return ret; |
99 | } | 190 | } |
100 | 191 | ||
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index 617b672b1132..89119277553d 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h | |||
@@ -108,8 +108,8 @@ struct ieee80211softmac_assoc_info { | |||
108 | /* Scan retries remaining */ | 108 | /* Scan retries remaining */ |
109 | int scan_retry; | 109 | int scan_retry; |
110 | 110 | ||
111 | struct work_struct work; | 111 | struct delayed_work work; |
112 | struct work_struct timeout; | 112 | struct delayed_work timeout; |
113 | }; | 113 | }; |
114 | 114 | ||
115 | struct ieee80211softmac_bss_info { | 115 | struct ieee80211softmac_bss_info { |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 5f48748fe017..f7be1ac73601 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -84,7 +84,7 @@ struct inet_timewait_death_row { | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern void inet_twdr_hangman(unsigned long data); | 86 | extern void inet_twdr_hangman(unsigned long data); |
87 | extern void inet_twdr_twkill_work(void *data); | 87 | extern void inet_twdr_twkill_work(struct work_struct *work); |
88 | extern void inet_twdr_twcal_tick(unsigned long data); | 88 | extern void inet_twdr_twcal_tick(unsigned long data); |
89 | 89 | ||
90 | #if (BITS_PER_LONG == 64) | 90 | #if (BITS_PER_LONG == 64) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index f8cbe40f52c0..c089f93ba591 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -1030,7 +1030,7 @@ void sctp_inq_init(struct sctp_inq *); | |||
1030 | void sctp_inq_free(struct sctp_inq *); | 1030 | void sctp_inq_free(struct sctp_inq *); |
1031 | void sctp_inq_push(struct sctp_inq *, struct sctp_chunk *packet); | 1031 | void sctp_inq_push(struct sctp_inq *, struct sctp_chunk *packet); |
1032 | struct sctp_chunk *sctp_inq_pop(struct sctp_inq *); | 1032 | struct sctp_chunk *sctp_inq_pop(struct sctp_inq *); |
1033 | void sctp_inq_set_th_handler(struct sctp_inq *, void (*)(void *), void *); | 1033 | void sctp_inq_set_th_handler(struct sctp_inq *, work_func_t); |
1034 | 1034 | ||
1035 | /* This is the structure we use to hold outbound chunks. You push | 1035 | /* This is the structure we use to hold outbound chunks. You push |
1036 | * chunks in and they automatically pop out the other end as bundled | 1036 | * chunks in and they automatically pop out the other end as bundled |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 1d77b63c5ea4..1f989fb42c70 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -201,9 +201,14 @@ struct domain_device { | |||
201 | void *lldd_dev; | 201 | void *lldd_dev; |
202 | }; | 202 | }; |
203 | 203 | ||
204 | struct sas_discovery_event { | ||
205 | struct work_struct work; | ||
206 | struct asd_sas_port *port; | ||
207 | }; | ||
208 | |||
204 | struct sas_discovery { | 209 | struct sas_discovery { |
205 | spinlock_t disc_event_lock; | 210 | spinlock_t disc_event_lock; |
206 | struct work_struct disc_work[DISC_NUM_EVENTS]; | 211 | struct sas_discovery_event disc_work[DISC_NUM_EVENTS]; |
207 | unsigned long pending; | 212 | unsigned long pending; |
208 | u8 fanout_sas_addr[8]; | 213 | u8 fanout_sas_addr[8]; |
209 | u8 eeds_a[8]; | 214 | u8 eeds_a[8]; |
@@ -249,14 +254,19 @@ struct asd_sas_port { | |||
249 | void *lldd_port; /* not touched by the sas class code */ | 254 | void *lldd_port; /* not touched by the sas class code */ |
250 | }; | 255 | }; |
251 | 256 | ||
257 | struct asd_sas_event { | ||
258 | struct work_struct work; | ||
259 | struct asd_sas_phy *phy; | ||
260 | }; | ||
261 | |||
252 | /* The phy pretty much is controlled by the LLDD. | 262 | /* The phy pretty much is controlled by the LLDD. |
253 | * The class only reads those fields. | 263 | * The class only reads those fields. |
254 | */ | 264 | */ |
255 | struct asd_sas_phy { | 265 | struct asd_sas_phy { |
256 | /* private: */ | 266 | /* private: */ |
257 | /* protected by ha->event_lock */ | 267 | /* protected by ha->event_lock */ |
258 | struct work_struct port_events[PORT_NUM_EVENTS]; | 268 | struct asd_sas_event port_events[PORT_NUM_EVENTS]; |
259 | struct work_struct phy_events[PHY_NUM_EVENTS]; | 269 | struct asd_sas_event phy_events[PHY_NUM_EVENTS]; |
260 | 270 | ||
261 | unsigned long port_events_pending; | 271 | unsigned long port_events_pending; |
262 | unsigned long phy_events_pending; | 272 | unsigned long phy_events_pending; |
@@ -308,10 +318,15 @@ struct scsi_core { | |||
308 | int queue_thread_kill; | 318 | int queue_thread_kill; |
309 | }; | 319 | }; |
310 | 320 | ||
321 | struct sas_ha_event { | ||
322 | struct work_struct work; | ||
323 | struct sas_ha_struct *ha; | ||
324 | }; | ||
325 | |||
311 | struct sas_ha_struct { | 326 | struct sas_ha_struct { |
312 | /* private: */ | 327 | /* private: */ |
313 | spinlock_t event_lock; | 328 | spinlock_t event_lock; |
314 | struct work_struct ha_events[HA_NUM_EVENTS]; | 329 | struct sas_ha_event ha_events[HA_NUM_EVENTS]; |
315 | unsigned long pending; | 330 | unsigned long pending; |
316 | 331 | ||
317 | struct scsi_core core; | 332 | struct scsi_core core; |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index fd352323378b..798f7c7ee426 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
@@ -206,9 +206,9 @@ struct fc_rport { /* aka fc_starget_attrs */ | |||
206 | u8 flags; | 206 | u8 flags; |
207 | struct list_head peers; | 207 | struct list_head peers; |
208 | struct device dev; | 208 | struct device dev; |
209 | struct work_struct dev_loss_work; | 209 | struct delayed_work dev_loss_work; |
210 | struct work_struct scan_work; | 210 | struct work_struct scan_work; |
211 | struct work_struct fail_io_work; | 211 | struct delayed_work fail_io_work; |
212 | struct work_struct stgt_delete_work; | 212 | struct work_struct stgt_delete_work; |
213 | struct work_struct rport_delete_work; | 213 | struct work_struct rport_delete_work; |
214 | } __attribute__((aligned(sizeof(unsigned long)))); | 214 | } __attribute__((aligned(sizeof(unsigned long)))); |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 4b95c89c95c9..d5c218ddc527 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -176,7 +176,7 @@ struct iscsi_cls_session { | |||
176 | 176 | ||
177 | /* recovery fields */ | 177 | /* recovery fields */ |
178 | int recovery_tmo; | 178 | int recovery_tmo; |
179 | struct work_struct recovery_work; | 179 | struct delayed_work recovery_work; |
180 | 180 | ||
181 | int target_id; | 181 | int target_id; |
182 | 182 | ||
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h index 4c43521cc493..33720397a904 100644 --- a/include/sound/ac97_codec.h +++ b/include/sound/ac97_codec.h | |||
@@ -511,7 +511,7 @@ struct snd_ac97 { | |||
511 | #ifdef CONFIG_SND_AC97_POWER_SAVE | 511 | #ifdef CONFIG_SND_AC97_POWER_SAVE |
512 | unsigned int power_up; /* power states */ | 512 | unsigned int power_up; /* power states */ |
513 | struct workqueue_struct *power_workq; | 513 | struct workqueue_struct *power_workq; |
514 | struct work_struct power_work; | 514 | struct delayed_work power_work; |
515 | #endif | 515 | #endif |
516 | struct device dev; | 516 | struct device dev; |
517 | }; | 517 | }; |
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index 11702aa0bea9..2ee061625fd0 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h | |||
@@ -182,7 +182,7 @@ struct ak4114 { | |||
182 | unsigned char rcs0; | 182 | unsigned char rcs0; |
183 | unsigned char rcs1; | 183 | unsigned char rcs1; |
184 | struct workqueue_struct *workqueue; | 184 | struct workqueue_struct *workqueue; |
185 | struct work_struct work; | 185 | struct delayed_work work; |
186 | void *change_callback_private; | 186 | void *change_callback_private; |
187 | void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1); | 187 | void (*change_callback)(struct ak4114 *ak4114, unsigned char c0, unsigned char c1); |
188 | }; | 188 | }; |