diff options
34 files changed, 154 insertions, 121 deletions
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 605dedf96790..b3599743093b 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c | |||
| @@ -60,16 +60,16 @@ static int sharpsl_ac_check(void); | |||
| 60 | static int sharpsl_fatal_check(void); | 60 | static int sharpsl_fatal_check(void); |
| 61 | static int sharpsl_average_value(int ad); | 61 | static int sharpsl_average_value(int ad); |
| 62 | static void sharpsl_average_clear(void); | 62 | static void sharpsl_average_clear(void); |
| 63 | static void sharpsl_charge_toggle(void *private_); | 63 | static void sharpsl_charge_toggle(struct work_struct *private_); |
| 64 | static void sharpsl_battery_thread(void *private_); | 64 | static void sharpsl_battery_thread(struct work_struct *private_); |
| 65 | 65 | ||
| 66 | 66 | ||
| 67 | /* | 67 | /* |
| 68 | * Variables | 68 | * Variables |
| 69 | */ | 69 | */ |
| 70 | struct sharpsl_pm_status sharpsl_pm; | 70 | struct sharpsl_pm_status sharpsl_pm; |
| 71 | DECLARE_WORK(toggle_charger, sharpsl_charge_toggle, NULL); | 71 | DECLARE_DELAYED_WORK(toggle_charger, sharpsl_charge_toggle); |
| 72 | DECLARE_WORK(sharpsl_bat, sharpsl_battery_thread, NULL); | 72 | DECLARE_DELAYED_WORK(sharpsl_bat, sharpsl_battery_thread); |
| 73 | DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger); | 73 | DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger); |
| 74 | 74 | ||
| 75 | 75 | ||
| @@ -116,7 +116,7 @@ void sharpsl_battery_kick(void) | |||
| 116 | EXPORT_SYMBOL(sharpsl_battery_kick); | 116 | EXPORT_SYMBOL(sharpsl_battery_kick); |
| 117 | 117 | ||
| 118 | 118 | ||
| 119 | static void sharpsl_battery_thread(void *private_) | 119 | static void sharpsl_battery_thread(struct work_struct *private_) |
| 120 | { | 120 | { |
| 121 | int voltage, percent, apm_status, i = 0; | 121 | int voltage, percent, apm_status, i = 0; |
| 122 | 122 | ||
| @@ -128,7 +128,7 @@ static void sharpsl_battery_thread(void *private_) | |||
| 128 | /* Corgi cannot confirm when battery fully charged so periodically kick! */ | 128 | /* Corgi cannot confirm when battery fully charged so periodically kick! */ |
| 129 | if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON) | 129 | if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON) |
| 130 | && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL)) | 130 | && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL)) |
| 131 | schedule_work(&toggle_charger); | 131 | schedule_delayed_work(&toggle_charger, 0); |
| 132 | 132 | ||
| 133 | while(1) { | 133 | while(1) { |
| 134 | voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); | 134 | voltage = sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT); |
| @@ -212,7 +212,7 @@ static void sharpsl_charge_off(void) | |||
| 212 | sharpsl_pm_led(SHARPSL_LED_OFF); | 212 | sharpsl_pm_led(SHARPSL_LED_OFF); |
| 213 | sharpsl_pm.charge_mode = CHRG_OFF; | 213 | sharpsl_pm.charge_mode = CHRG_OFF; |
| 214 | 214 | ||
| 215 | schedule_work(&sharpsl_bat); | 215 | schedule_delayed_work(&sharpsl_bat, 0); |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | static void sharpsl_charge_error(void) | 218 | static void sharpsl_charge_error(void) |
| @@ -222,7 +222,7 @@ static void sharpsl_charge_error(void) | |||
| 222 | sharpsl_pm.charge_mode = CHRG_ERROR; | 222 | sharpsl_pm.charge_mode = CHRG_ERROR; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | static void sharpsl_charge_toggle(void *private_) | 225 | static void sharpsl_charge_toggle(struct work_struct *private_) |
| 226 | { | 226 | { |
| 227 | dev_dbg(sharpsl_pm.dev, "Toogling Charger at time: %lx\n", jiffies); | 227 | dev_dbg(sharpsl_pm.dev, "Toogling Charger at time: %lx\n", jiffies); |
| 228 | 228 | ||
| @@ -254,7 +254,7 @@ static void sharpsl_ac_timer(unsigned long data) | |||
| 254 | else if (sharpsl_pm.charge_mode == CHRG_ON) | 254 | else if (sharpsl_pm.charge_mode == CHRG_ON) |
| 255 | sharpsl_charge_off(); | 255 | sharpsl_charge_off(); |
| 256 | 256 | ||
| 257 | schedule_work(&sharpsl_bat); | 257 | schedule_delayed_work(&sharpsl_bat, 0); |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | 260 | ||
| @@ -279,10 +279,10 @@ static void sharpsl_chrg_full_timer(unsigned long data) | |||
| 279 | sharpsl_charge_off(); | 279 | sharpsl_charge_off(); |
| 280 | } else if (sharpsl_pm.full_count < 2) { | 280 | } else if (sharpsl_pm.full_count < 2) { |
| 281 | dev_dbg(sharpsl_pm.dev, "Charge Full: Count too low\n"); | 281 | dev_dbg(sharpsl_pm.dev, "Charge Full: Count too low\n"); |
| 282 | schedule_work(&toggle_charger); | 282 | schedule_delayed_work(&toggle_charger, 0); |
| 283 | } else if (time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_FINISH_TIME)) { | 283 | } else if (time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_FINISH_TIME)) { |
| 284 | dev_dbg(sharpsl_pm.dev, "Charge Full: Interrupt generated too slowly - retry.\n"); | 284 | dev_dbg(sharpsl_pm.dev, "Charge Full: Interrupt generated too slowly - retry.\n"); |
| 285 | schedule_work(&toggle_charger); | 285 | schedule_delayed_work(&toggle_charger, 0); |
| 286 | } else { | 286 | } else { |
| 287 | sharpsl_charge_off(); | 287 | sharpsl_charge_off(); |
| 288 | sharpsl_pm.charge_mode = CHRG_DONE; | 288 | sharpsl_pm.charge_mode = CHRG_DONE; |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index f225a083dee1..9d2346fb68f4 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
| @@ -323,7 +323,8 @@ static int h3_transceiver_mode(struct device *dev, int mode) | |||
| 323 | 323 | ||
| 324 | cancel_delayed_work(&irda_config->gpio_expa); | 324 | cancel_delayed_work(&irda_config->gpio_expa); |
| 325 | PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); | 325 | PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); |
| 326 | schedule_work(&irda_config->gpio_expa); | 326 | #error this is not permitted - mode is an argument variable |
| 327 | schedule_delayed_work(&irda_config->gpio_expa, 0); | ||
| 327 | 328 | ||
| 328 | return 0; | 329 | return 0; |
| 329 | } | 330 | } |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index dbc555d209ff..cbe909bad79b 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
| @@ -74,7 +74,7 @@ static struct omap_kp_platform_data nokia770_kp_data = { | |||
| 74 | .rows = 8, | 74 | .rows = 8, |
| 75 | .cols = 8, | 75 | .cols = 8, |
| 76 | .keymap = nokia770_keymap, | 76 | .keymap = nokia770_keymap, |
| 77 | .keymapsize = ARRAY_SIZE(nokia770_keymap) | 77 | .keymapsize = ARRAY_SIZE(nokia770_keymap), |
| 78 | .delay = 4, | 78 | .delay = 4, |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| @@ -191,7 +191,7 @@ static void nokia770_audio_pwr_up(void) | |||
| 191 | printk("HP connected\n"); | 191 | printk("HP connected\n"); |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | static void codec_delayed_power_down(void *arg) | 194 | static void codec_delayed_power_down(struct work_struct *work) |
| 195 | { | 195 | { |
| 196 | down(&audio_pwr_sem); | 196 | down(&audio_pwr_sem); |
| 197 | if (audio_pwr_state == -1) | 197 | if (audio_pwr_state == -1) |
| @@ -200,7 +200,7 @@ static void codec_delayed_power_down(void *arg) | |||
| 200 | up(&audio_pwr_sem); | 200 | up(&audio_pwr_sem); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static DECLARE_WORK(codec_power_down_work, codec_delayed_power_down, NULL); | 203 | static DECLARE_DELAYED_WORK(codec_power_down_work, codec_delayed_power_down); |
| 204 | 204 | ||
| 205 | static void nokia770_audio_pwr_down(void) | 205 | static void nokia770_audio_pwr_down(void) |
| 206 | { | 206 | { |
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c index 3b29e59b0e6f..0cbf1b0071f8 100644 --- a/arch/arm/mach-omap1/leds-osk.c +++ b/arch/arm/mach-omap1/leds-osk.c | |||
| @@ -35,7 +35,7 @@ static u8 hw_led_state; | |||
| 35 | 35 | ||
| 36 | static u8 tps_leds_change; | 36 | static u8 tps_leds_change; |
| 37 | 37 | ||
| 38 | static void tps_work(void *unused) | 38 | static void tps_work(struct work_struct *unused) |
| 39 | { | 39 | { |
| 40 | for (;;) { | 40 | for (;;) { |
| 41 | u8 leds; | 41 | u8 leds; |
| @@ -61,7 +61,7 @@ static void tps_work(void *unused) | |||
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static DECLARE_WORK(work, tps_work, NULL); | 64 | static DECLARE_WORK(work, tps_work); |
| 65 | 65 | ||
| 66 | #ifdef CONFIG_OMAP_OSK_MISTRAL | 66 | #ifdef CONFIG_OMAP_OSK_MISTRAL |
| 67 | 67 | ||
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 26a95a642ad7..3b1ad1d981a3 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
| @@ -206,7 +206,8 @@ static int h4_transceiver_mode(struct device *dev, int mode) | |||
| 206 | 206 | ||
| 207 | cancel_delayed_work(&irda_config->gpio_expa); | 207 | cancel_delayed_work(&irda_config->gpio_expa); |
| 208 | PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); | 208 | PREPARE_WORK(&irda_config->gpio_expa, set_trans_mode, &mode); |
| 209 | schedule_work(&irda_config->gpio_expa); | 209 | #error this is not permitted - mode is an argument variable |
| 210 | schedule_delayed_work(&irda_config->gpio_expa, 0); | ||
| 210 | 211 | ||
| 211 | return 0; | 212 | return 0; |
| 212 | } | 213 | } |
diff --git a/arch/arm/mach-pxa/akita-ioexp.c b/arch/arm/mach-pxa/akita-ioexp.c index 1b398742ab56..12d2fe0ceff6 100644 --- a/arch/arm/mach-pxa/akita-ioexp.c +++ b/arch/arm/mach-pxa/akita-ioexp.c | |||
| @@ -36,11 +36,11 @@ I2C_CLIENT_INSMOD; | |||
| 36 | 36 | ||
| 37 | static int max7310_write(struct i2c_client *client, int address, int data); | 37 | static int max7310_write(struct i2c_client *client, int address, int data); |
| 38 | static struct i2c_client max7310_template; | 38 | static struct i2c_client max7310_template; |
| 39 | static void akita_ioexp_work(void *private_); | 39 | static void akita_ioexp_work(struct work_struct *private_); |
| 40 | 40 | ||
| 41 | static struct device *akita_ioexp_device; | 41 | static struct device *akita_ioexp_device; |
| 42 | static unsigned char ioexp_output_value = AKITA_IOEXP_IO_OUT; | 42 | static unsigned char ioexp_output_value = AKITA_IOEXP_IO_OUT; |
| 43 | DECLARE_WORK(akita_ioexp, akita_ioexp_work, NULL); | 43 | DECLARE_WORK(akita_ioexp, akita_ioexp_work); |
| 44 | 44 | ||
| 45 | 45 | ||
| 46 | /* | 46 | /* |
| @@ -158,7 +158,7 @@ void akita_reset_ioexp(struct device *dev, unsigned char bit) | |||
| 158 | EXPORT_SYMBOL(akita_set_ioexp); | 158 | EXPORT_SYMBOL(akita_set_ioexp); |
| 159 | EXPORT_SYMBOL(akita_reset_ioexp); | 159 | EXPORT_SYMBOL(akita_reset_ioexp); |
| 160 | 160 | ||
| 161 | static void akita_ioexp_work(void *private_) | 161 | static void akita_ioexp_work(struct work_struct *private_) |
| 162 | { | 162 | { |
| 163 | if (akita_ioexp_device) | 163 | if (akita_ioexp_device) |
| 164 | max7310_set_ouputs(akita_ioexp_device, ioexp_output_value); | 164 | max7310_set_ouputs(akita_ioexp_device, ioexp_output_value); |
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index caab986af70c..b62f0c4d2c7c 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
| @@ -209,7 +209,7 @@ static void do_serial_bh(void) | |||
| 209 | } | 209 | } |
| 210 | #endif | 210 | #endif |
| 211 | 211 | ||
| 212 | static void do_softint(void *private_) | 212 | static void do_softint(struct work_struct *private_) |
| 213 | { | 213 | { |
| 214 | printk(KERN_ERR "simserial: do_softint called\n"); | 214 | printk(KERN_ERR "simserial: do_softint called\n"); |
| 215 | } | 215 | } |
| @@ -698,7 +698,7 @@ static int get_async_struct(int line, struct async_struct **ret_info) | |||
| 698 | info->flags = sstate->flags; | 698 | info->flags = sstate->flags; |
| 699 | info->xmit_fifo_size = sstate->xmit_fifo_size; | 699 | info->xmit_fifo_size = sstate->xmit_fifo_size; |
| 700 | info->line = line; | 700 | info->line = line; |
| 701 | INIT_WORK(&info->work, do_softint, info); | 701 | INIT_WORK(&info->work, do_softint); |
| 702 | info->state = sstate; | 702 | info->state = sstate; |
| 703 | if (sstate->info) { | 703 | if (sstate->info) { |
| 704 | kfree(info); | 704 | kfree(info); |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 7cfa63a98cb3..6bedd97570ca 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
| @@ -678,7 +678,7 @@ ia64_mca_cmc_vector_enable (void *dummy) | |||
| 678 | * disable the cmc interrupt vector. | 678 | * disable the cmc interrupt vector. |
| 679 | */ | 679 | */ |
| 680 | static void | 680 | static void |
| 681 | ia64_mca_cmc_vector_disable_keventd(void *unused) | 681 | ia64_mca_cmc_vector_disable_keventd(struct work_struct *unused) |
| 682 | { | 682 | { |
| 683 | on_each_cpu(ia64_mca_cmc_vector_disable, NULL, 1, 0); | 683 | on_each_cpu(ia64_mca_cmc_vector_disable, NULL, 1, 0); |
| 684 | } | 684 | } |
| @@ -690,7 +690,7 @@ ia64_mca_cmc_vector_disable_keventd(void *unused) | |||
| 690 | * enable the cmc interrupt vector. | 690 | * enable the cmc interrupt vector. |
| 691 | */ | 691 | */ |
| 692 | static void | 692 | static void |
| 693 | ia64_mca_cmc_vector_enable_keventd(void *unused) | 693 | ia64_mca_cmc_vector_enable_keventd(struct work_struct *unused) |
| 694 | { | 694 | { |
| 695 | on_each_cpu(ia64_mca_cmc_vector_enable, NULL, 1, 0); | 695 | on_each_cpu(ia64_mca_cmc_vector_enable, NULL, 1, 0); |
| 696 | } | 696 | } |
| @@ -1247,8 +1247,8 @@ ia64_mca_handler(struct pt_regs *regs, struct switch_stack *sw, | |||
| 1247 | monarch_cpu = -1; | 1247 | monarch_cpu = -1; |
| 1248 | } | 1248 | } |
| 1249 | 1249 | ||
| 1250 | static DECLARE_WORK(cmc_disable_work, ia64_mca_cmc_vector_disable_keventd, NULL); | 1250 | static DECLARE_WORK(cmc_disable_work, ia64_mca_cmc_vector_disable_keventd); |
| 1251 | static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd, NULL); | 1251 | static DECLARE_WORK(cmc_enable_work, ia64_mca_cmc_vector_enable_keventd); |
| 1252 | 1252 | ||
| 1253 | /* | 1253 | /* |
| 1254 | * ia64_mca_cmc_int_handler | 1254 | * ia64_mca_cmc_int_handler |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index f7d7f5668144..b21ddecea943 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
| @@ -463,15 +463,17 @@ struct pt_regs * __devinit idle_regs(struct pt_regs *regs) | |||
| 463 | } | 463 | } |
| 464 | 464 | ||
| 465 | struct create_idle { | 465 | struct create_idle { |
| 466 | struct work_struct work; | ||
| 466 | struct task_struct *idle; | 467 | struct task_struct *idle; |
| 467 | struct completion done; | 468 | struct completion done; |
| 468 | int cpu; | 469 | int cpu; |
| 469 | }; | 470 | }; |
| 470 | 471 | ||
| 471 | void | 472 | void |
| 472 | do_fork_idle(void *_c_idle) | 473 | do_fork_idle(struct work_struct *work) |
| 473 | { | 474 | { |
| 474 | struct create_idle *c_idle = _c_idle; | 475 | struct create_idle *c_idle = |
| 476 | container_of(work, struct create_idle, work); | ||
| 475 | 477 | ||
| 476 | c_idle->idle = fork_idle(c_idle->cpu); | 478 | c_idle->idle = fork_idle(c_idle->cpu); |
| 477 | complete(&c_idle->done); | 479 | complete(&c_idle->done); |
| @@ -482,10 +484,10 @@ do_boot_cpu (int sapicid, int cpu) | |||
| 482 | { | 484 | { |
| 483 | int timeout; | 485 | int timeout; |
| 484 | struct create_idle c_idle = { | 486 | struct create_idle c_idle = { |
| 487 | .work = __WORK_INITIALIZER(c_idle.work, do_fork_idle), | ||
| 485 | .cpu = cpu, | 488 | .cpu = cpu, |
| 486 | .done = COMPLETION_INITIALIZER(c_idle.done), | 489 | .done = COMPLETION_INITIALIZER(c_idle.done), |
| 487 | }; | 490 | }; |
| 488 | DECLARE_WORK(work, do_fork_idle, &c_idle); | ||
| 489 | 491 | ||
| 490 | c_idle.idle = get_idle_for_cpu(cpu); | 492 | c_idle.idle = get_idle_for_cpu(cpu); |
| 491 | if (c_idle.idle) { | 493 | if (c_idle.idle) { |
| @@ -497,9 +499,9 @@ do_boot_cpu (int sapicid, int cpu) | |||
| 497 | * We can't use kernel_thread since we must avoid to reschedule the child. | 499 | * We can't use kernel_thread since we must avoid to reschedule the child. |
| 498 | */ | 500 | */ |
| 499 | if (!keventd_up() || current_is_keventd()) | 501 | if (!keventd_up() || current_is_keventd()) |
| 500 | work.func(work.data); | 502 | c_idle.work.func(&c_idle.work); |
| 501 | else { | 503 | else { |
| 502 | schedule_work(&work); | 504 | schedule_work(&c_idle.work); |
| 503 | wait_for_completion(&c_idle.done); | 505 | wait_for_completion(&c_idle.done); |
| 504 | } | 506 | } |
| 505 | 507 | ||
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index f06a144c7881..2c82412b9efe 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
| @@ -319,7 +319,7 @@ static void sp_cleanup(void) | |||
| 319 | static int channel_open = 0; | 319 | static int channel_open = 0; |
| 320 | 320 | ||
| 321 | /* the work handler */ | 321 | /* the work handler */ |
| 322 | static void sp_work(void *data) | 322 | static void sp_work(struct work_struct *unused) |
| 323 | { | 323 | { |
| 324 | if (!channel_open) { | 324 | if (!channel_open) { |
| 325 | if( rtlx_open(RTLX_CHANNEL_SYSIO, 1) != 0) { | 325 | if( rtlx_open(RTLX_CHANNEL_SYSIO, 1) != 0) { |
| @@ -354,7 +354,7 @@ static void startwork(int vpe) | |||
| 354 | return; | 354 | return; |
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | INIT_WORK(&work, sp_work, NULL); | 357 | INIT_WORK(&work, sp_work); |
| 358 | queue_work(workqueue, &work); | 358 | queue_work(workqueue, &work); |
| 359 | } else | 359 | } else |
| 360 | queue_work(workqueue, &work); | 360 | queue_work(workqueue, &work); |
diff --git a/arch/powerpc/platforms/embedded6xx/ls_uart.c b/arch/powerpc/platforms/embedded6xx/ls_uart.c index 31bcdae84823..0e837762cc5b 100644 --- a/arch/powerpc/platforms/embedded6xx/ls_uart.c +++ b/arch/powerpc/platforms/embedded6xx/ls_uart.c | |||
| @@ -14,7 +14,7 @@ static unsigned long avr_clock; | |||
| 14 | 14 | ||
| 15 | static struct work_struct wd_work; | 15 | static struct work_struct wd_work; |
| 16 | 16 | ||
| 17 | static void wd_stop(void *unused) | 17 | static void wd_stop(struct work_struct *unused) |
| 18 | { | 18 | { |
| 19 | const char string[] = "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK"; | 19 | const char string[] = "AAAAFFFFJJJJ>>>>VVVV>>>>ZZZZVVVVKKKK"; |
| 20 | int i = 0, rescue = 8; | 20 | int i = 0, rescue = 8; |
| @@ -122,7 +122,7 @@ static int __init ls_uarts_init(void) | |||
| 122 | 122 | ||
| 123 | ls_uart_init(); | 123 | ls_uart_init(); |
| 124 | 124 | ||
| 125 | INIT_WORK(&wd_work, wd_stop, NULL); | 125 | INIT_WORK(&wd_work, wd_stop); |
| 126 | schedule_work(&wd_work); | 126 | schedule_work(&wd_work); |
| 127 | 127 | ||
| 128 | return 0; | 128 | return 0; |
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c index afa593a8544a..c3a89414ddc0 100644 --- a/arch/powerpc/platforms/powermac/backlight.c +++ b/arch/powerpc/platforms/powermac/backlight.c | |||
| @@ -18,11 +18,11 @@ | |||
| 18 | 18 | ||
| 19 | #define OLD_BACKLIGHT_MAX 15 | 19 | #define OLD_BACKLIGHT_MAX 15 |
| 20 | 20 | ||
| 21 | static void pmac_backlight_key_worker(void *data); | 21 | static void pmac_backlight_key_worker(struct work_struct *work); |
| 22 | static void pmac_backlight_set_legacy_worker(void *data); | 22 | static void pmac_backlight_set_legacy_worker(struct work_struct *work); |
| 23 | 23 | ||
| 24 | static DECLARE_WORK(pmac_backlight_key_work, pmac_backlight_key_worker, NULL); | 24 | static DECLARE_WORK(pmac_backlight_key_work, pmac_backlight_key_worker); |
| 25 | static DECLARE_WORK(pmac_backlight_set_legacy_work, pmac_backlight_set_legacy_worker, NULL); | 25 | static DECLARE_WORK(pmac_backlight_set_legacy_work, pmac_backlight_set_legacy_worker); |
| 26 | 26 | ||
| 27 | /* Although these variables are used in interrupt context, it makes no sense to | 27 | /* Although these variables are used in interrupt context, it makes no sense to |
| 28 | * protect them. No user is able to produce enough key events per second and | 28 | * protect them. No user is able to produce enough key events per second and |
| @@ -94,7 +94,7 @@ int pmac_backlight_curve_lookup(struct fb_info *info, int value) | |||
| 94 | return level; | 94 | return level; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | static void pmac_backlight_key_worker(void *data) | 97 | static void pmac_backlight_key_worker(struct work_struct *work) |
| 98 | { | 98 | { |
| 99 | if (atomic_read(&kernel_backlight_disabled)) | 99 | if (atomic_read(&kernel_backlight_disabled)) |
| 100 | return; | 100 | return; |
| @@ -166,7 +166,7 @@ static int __pmac_backlight_set_legacy_brightness(int brightness) | |||
| 166 | return error; | 166 | return error; |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | static void pmac_backlight_set_legacy_worker(void *data) | 169 | static void pmac_backlight_set_legacy_worker(struct work_struct *work) |
| 170 | { | 170 | { |
| 171 | if (atomic_read(&kernel_backlight_disabled)) | 171 | if (atomic_read(&kernel_backlight_disabled)) |
| 172 | return; | 172 | return; |
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c index 2e1943e27819..709952c25f29 100644 --- a/arch/ppc/8260_io/fcc_enet.c +++ b/arch/ppc/8260_io/fcc_enet.c | |||
| @@ -385,6 +385,7 @@ struct fcc_enet_private { | |||
| 385 | phy_info_t *phy; | 385 | phy_info_t *phy; |
| 386 | struct work_struct phy_relink; | 386 | struct work_struct phy_relink; |
| 387 | struct work_struct phy_display_config; | 387 | struct work_struct phy_display_config; |
| 388 | struct net_device *dev; | ||
| 388 | 389 | ||
| 389 | uint sequence_done; | 390 | uint sequence_done; |
| 390 | 391 | ||
| @@ -1391,10 +1392,11 @@ static phy_info_t *phy_info[] = { | |||
| 1391 | NULL | 1392 | NULL |
| 1392 | }; | 1393 | }; |
| 1393 | 1394 | ||
| 1394 | static void mii_display_status(void *data) | 1395 | static void mii_display_status(struct work_struct *work) |
| 1395 | { | 1396 | { |
| 1396 | struct net_device *dev = data; | 1397 | volatile struct fcc_enet_private *fep = |
| 1397 | volatile struct fcc_enet_private *fep = dev->priv; | 1398 | container_of(work, struct fcc_enet_private, phy_relink); |
| 1399 | struct net_device *dev = fep->dev; | ||
| 1398 | uint s = fep->phy_status; | 1400 | uint s = fep->phy_status; |
| 1399 | 1401 | ||
| 1400 | if (!fep->link && !fep->old_link) { | 1402 | if (!fep->link && !fep->old_link) { |
| @@ -1428,10 +1430,12 @@ static void mii_display_status(void *data) | |||
| 1428 | printk(".\n"); | 1430 | printk(".\n"); |
| 1429 | } | 1431 | } |
| 1430 | 1432 | ||
| 1431 | static void mii_display_config(void *data) | 1433 | static void mii_display_config(struct work_struct *work) |
| 1432 | { | 1434 | { |
| 1433 | struct net_device *dev = data; | 1435 | volatile struct fcc_enet_private *fep = |
| 1434 | volatile struct fcc_enet_private *fep = dev->priv; | 1436 | container_of(work, struct fcc_enet_private, |
| 1437 | phy_display_config); | ||
| 1438 | struct net_device *dev = fep->dev; | ||
| 1435 | uint s = fep->phy_status; | 1439 | uint s = fep->phy_status; |
| 1436 | 1440 | ||
| 1437 | printk("%s: config: auto-negotiation ", dev->name); | 1441 | printk("%s: config: auto-negotiation ", dev->name); |
| @@ -1758,8 +1762,9 @@ static int __init fec_enet_init(void) | |||
| 1758 | cep->phy_id_done = 0; | 1762 | cep->phy_id_done = 0; |
| 1759 | cep->phy_addr = fip->fc_phyaddr; | 1763 | cep->phy_addr = fip->fc_phyaddr; |
| 1760 | mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy); | 1764 | mii_queue(dev, mk_mii_read(MII_PHYSID1), mii_discover_phy); |
| 1761 | INIT_WORK(&cep->phy_relink, mii_display_status, dev); | 1765 | INIT_WORK(&cep->phy_relink, mii_display_status); |
| 1762 | INIT_WORK(&cep->phy_display_config, mii_display_config, dev); | 1766 | INIT_WORK(&cep->phy_display_config, mii_display_config); |
| 1767 | cep->dev = dev; | ||
| 1763 | #endif /* CONFIG_USE_MDIO */ | 1768 | #endif /* CONFIG_USE_MDIO */ |
| 1764 | 1769 | ||
| 1765 | fip++; | 1770 | fip++; |
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c index 2f9fa9e3d331..e6c28fb423b2 100644 --- a/arch/ppc/8xx_io/fec.c +++ b/arch/ppc/8xx_io/fec.c | |||
| @@ -173,6 +173,7 @@ struct fec_enet_private { | |||
| 173 | uint phy_speed; | 173 | uint phy_speed; |
| 174 | phy_info_t *phy; | 174 | phy_info_t *phy; |
| 175 | struct work_struct phy_task; | 175 | struct work_struct phy_task; |
| 176 | struct net_device *dev; | ||
| 176 | 177 | ||
| 177 | uint sequence_done; | 178 | uint sequence_done; |
| 178 | 179 | ||
| @@ -1263,10 +1264,11 @@ static void mii_display_status(struct net_device *dev) | |||
| 1263 | printk(".\n"); | 1264 | printk(".\n"); |
| 1264 | } | 1265 | } |
| 1265 | 1266 | ||
| 1266 | static void mii_display_config(void *priv) | 1267 | static void mii_display_config(struct work_struct *work) |
| 1267 | { | 1268 | { |
| 1268 | struct net_device *dev = (struct net_device *)priv; | 1269 | struct fec_enet_private *fep = |
| 1269 | struct fec_enet_private *fep = dev->priv; | 1270 | container_of(work, struct fec_enet_private, phy_task); |
| 1271 | struct net_device *dev = fep->dev; | ||
| 1270 | volatile uint *s = &(fep->phy_status); | 1272 | volatile uint *s = &(fep->phy_status); |
| 1271 | 1273 | ||
| 1272 | printk("%s: config: auto-negotiation ", dev->name); | 1274 | printk("%s: config: auto-negotiation ", dev->name); |
| @@ -1295,10 +1297,11 @@ static void mii_display_config(void *priv) | |||
| 1295 | fep->sequence_done = 1; | 1297 | fep->sequence_done = 1; |
| 1296 | } | 1298 | } |
| 1297 | 1299 | ||
| 1298 | static void mii_relink(void *priv) | 1300 | static void mii_relink(struct work_struct *work) |
| 1299 | { | 1301 | { |
| 1300 | struct net_device *dev = (struct net_device *)priv; | 1302 | struct fec_enet_private *fep = |
| 1301 | struct fec_enet_private *fep = dev->priv; | 1303 | container_of(work, struct fec_enet_private, phy_task); |
| 1304 | struct net_device *dev = fep->dev; | ||
| 1302 | int duplex; | 1305 | int duplex; |
| 1303 | 1306 | ||
| 1304 | fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0; | 1307 | fep->link = (fep->phy_status & PHY_STAT_LINK) ? 1 : 0; |
| @@ -1325,7 +1328,8 @@ static void mii_queue_relink(uint mii_reg, struct net_device *dev) | |||
| 1325 | { | 1328 | { |
| 1326 | struct fec_enet_private *fep = dev->priv; | 1329 | struct fec_enet_private *fep = dev->priv; |
| 1327 | 1330 | ||
| 1328 | INIT_WORK(&fep->phy_task, mii_relink, (void *)dev); | 1331 | fep->dev = dev; |
| 1332 | INIT_WORK(&fep->phy_task, mii_relink); | ||
| 1329 | schedule_work(&fep->phy_task); | 1333 | schedule_work(&fep->phy_task); |
| 1330 | } | 1334 | } |
| 1331 | 1335 | ||
| @@ -1333,7 +1337,8 @@ static void mii_queue_config(uint mii_reg, struct net_device *dev) | |||
| 1333 | { | 1337 | { |
| 1334 | struct fec_enet_private *fep = dev->priv; | 1338 | struct fec_enet_private *fep = dev->priv; |
| 1335 | 1339 | ||
| 1336 | INIT_WORK(&fep->phy_task, mii_display_config, (void *)dev); | 1340 | fep->dev = dev; |
| 1341 | INIT_WORK(&fep->phy_task, mii_display_config); | ||
| 1337 | schedule_work(&fep->phy_task); | 1342 | schedule_work(&fep->phy_task); |
| 1338 | } | 1343 | } |
| 1339 | 1344 | ||
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index af1e8fc7d985..67d5cf9cba83 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
| @@ -92,8 +92,8 @@ static int appldata_timer_active; | |||
| 92 | * Work queue | 92 | * Work queue |
| 93 | */ | 93 | */ |
| 94 | static struct workqueue_struct *appldata_wq; | 94 | static struct workqueue_struct *appldata_wq; |
| 95 | static void appldata_work_fn(void *data); | 95 | static void appldata_work_fn(struct work_struct *work); |
| 96 | static DECLARE_WORK(appldata_work, appldata_work_fn, NULL); | 96 | static DECLARE_WORK(appldata_work, appldata_work_fn); |
| 97 | 97 | ||
| 98 | 98 | ||
| 99 | /* | 99 | /* |
| @@ -125,7 +125,7 @@ static void appldata_timer_function(unsigned long data) | |||
| 125 | * | 125 | * |
| 126 | * call data gathering function for each (active) module | 126 | * call data gathering function for each (active) module |
| 127 | */ | 127 | */ |
| 128 | static void appldata_work_fn(void *data) | 128 | static void appldata_work_fn(struct work_struct *work) |
| 129 | { | 129 | { |
| 130 | struct list_head *lh; | 130 | struct list_head *lh; |
| 131 | struct appldata_ops *ops; | 131 | struct appldata_ops *ops; |
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 3576b3cc505e..7d4190e55654 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c | |||
| @@ -638,7 +638,7 @@ int chan_out_fd(struct list_head *chans) | |||
| 638 | return -1; | 638 | return -1; |
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | void chan_interrupt(struct list_head *chans, struct work_struct *task, | 641 | void chan_interrupt(struct list_head *chans, struct delayed_work *task, |
| 642 | struct tty_struct *tty, int irq) | 642 | struct tty_struct *tty, int irq) |
| 643 | { | 643 | { |
| 644 | struct list_head *ele, *next; | 644 | struct list_head *ele, *next; |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 7b172160fe04..96f0189327af 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
| @@ -56,7 +56,7 @@ static struct notifier_block reboot_notifier = { | |||
| 56 | 56 | ||
| 57 | static LIST_HEAD(mc_requests); | 57 | static LIST_HEAD(mc_requests); |
| 58 | 58 | ||
| 59 | static void mc_work_proc(void *unused) | 59 | static void mc_work_proc(struct work_struct *unused) |
| 60 | { | 60 | { |
| 61 | struct mconsole_entry *req; | 61 | struct mconsole_entry *req; |
| 62 | unsigned long flags; | 62 | unsigned long flags; |
| @@ -72,7 +72,7 @@ static void mc_work_proc(void *unused) | |||
| 72 | } | 72 | } |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | static DECLARE_WORK(mconsole_work, mc_work_proc, NULL); | 75 | static DECLARE_WORK(mconsole_work, mc_work_proc); |
| 76 | 76 | ||
| 77 | static irqreturn_t mconsole_interrupt(int irq, void *dev_id) | 77 | static irqreturn_t mconsole_interrupt(int irq, void *dev_id) |
| 78 | { | 78 | { |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index ec9eb8bd9432..286bc0b3207f 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
| @@ -99,6 +99,7 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id) | |||
| 99 | * same device, since it tests for (dev->flags & IFF_UP). So | 99 | * same device, since it tests for (dev->flags & IFF_UP). So |
| 100 | * there's no harm in delaying the device shutdown. */ | 100 | * there's no harm in delaying the device shutdown. */ |
| 101 | schedule_work(&close_work); | 101 | schedule_work(&close_work); |
| 102 | #error this is not permitted - close_work will go out of scope | ||
| 102 | goto out; | 103 | goto out; |
| 103 | } | 104 | } |
| 104 | reactivate_fd(lp->fd, UM_ETH_IRQ); | 105 | reactivate_fd(lp->fd, UM_ETH_IRQ); |
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index ce9f3733f73e..6dfe632f1c14 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c | |||
| @@ -132,7 +132,7 @@ static int port_accept(struct port_list *port) | |||
| 132 | DECLARE_MUTEX(ports_sem); | 132 | DECLARE_MUTEX(ports_sem); |
| 133 | struct list_head ports = LIST_HEAD_INIT(ports); | 133 | struct list_head ports = LIST_HEAD_INIT(ports); |
| 134 | 134 | ||
| 135 | void port_work_proc(void *unused) | 135 | void port_work_proc(struct work_struct *unused) |
| 136 | { | 136 | { |
| 137 | struct port_list *port; | 137 | struct port_list *port; |
| 138 | struct list_head *ele; | 138 | struct list_head *ele; |
| @@ -150,7 +150,7 @@ void port_work_proc(void *unused) | |||
| 150 | local_irq_restore(flags); | 150 | local_irq_restore(flags); |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | DECLARE_WORK(port_work, port_work_proc, NULL); | 153 | DECLARE_WORK(port_work, port_work_proc); |
| 154 | 154 | ||
| 155 | static irqreturn_t port_interrupt(int irq, void *data) | 155 | static irqreturn_t port_interrupt(int irq, void *data) |
| 156 | { | 156 | { |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index f1b6f563673a..5ed41fe84e57 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
| @@ -48,7 +48,8 @@ struct rackmeter_dma { | |||
| 48 | } ____cacheline_aligned; | 48 | } ____cacheline_aligned; |
| 49 | 49 | ||
| 50 | struct rackmeter_cpu { | 50 | struct rackmeter_cpu { |
| 51 | struct work_struct sniffer; | 51 | struct delayed_work sniffer; |
| 52 | struct rackmeter *rm; | ||
| 52 | cputime64_t prev_wall; | 53 | cputime64_t prev_wall; |
| 53 | cputime64_t prev_idle; | 54 | cputime64_t prev_idle; |
| 54 | int zero; | 55 | int zero; |
| @@ -208,11 +209,12 @@ static void rackmeter_setup_dbdma(struct rackmeter *rm) | |||
| 208 | rackmeter_do_pause(rm, 0); | 209 | rackmeter_do_pause(rm, 0); |
| 209 | } | 210 | } |
| 210 | 211 | ||
| 211 | static void rackmeter_do_timer(void *data) | 212 | static void rackmeter_do_timer(struct work_struct *work) |
| 212 | { | 213 | { |
| 213 | struct rackmeter *rm = data; | 214 | struct rackmeter_cpu *rcpu = |
| 215 | container_of(work, struct rackmeter_cpu, sniffer.work); | ||
| 216 | struct rackmeter *rm = rcpu->rm; | ||
| 214 | unsigned int cpu = smp_processor_id(); | 217 | unsigned int cpu = smp_processor_id(); |
| 215 | struct rackmeter_cpu *rcpu = &rm->cpu[cpu]; | ||
| 216 | cputime64_t cur_jiffies, total_idle_ticks; | 218 | cputime64_t cur_jiffies, total_idle_ticks; |
| 217 | unsigned int total_ticks, idle_ticks; | 219 | unsigned int total_ticks, idle_ticks; |
| 218 | int i, offset, load, cumm, pause; | 220 | int i, offset, load, cumm, pause; |
| @@ -263,8 +265,10 @@ static void __devinit rackmeter_init_cpu_sniffer(struct rackmeter *rm) | |||
| 263 | * on those machines yet | 265 | * on those machines yet |
| 264 | */ | 266 | */ |
| 265 | 267 | ||
| 266 | INIT_WORK(&rm->cpu[0].sniffer, rackmeter_do_timer, rm); | 268 | rm->cpu[0].rm = rm; |
| 267 | INIT_WORK(&rm->cpu[1].sniffer, rackmeter_do_timer, rm); | 269 | INIT_DELAYED_WORK(&rm->cpu[0].sniffer, rackmeter_do_timer); |
| 270 | rm->cpu[1].rm = rm; | ||
| 271 | INIT_DELAYED_WORK(&rm->cpu[1].sniffer, rackmeter_do_timer); | ||
| 268 | 272 | ||
| 269 | for_each_online_cpu(cpu) { | 273 | for_each_online_cpu(cpu) { |
| 270 | struct rackmeter_cpu *rcpu; | 274 | struct rackmeter_cpu *rcpu; |
diff --git a/drivers/net/chelsio/cphy.h b/drivers/net/chelsio/cphy.h index 60901f25014e..cf9143499882 100644 --- a/drivers/net/chelsio/cphy.h +++ b/drivers/net/chelsio/cphy.h | |||
| @@ -91,7 +91,7 @@ struct cphy { | |||
| 91 | int state; /* Link status state machine */ | 91 | int state; /* Link status state machine */ |
| 92 | adapter_t *adapter; /* associated adapter */ | 92 | adapter_t *adapter; /* associated adapter */ |
| 93 | 93 | ||
| 94 | struct work_struct phy_update; | 94 | struct delayed_work phy_update; |
| 95 | 95 | ||
| 96 | u16 bmsr; | 96 | u16 bmsr; |
| 97 | int count; | 97 | int count; |
diff --git a/drivers/net/chelsio/my3126.c b/drivers/net/chelsio/my3126.c index 0b90014d5b3e..c7731b6f9de3 100644 --- a/drivers/net/chelsio/my3126.c +++ b/drivers/net/chelsio/my3126.c | |||
| @@ -93,9 +93,11 @@ static int my3126_interrupt_handler(struct cphy *cphy) | |||
| 93 | return cphy_cause_link_change; | 93 | return cphy_cause_link_change; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | static void my3216_poll(void *arg) | 96 | static void my3216_poll(struct work_struct *work) |
| 97 | { | 97 | { |
| 98 | my3126_interrupt_handler(arg); | 98 | struct cphy *cphy = container_of(work, struct cphy, phy_update.work); |
| 99 | |||
| 100 | my3126_interrupt_handler(cphy); | ||
| 99 | } | 101 | } |
| 100 | 102 | ||
| 101 | static int my3126_set_loopback(struct cphy *cphy, int on) | 103 | static int my3126_set_loopback(struct cphy *cphy, int on) |
| @@ -171,7 +173,7 @@ static struct cphy *my3126_phy_create(adapter_t *adapter, | |||
| 171 | if (cphy) | 173 | if (cphy) |
| 172 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); | 174 | cphy_init(cphy, adapter, phy_addr, &my3126_ops, mdio_ops); |
| 173 | 175 | ||
| 174 | INIT_WORK(&cphy->phy_update, my3216_poll, cphy); | 176 | INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); |
| 175 | cphy->bmsr = 0; | 177 | cphy->bmsr = 0; |
| 176 | 178 | ||
| 177 | return (cphy); | 179 | return (cphy); |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index d925053fe597..9c588af8ab74 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
| @@ -714,6 +714,7 @@ struct netxen_adapter { | |||
| 714 | spinlock_t lock; | 714 | spinlock_t lock; |
| 715 | struct work_struct watchdog_task; | 715 | struct work_struct watchdog_task; |
| 716 | struct work_struct tx_timeout_task; | 716 | struct work_struct tx_timeout_task; |
| 717 | struct net_device *netdev; | ||
| 717 | struct timer_list watchdog_timer; | 718 | struct timer_list watchdog_timer; |
| 718 | 719 | ||
| 719 | u32 curr_window; | 720 | u32 curr_window; |
| @@ -921,7 +922,7 @@ netxen_nic_do_ioctl(struct netxen_adapter *adapter, void *u_data, | |||
| 921 | struct netxen_port *port); | 922 | struct netxen_port *port); |
| 922 | int netxen_nic_rx_has_work(struct netxen_adapter *adapter); | 923 | int netxen_nic_rx_has_work(struct netxen_adapter *adapter); |
| 923 | int netxen_nic_tx_has_work(struct netxen_adapter *adapter); | 924 | int netxen_nic_tx_has_work(struct netxen_adapter *adapter); |
| 924 | void netxen_watchdog_task(unsigned long v); | 925 | void netxen_watchdog_task(struct work_struct *work); |
| 925 | void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx, | 926 | void netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ctx, |
| 926 | u32 ringid); | 927 | u32 ringid); |
| 927 | void netxen_process_cmd_ring(unsigned long data); | 928 | void netxen_process_cmd_ring(unsigned long data); |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 0dca029bc3e5..eae18236aefa 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
| @@ -710,12 +710,13 @@ static inline int netxen_nic_check_temp(struct netxen_adapter *adapter) | |||
| 710 | return rv; | 710 | return rv; |
| 711 | } | 711 | } |
| 712 | 712 | ||
| 713 | void netxen_watchdog_task(unsigned long v) | 713 | void netxen_watchdog_task(struct work_struct *work) |
| 714 | { | 714 | { |
| 715 | int port_num; | 715 | int port_num; |
| 716 | struct netxen_port *port; | 716 | struct netxen_port *port; |
| 717 | struct net_device *netdev; | 717 | struct net_device *netdev; |
| 718 | struct netxen_adapter *adapter = (struct netxen_adapter *)v; | 718 | struct netxen_adapter *adapter = |
| 719 | container_of(work, struct netxen_adapter, watchdog_task); | ||
| 719 | 720 | ||
| 720 | if (netxen_nic_check_temp(adapter)) | 721 | if (netxen_nic_check_temp(adapter)) |
| 721 | return; | 722 | return; |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 1cb662d5bd76..df0bb36a1cfb 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
| @@ -64,7 +64,7 @@ static int netxen_nic_open(struct net_device *netdev); | |||
| 64 | static int netxen_nic_close(struct net_device *netdev); | 64 | static int netxen_nic_close(struct net_device *netdev); |
| 65 | static int netxen_nic_xmit_frame(struct sk_buff *, struct net_device *); | 65 | static int netxen_nic_xmit_frame(struct sk_buff *, struct net_device *); |
| 66 | static void netxen_tx_timeout(struct net_device *netdev); | 66 | static void netxen_tx_timeout(struct net_device *netdev); |
| 67 | static void netxen_tx_timeout_task(struct net_device *netdev); | 67 | static void netxen_tx_timeout_task(struct work_struct *work); |
| 68 | static void netxen_watchdog(unsigned long); | 68 | static void netxen_watchdog(unsigned long); |
| 69 | static int netxen_handle_int(struct netxen_adapter *, struct net_device *); | 69 | static int netxen_handle_int(struct netxen_adapter *, struct net_device *); |
| 70 | static int netxen_nic_ioctl(struct net_device *netdev, | 70 | static int netxen_nic_ioctl(struct net_device *netdev, |
| @@ -274,8 +274,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 274 | adapter->ahw.xg_linkup = 0; | 274 | adapter->ahw.xg_linkup = 0; |
| 275 | adapter->watchdog_timer.function = &netxen_watchdog; | 275 | adapter->watchdog_timer.function = &netxen_watchdog; |
| 276 | adapter->watchdog_timer.data = (unsigned long)adapter; | 276 | adapter->watchdog_timer.data = (unsigned long)adapter; |
| 277 | INIT_WORK(&adapter->watchdog_task, | 277 | INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task); |
| 278 | (void (*)(void *))netxen_watchdog_task, adapter); | ||
| 279 | adapter->ahw.pdev = pdev; | 278 | adapter->ahw.pdev = pdev; |
| 280 | adapter->proc_cmd_buf_counter = 0; | 279 | adapter->proc_cmd_buf_counter = 0; |
| 281 | pci_read_config_byte(pdev, PCI_REVISION_ID, &adapter->ahw.revision_id); | 280 | pci_read_config_byte(pdev, PCI_REVISION_ID, &adapter->ahw.revision_id); |
| @@ -379,8 +378,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 379 | dev_addr); | 378 | dev_addr); |
| 380 | } | 379 | } |
| 381 | } | 380 | } |
| 382 | INIT_WORK(&adapter->tx_timeout_task, | 381 | adapter->netdev = netdev; |
| 383 | (void (*)(void *))netxen_tx_timeout_task, netdev); | 382 | INIT_WORK(&adapter->tx_timeout_task, netxen_tx_timeout_task); |
| 384 | netif_carrier_off(netdev); | 383 | netif_carrier_off(netdev); |
| 385 | netif_stop_queue(netdev); | 384 | netif_stop_queue(netdev); |
| 386 | 385 | ||
| @@ -938,18 +937,20 @@ static void netxen_tx_timeout(struct net_device *netdev) | |||
| 938 | schedule_work(&adapter->tx_timeout_task); | 937 | schedule_work(&adapter->tx_timeout_task); |
| 939 | } | 938 | } |
| 940 | 939 | ||
| 941 | static void netxen_tx_timeout_task(struct net_device *netdev) | 940 | static void netxen_tx_timeout_task(struct work_struct *work) |
| 942 | { | 941 | { |
| 943 | struct netxen_port *port = (struct netxen_port *)netdev_priv(netdev); | 942 | struct netxen_adapter *adapter = |
| 943 | container_of(work, struct netxen_adapter, tx_timeout_task); | ||
| 944 | struct net_device *netdev = adapter->netdev; | ||
| 944 | unsigned long flags; | 945 | unsigned long flags; |
| 945 | 946 | ||
| 946 | printk(KERN_ERR "%s %s: transmit timeout, resetting.\n", | 947 | printk(KERN_ERR "%s %s: transmit timeout, resetting.\n", |
| 947 | netxen_nic_driver_name, netdev->name); | 948 | netxen_nic_driver_name, netdev->name); |
| 948 | 949 | ||
| 949 | spin_lock_irqsave(&port->adapter->lock, flags); | 950 | spin_lock_irqsave(&adapter->lock, flags); |
| 950 | netxen_nic_close(netdev); | 951 | netxen_nic_close(netdev); |
| 951 | netxen_nic_open(netdev); | 952 | netxen_nic_open(netdev); |
| 952 | spin_unlock_irqrestore(&port->adapter->lock, flags); | 953 | spin_unlock_irqrestore(&adapter->lock, flags); |
| 953 | netdev->trans_start = jiffies; | 954 | netdev->trans_start = jiffies; |
| 954 | netif_wake_queue(netdev); | 955 | netif_wake_queue(netdev); |
| 955 | } | 956 | } |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 95b6478f55c6..e62a9586fb95 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
| @@ -210,6 +210,7 @@ struct smc_local { | |||
| 210 | 210 | ||
| 211 | /* work queue */ | 211 | /* work queue */ |
| 212 | struct work_struct phy_configure; | 212 | struct work_struct phy_configure; |
| 213 | struct net_device *dev; | ||
| 213 | int work_pending; | 214 | int work_pending; |
| 214 | 215 | ||
| 215 | spinlock_t lock; | 216 | spinlock_t lock; |
| @@ -1114,10 +1115,11 @@ static void smc_phy_check_media(struct net_device *dev, int init) | |||
| 1114 | * of autonegotiation.) If the RPC ANEG bit is cleared, the selection | 1115 | * of autonegotiation.) If the RPC ANEG bit is cleared, the selection |
| 1115 | * is controlled by the RPC SPEED and RPC DPLX bits. | 1116 | * is controlled by the RPC SPEED and RPC DPLX bits. |
| 1116 | */ | 1117 | */ |
| 1117 | static void smc_phy_configure(void *data) | 1118 | static void smc_phy_configure(struct work_struct *work) |
| 1118 | { | 1119 | { |
| 1119 | struct net_device *dev = data; | 1120 | struct smc_local *lp = |
| 1120 | struct smc_local *lp = netdev_priv(dev); | 1121 | container_of(work, struct smc_local, phy_configure); |
| 1122 | struct net_device *dev = lp->dev; | ||
| 1121 | void __iomem *ioaddr = lp->base; | 1123 | void __iomem *ioaddr = lp->base; |
| 1122 | int phyaddr = lp->mii.phy_id; | 1124 | int phyaddr = lp->mii.phy_id; |
| 1123 | int my_phy_caps; /* My PHY capabilities */ | 1125 | int my_phy_caps; /* My PHY capabilities */ |
| @@ -1592,7 +1594,7 @@ smc_open(struct net_device *dev) | |||
| 1592 | 1594 | ||
| 1593 | /* Configure the PHY, initialize the link state */ | 1595 | /* Configure the PHY, initialize the link state */ |
| 1594 | if (lp->phy_type != 0) | 1596 | if (lp->phy_type != 0) |
| 1595 | smc_phy_configure(dev); | 1597 | smc_phy_configure(&lp->phy_configure); |
| 1596 | else { | 1598 | else { |
| 1597 | spin_lock_irq(&lp->lock); | 1599 | spin_lock_irq(&lp->lock); |
| 1598 | smc_10bt_check_media(dev, 1); | 1600 | smc_10bt_check_media(dev, 1); |
| @@ -1972,7 +1974,8 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr) | |||
| 1972 | #endif | 1974 | #endif |
| 1973 | 1975 | ||
| 1974 | tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); | 1976 | tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); |
| 1975 | INIT_WORK(&lp->phy_configure, smc_phy_configure, dev); | 1977 | INIT_WORK(&lp->phy_configure, smc_phy_configure); |
| 1978 | lp->dev = dev; | ||
| 1976 | lp->mii.phy_id_mask = 0x1f; | 1979 | lp->mii.phy_id_mask = 0x1f; |
| 1977 | lp->mii.reg_num_mask = 0x1f; | 1980 | lp->mii.reg_num_mask = 0x1f; |
| 1978 | lp->mii.force_media = 0; | 1981 | lp->mii.force_media = 0; |
| @@ -2322,7 +2325,7 @@ static int smc_drv_resume(struct platform_device *dev) | |||
| 2322 | smc_reset(ndev); | 2325 | smc_reset(ndev); |
| 2323 | smc_enable(ndev); | 2326 | smc_enable(ndev); |
| 2324 | if (lp->phy_type != 0) | 2327 | if (lp->phy_type != 0) |
| 2325 | smc_phy_configure(ndev); | 2328 | smc_phy_configure(&lp->phy_configure); |
| 2326 | netif_device_attach(ndev); | 2329 | netif_device_attach(ndev); |
| 2327 | } | 2330 | } |
| 2328 | } | 2331 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 44f3cfd4cc1d..f1573a9c2336 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
| @@ -32,8 +32,8 @@ | |||
| 32 | 32 | ||
| 33 | static void ieee_init(struct ieee80211_device *ieee); | 33 | static void ieee_init(struct ieee80211_device *ieee); |
| 34 | static void softmac_init(struct ieee80211softmac_device *sm); | 34 | static void softmac_init(struct ieee80211softmac_device *sm); |
| 35 | static void set_rts_cts_work(void *d); | 35 | static void set_rts_cts_work(struct work_struct *work); |
| 36 | static void set_basic_rates_work(void *d); | 36 | static void set_basic_rates_work(struct work_struct *work); |
| 37 | 37 | ||
| 38 | static void housekeeping_init(struct zd_mac *mac); | 38 | static void housekeeping_init(struct zd_mac *mac); |
| 39 | static void housekeeping_enable(struct zd_mac *mac); | 39 | static void housekeeping_enable(struct zd_mac *mac); |
| @@ -48,8 +48,8 @@ int zd_mac_init(struct zd_mac *mac, | |||
| 48 | memset(mac, 0, sizeof(*mac)); | 48 | memset(mac, 0, sizeof(*mac)); |
| 49 | spin_lock_init(&mac->lock); | 49 | spin_lock_init(&mac->lock); |
| 50 | mac->netdev = netdev; | 50 | mac->netdev = netdev; |
| 51 | INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work, mac); | 51 | INIT_DELAYED_WORK(&mac->set_rts_cts_work, set_rts_cts_work); |
| 52 | INIT_WORK(&mac->set_basic_rates_work, set_basic_rates_work, mac); | 52 | INIT_DELAYED_WORK(&mac->set_basic_rates_work, set_basic_rates_work); |
| 53 | 53 | ||
| 54 | ieee_init(ieee); | 54 | ieee_init(ieee); |
| 55 | softmac_init(ieee80211_priv(netdev)); | 55 | softmac_init(ieee80211_priv(netdev)); |
| @@ -366,9 +366,10 @@ static void try_enable_tx(struct zd_mac *mac) | |||
| 366 | spin_unlock_irqrestore(&mac->lock, flags); | 366 | spin_unlock_irqrestore(&mac->lock, flags); |
| 367 | } | 367 | } |
| 368 | 368 | ||
| 369 | static void set_rts_cts_work(void *d) | 369 | static void set_rts_cts_work(struct work_struct *work) |
| 370 | { | 370 | { |
| 371 | struct zd_mac *mac = d; | 371 | struct zd_mac *mac = |
| 372 | container_of(work, struct zd_mac, set_rts_cts_work.work); | ||
| 372 | unsigned long flags; | 373 | unsigned long flags; |
| 373 | u8 rts_rate; | 374 | u8 rts_rate; |
| 374 | unsigned int short_preamble; | 375 | unsigned int short_preamble; |
| @@ -387,9 +388,10 @@ static void set_rts_cts_work(void *d) | |||
| 387 | try_enable_tx(mac); | 388 | try_enable_tx(mac); |
| 388 | } | 389 | } |
| 389 | 390 | ||
| 390 | static void set_basic_rates_work(void *d) | 391 | static void set_basic_rates_work(struct work_struct *work) |
| 391 | { | 392 | { |
| 392 | struct zd_mac *mac = d; | 393 | struct zd_mac *mac = |
| 394 | container_of(work, struct zd_mac, set_basic_rates_work.work); | ||
| 393 | unsigned long flags; | 395 | unsigned long flags; |
| 394 | u16 basic_rates; | 396 | u16 basic_rates; |
| 395 | 397 | ||
| @@ -467,12 +469,13 @@ static void bssinfo_change(struct net_device *netdev, u32 changes) | |||
| 467 | if (need_set_rts_cts && !mac->updating_rts_rate) { | 469 | if (need_set_rts_cts && !mac->updating_rts_rate) { |
| 468 | mac->updating_rts_rate = 1; | 470 | mac->updating_rts_rate = 1; |
| 469 | netif_stop_queue(mac->netdev); | 471 | netif_stop_queue(mac->netdev); |
| 470 | queue_work(zd_workqueue, &mac->set_rts_cts_work); | 472 | queue_delayed_work(zd_workqueue, &mac->set_rts_cts_work, 0); |
| 471 | } | 473 | } |
| 472 | if (need_set_rates && !mac->updating_basic_rates) { | 474 | if (need_set_rates && !mac->updating_basic_rates) { |
| 473 | mac->updating_basic_rates = 1; | 475 | mac->updating_basic_rates = 1; |
| 474 | netif_stop_queue(mac->netdev); | 476 | netif_stop_queue(mac->netdev); |
| 475 | queue_work(zd_workqueue, &mac->set_basic_rates_work); | 477 | queue_delayed_work(zd_workqueue, &mac->set_basic_rates_work, |
| 478 | 0); | ||
| 476 | } | 479 | } |
| 477 | spin_unlock_irqrestore(&mac->lock, flags); | 480 | spin_unlock_irqrestore(&mac->lock, flags); |
| 478 | } | 481 | } |
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h index 08d6b8c08e75..d4e8b870409d 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.h +++ b/drivers/net/wireless/zd1211rw/zd_mac.h | |||
| @@ -133,8 +133,8 @@ struct zd_mac { | |||
| 133 | struct iw_statistics iw_stats; | 133 | struct iw_statistics iw_stats; |
| 134 | 134 | ||
| 135 | struct housekeeping housekeeping; | 135 | struct housekeeping housekeeping; |
| 136 | struct work_struct set_rts_cts_work; | 136 | struct delayed_work set_rts_cts_work; |
| 137 | struct work_struct set_basic_rates_work; | 137 | struct delayed_work set_basic_rates_work; |
| 138 | 138 | ||
| 139 | unsigned int stats_count; | 139 | unsigned int stats_count; |
| 140 | u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; | 140 | u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE]; |
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 72025df5561d..494d9b856488 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
| @@ -148,7 +148,7 @@ struct chip_data { | |||
| 148 | void (*cs_control)(u32 command); | 148 | void (*cs_control)(u32 command); |
| 149 | }; | 149 | }; |
| 150 | 150 | ||
| 151 | static void pump_messages(void *data); | 151 | static void pump_messages(struct work_struct *work); |
| 152 | 152 | ||
| 153 | static int flush(struct driver_data *drv_data) | 153 | static int flush(struct driver_data *drv_data) |
| 154 | { | 154 | { |
| @@ -884,9 +884,10 @@ static void pump_transfers(unsigned long data) | |||
| 884 | } | 884 | } |
| 885 | } | 885 | } |
| 886 | 886 | ||
| 887 | static void pump_messages(void *data) | 887 | static void pump_messages(struct work_struct *work) |
| 888 | { | 888 | { |
| 889 | struct driver_data *drv_data = data; | 889 | struct driver_data *drv_data = |
| 890 | container_of(work, struct driver_data, pump_messages); | ||
| 890 | unsigned long flags; | 891 | unsigned long flags; |
| 891 | 892 | ||
| 892 | /* Lock queue and check for queue work */ | 893 | /* Lock queue and check for queue work */ |
| @@ -1098,7 +1099,7 @@ static int init_queue(struct driver_data *drv_data) | |||
| 1098 | tasklet_init(&drv_data->pump_transfers, | 1099 | tasklet_init(&drv_data->pump_transfers, |
| 1099 | pump_transfers, (unsigned long)drv_data); | 1100 | pump_transfers, (unsigned long)drv_data); |
| 1100 | 1101 | ||
| 1101 | INIT_WORK(&drv_data->pump_messages, pump_messages, drv_data); | 1102 | INIT_WORK(&drv_data->pump_messages, pump_messages); |
| 1102 | drv_data->workqueue = create_singlethread_workqueue( | 1103 | drv_data->workqueue = create_singlethread_workqueue( |
| 1103 | drv_data->master->cdev.dev->bus_id); | 1104 | drv_data->master->cdev.dev->bus_id); |
| 1104 | if (drv_data->workqueue == NULL) | 1105 | if (drv_data->workqueue == NULL) |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 39186db1015f..9be41ed1f9a6 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -68,7 +68,7 @@ struct usb_hub { | |||
| 68 | 68 | ||
| 69 | unsigned has_indicators:1; | 69 | unsigned has_indicators:1; |
| 70 | u8 indicator[USB_MAXCHILDREN]; | 70 | u8 indicator[USB_MAXCHILDREN]; |
| 71 | struct work_struct leds; | 71 | struct delayed_work leds; |
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | 74 | ||
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index ba30ca6a14aa..02cbb7fff24f 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c | |||
| @@ -76,7 +76,7 @@ struct appledisplay { | |||
| 76 | char *urbdata; /* interrupt URB data buffer */ | 76 | char *urbdata; /* interrupt URB data buffer */ |
| 77 | char *msgdata; /* control message data buffer */ | 77 | char *msgdata; /* control message data buffer */ |
| 78 | 78 | ||
| 79 | struct work_struct work; | 79 | struct delayed_work work; |
| 80 | int button_pressed; | 80 | int button_pressed; |
| 81 | spinlock_t lock; | 81 | spinlock_t lock; |
| 82 | }; | 82 | }; |
| @@ -117,7 +117,7 @@ static void appledisplay_complete(struct urb *urb) | |||
| 117 | case ACD_BTN_BRIGHT_UP: | 117 | case ACD_BTN_BRIGHT_UP: |
| 118 | case ACD_BTN_BRIGHT_DOWN: | 118 | case ACD_BTN_BRIGHT_DOWN: |
| 119 | pdata->button_pressed = 1; | 119 | pdata->button_pressed = 1; |
| 120 | queue_work(wq, &pdata->work); | 120 | queue_delayed_work(wq, &pdata->work, 0); |
| 121 | break; | 121 | break; |
| 122 | case ACD_BTN_NONE: | 122 | case ACD_BTN_NONE: |
| 123 | default: | 123 | default: |
| @@ -184,9 +184,10 @@ static struct backlight_properties appledisplay_bl_data = { | |||
| 184 | .max_brightness = 0xFF | 184 | .max_brightness = 0xFF |
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | static void appledisplay_work(void *private) | 187 | static void appledisplay_work(struct work_struct *work) |
| 188 | { | 188 | { |
| 189 | struct appledisplay *pdata = private; | 189 | struct appledisplay *pdata = |
| 190 | container_of(work, struct appledisplay, work.work); | ||
| 190 | int retval; | 191 | int retval; |
| 191 | 192 | ||
| 192 | up(&pdata->bd->sem); | 193 | up(&pdata->bd->sem); |
| @@ -238,7 +239,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
| 238 | pdata->udev = udev; | 239 | pdata->udev = udev; |
| 239 | 240 | ||
| 240 | spin_lock_init(&pdata->lock); | 241 | spin_lock_init(&pdata->lock); |
| 241 | INIT_WORK(&pdata->work, appledisplay_work, pdata); | 242 | INIT_DELAYED_WORK(&pdata->work, appledisplay_work); |
| 242 | 243 | ||
| 243 | /* Allocate buffer for control messages */ | 244 | /* Allocate buffer for control messages */ |
| 244 | pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL); | 245 | pdata->msgdata = kmalloc(ACD_MSG_BUFFER_LEN, GFP_KERNEL); |
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index 8a8ae55a7403..38eb0b69c2d7 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
| @@ -964,9 +964,10 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) | |||
| 964 | * Our LCD controller task (which is called when we blank or unblank) | 964 | * Our LCD controller task (which is called when we blank or unblank) |
| 965 | * via keventd. | 965 | * via keventd. |
| 966 | */ | 966 | */ |
| 967 | static void pxafb_task(void *dummy) | 967 | static void pxafb_task(struct work_struct *work) |
| 968 | { | 968 | { |
| 969 | struct pxafb_info *fbi = dummy; | 969 | struct pxafb_info *fbi = |
| 970 | container_of(work, struct pxafb_info, task); | ||
| 970 | u_int state = xchg(&fbi->task_state, -1); | 971 | u_int state = xchg(&fbi->task_state, -1); |
| 971 | 972 | ||
| 972 | set_ctrlr_state(fbi, state); | 973 | set_ctrlr_state(fbi, state); |
| @@ -1159,7 +1160,7 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev) | |||
| 1159 | } | 1160 | } |
| 1160 | 1161 | ||
| 1161 | init_waitqueue_head(&fbi->ctrlr_wait); | 1162 | init_waitqueue_head(&fbi->ctrlr_wait); |
| 1162 | INIT_WORK(&fbi->task, pxafb_task, fbi); | 1163 | INIT_WORK(&fbi->task, pxafb_task); |
| 1163 | init_MUTEX(&fbi->ctrlr_sem); | 1164 | init_MUTEX(&fbi->ctrlr_sem); |
| 1164 | 1165 | ||
| 1165 | return fbi; | 1166 | return fbi; |
diff --git a/include/asm-arm/arch-omap/irda.h b/include/asm-arm/arch-omap/irda.h index 805ae3575e44..345a649ec838 100644 --- a/include/asm-arm/arch-omap/irda.h +++ b/include/asm-arm/arch-omap/irda.h | |||
| @@ -24,7 +24,7 @@ struct omap_irda_config { | |||
| 24 | /* Very specific to the needs of some platforms (h3,h4) | 24 | /* Very specific to the needs of some platforms (h3,h4) |
| 25 | * having calls which can sleep in irda_set_speed. | 25 | * having calls which can sleep in irda_set_speed. |
| 26 | */ | 26 | */ |
| 27 | struct work_struct gpio_expa; | 27 | struct delayed_work gpio_expa; |
| 28 | int rx_channel; | 28 | int rx_channel; |
| 29 | int tx_channel; | 29 | int tx_channel; |
| 30 | unsigned long dest_start; | 30 | unsigned long dest_start; |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 2cc9867b1626..29930b71a9aa 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -32,7 +32,7 @@ struct netpoll_info { | |||
| 32 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 32 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ |
| 33 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ | 33 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ |
| 34 | struct sk_buff_head txq; | 34 | struct sk_buff_head txq; |
| 35 | struct work_struct tx_work; | 35 | struct delayed_work tx_work; |
| 36 | }; | 36 | }; |
| 37 | 37 | ||
| 38 | void netpoll_poll(struct netpoll *np); | 38 | void netpoll_poll(struct netpoll *np); |
