diff options
Diffstat (limited to 'drivers/pci/hotplug/shpchp_ctrl.c')
-rw-r--r-- | drivers/pci/hotplug/shpchp_ctrl.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index c39901dbff20..158ac7836096 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "../pci.h" | 36 | #include "../pci.h" |
37 | #include "shpchp.h" | 37 | #include "shpchp.h" |
38 | 38 | ||
39 | static void interrupt_event_handler(void *data); | 39 | static void interrupt_event_handler(struct work_struct *work); |
40 | static int shpchp_enable_slot(struct slot *p_slot); | 40 | static int shpchp_enable_slot(struct slot *p_slot); |
41 | static int shpchp_disable_slot(struct slot *p_slot); | 41 | static int shpchp_disable_slot(struct slot *p_slot); |
42 | 42 | ||
@@ -50,7 +50,7 @@ static int queue_interrupt_event(struct slot *p_slot, u32 event_type) | |||
50 | 50 | ||
51 | info->event_type = event_type; | 51 | info->event_type = event_type; |
52 | info->p_slot = p_slot; | 52 | info->p_slot = p_slot; |
53 | INIT_WORK(&info->work, interrupt_event_handler, info); | 53 | INIT_WORK(&info->work, interrupt_event_handler); |
54 | 54 | ||
55 | schedule_work(&info->work); | 55 | schedule_work(&info->work); |
56 | 56 | ||
@@ -408,9 +408,10 @@ struct pushbutton_work_info { | |||
408 | * Handles all pending events and exits. | 408 | * Handles all pending events and exits. |
409 | * | 409 | * |
410 | */ | 410 | */ |
411 | static void shpchp_pushbutton_thread(void *data) | 411 | static void shpchp_pushbutton_thread(struct work_struct *work) |
412 | { | 412 | { |
413 | struct pushbutton_work_info *info = data; | 413 | struct pushbutton_work_info *info = |
414 | container_of(work, struct pushbutton_work_info, work); | ||
414 | struct slot *p_slot = info->p_slot; | 415 | struct slot *p_slot = info->p_slot; |
415 | 416 | ||
416 | mutex_lock(&p_slot->lock); | 417 | mutex_lock(&p_slot->lock); |
@@ -436,9 +437,9 @@ static void shpchp_pushbutton_thread(void *data) | |||
436 | kfree(info); | 437 | kfree(info); |
437 | } | 438 | } |
438 | 439 | ||
439 | void queue_pushbutton_work(void *data) | 440 | void queue_pushbutton_work(struct work_struct *work) |
440 | { | 441 | { |
441 | struct slot *p_slot = data; | 442 | struct slot *p_slot = container_of(work, struct slot, work.work); |
442 | struct pushbutton_work_info *info; | 443 | struct pushbutton_work_info *info; |
443 | 444 | ||
444 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 445 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
@@ -447,7 +448,7 @@ void queue_pushbutton_work(void *data) | |||
447 | return; | 448 | return; |
448 | } | 449 | } |
449 | info->p_slot = p_slot; | 450 | info->p_slot = p_slot; |
450 | INIT_WORK(&info->work, shpchp_pushbutton_thread, info); | 451 | INIT_WORK(&info->work, shpchp_pushbutton_thread); |
451 | 452 | ||
452 | mutex_lock(&p_slot->lock); | 453 | mutex_lock(&p_slot->lock); |
453 | switch (p_slot->state) { | 454 | switch (p_slot->state) { |
@@ -541,9 +542,9 @@ static void handle_button_press_event(struct slot *p_slot) | |||
541 | } | 542 | } |
542 | } | 543 | } |
543 | 544 | ||
544 | static void interrupt_event_handler(void *data) | 545 | static void interrupt_event_handler(struct work_struct *work) |
545 | { | 546 | { |
546 | struct event_info *info = data; | 547 | struct event_info *info = container_of(work, struct event_info, work); |
547 | struct slot *p_slot = info->p_slot; | 548 | struct slot *p_slot = info->p_slot; |
548 | 549 | ||
549 | mutex_lock(&p_slot->lock); | 550 | mutex_lock(&p_slot->lock); |