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/message/i2o | |
parent | 65f27f38446e1976cc98fd3004b110fedcddd189 (diff) |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r-- | drivers/message/i2o/driver.c | 2 | ||||
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 13 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_block.c | 15 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_block.h | 2 |
4 files changed, 19 insertions, 13 deletions
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c index 64130227574f..7fc7399bd2ec 100644 --- a/drivers/message/i2o/driver.c +++ b/drivers/message/i2o/driver.c | |||
@@ -232,7 +232,7 @@ int i2o_driver_dispatch(struct i2o_controller *c, u32 m) | |||
232 | break; | 232 | break; |
233 | } | 233 | } |
234 | 234 | ||
235 | INIT_WORK(&evt->work, (void (*)(void *))drv->event, evt); | 235 | INIT_WORK(&evt->work, drv->event); |
236 | queue_work(drv->event_queue, &evt->work); | 236 | queue_work(drv->event_queue, &evt->work); |
237 | return 1; | 237 | return 1; |
238 | } | 238 | } |
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index a2350640384b..9e529d8dd5cb 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -371,8 +371,10 @@ static int i2o_exec_remove(struct device *dev) | |||
371 | * new LCT and if the buffer for the LCT was to small sends a LCT NOTIFY | 371 | * new LCT and if the buffer for the LCT was to small sends a LCT NOTIFY |
372 | * again, otherwise send LCT NOTIFY to get informed on next LCT change. | 372 | * again, otherwise send LCT NOTIFY to get informed on next LCT change. |
373 | */ | 373 | */ |
374 | static void i2o_exec_lct_modified(struct i2o_exec_lct_notify_work *work) | 374 | static void i2o_exec_lct_modified(struct work_struct *_work) |
375 | { | 375 | { |
376 | struct i2o_exec_lct_notify_work *work = | ||
377 | container_of(_work, struct i2o_exec_lct_notify_work, work); | ||
376 | u32 change_ind = 0; | 378 | u32 change_ind = 0; |
377 | struct i2o_controller *c = work->c; | 379 | struct i2o_controller *c = work->c; |
378 | 380 | ||
@@ -439,8 +441,7 @@ static int i2o_exec_reply(struct i2o_controller *c, u32 m, | |||
439 | 441 | ||
440 | work->c = c; | 442 | work->c = c; |
441 | 443 | ||
442 | INIT_WORK(&work->work, (void (*)(void *))i2o_exec_lct_modified, | 444 | INIT_WORK(&work->work, i2o_exec_lct_modified); |
443 | work); | ||
444 | queue_work(i2o_exec_driver.event_queue, &work->work); | 445 | queue_work(i2o_exec_driver.event_queue, &work->work); |
445 | return 1; | 446 | return 1; |
446 | } | 447 | } |
@@ -460,13 +461,15 @@ static int i2o_exec_reply(struct i2o_controller *c, u32 m, | |||
460 | 461 | ||
461 | /** | 462 | /** |
462 | * i2o_exec_event - Event handling function | 463 | * i2o_exec_event - Event handling function |
463 | * @evt: Event which occurs | 464 | * @work: Work item in occurring event |
464 | * | 465 | * |
465 | * Handles events send by the Executive device. At the moment does not do | 466 | * Handles events send by the Executive device. At the moment does not do |
466 | * anything useful. | 467 | * anything useful. |
467 | */ | 468 | */ |
468 | static void i2o_exec_event(struct i2o_event *evt) | 469 | static void i2o_exec_event(struct work_struct *work) |
469 | { | 470 | { |
471 | struct i2o_event *evt = container_of(work, struct i2o_event, work); | ||
472 | |||
470 | if (likely(evt->i2o_dev)) | 473 | if (likely(evt->i2o_dev)) |
471 | osm_debug("Event received from device: %d\n", | 474 | osm_debug("Event received from device: %d\n", |
472 | evt->i2o_dev->lct_data.tid); | 475 | evt->i2o_dev->lct_data.tid); |
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index eaba81bf2eca..70ae00253321 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c | |||
@@ -419,16 +419,18 @@ static int i2o_block_prep_req_fn(struct request_queue *q, struct request *req) | |||
419 | 419 | ||
420 | /** | 420 | /** |
421 | * i2o_block_delayed_request_fn - delayed request queue function | 421 | * i2o_block_delayed_request_fn - delayed request queue function |
422 | * delayed_request: the delayed request with the queue to start | 422 | * @work: the delayed request with the queue to start |
423 | * | 423 | * |
424 | * If the request queue is stopped for a disk, and there is no open | 424 | * If the request queue is stopped for a disk, and there is no open |
425 | * request, a new event is created, which calls this function to start | 425 | * request, a new event is created, which calls this function to start |
426 | * the queue after I2O_BLOCK_REQUEST_TIME. Otherwise the queue will never | 426 | * the queue after I2O_BLOCK_REQUEST_TIME. Otherwise the queue will never |
427 | * be started again. | 427 | * be started again. |
428 | */ | 428 | */ |
429 | static void i2o_block_delayed_request_fn(void *delayed_request) | 429 | static void i2o_block_delayed_request_fn(struct work_struct *work) |
430 | { | 430 | { |
431 | struct i2o_block_delayed_request *dreq = delayed_request; | 431 | struct i2o_block_delayed_request *dreq = |
432 | container_of(work, struct i2o_block_delayed_request, | ||
433 | work.work); | ||
432 | struct request_queue *q = dreq->queue; | 434 | struct request_queue *q = dreq->queue; |
433 | unsigned long flags; | 435 | unsigned long flags; |
434 | 436 | ||
@@ -538,8 +540,9 @@ static int i2o_block_reply(struct i2o_controller *c, u32 m, | |||
538 | return 1; | 540 | return 1; |
539 | }; | 541 | }; |
540 | 542 | ||
541 | static void i2o_block_event(struct i2o_event *evt) | 543 | static void i2o_block_event(struct work_struct *work) |
542 | { | 544 | { |
545 | struct i2o_event *evt = container_of(work, struct i2o_event, work); | ||
543 | osm_debug("event received\n"); | 546 | osm_debug("event received\n"); |
544 | kfree(evt); | 547 | kfree(evt); |
545 | }; | 548 | }; |
@@ -938,8 +941,8 @@ static void i2o_block_request_fn(struct request_queue *q) | |||
938 | continue; | 941 | continue; |
939 | 942 | ||
940 | dreq->queue = q; | 943 | dreq->queue = q; |
941 | INIT_WORK(&dreq->work, i2o_block_delayed_request_fn, | 944 | INIT_DELAYED_WORK(&dreq->work, |
942 | dreq); | 945 | i2o_block_delayed_request_fn); |
943 | 946 | ||
944 | if (!queue_delayed_work(i2o_block_driver.event_queue, | 947 | if (!queue_delayed_work(i2o_block_driver.event_queue, |
945 | &dreq->work, | 948 | &dreq->work, |
diff --git a/drivers/message/i2o/i2o_block.h b/drivers/message/i2o/i2o_block.h index 4fdaa5bda412..d9fdc95b440d 100644 --- a/drivers/message/i2o/i2o_block.h +++ b/drivers/message/i2o/i2o_block.h | |||
@@ -96,7 +96,7 @@ struct i2o_block_request { | |||
96 | 96 | ||
97 | /* I2O Block device delayed request */ | 97 | /* I2O Block device delayed request */ |
98 | struct i2o_block_delayed_request { | 98 | struct i2o_block_delayed_request { |
99 | struct work_struct work; | 99 | struct delayed_work work; |
100 | struct request_queue *queue; | 100 | struct request_queue *queue; |
101 | }; | 101 | }; |
102 | 102 | ||