diff options
227 files changed, 824 insertions, 937 deletions
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 5da0aec8ce90..438b10c44d73 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c | |||
@@ -65,9 +65,9 @@ srmcons_do_receive_chars(struct tty_port *port) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | static void | 67 | static void |
68 | srmcons_receive_chars(unsigned long data) | 68 | srmcons_receive_chars(struct timer_list *t) |
69 | { | 69 | { |
70 | struct srmcons_private *srmconsp = (struct srmcons_private *)data; | 70 | struct srmcons_private *srmconsp = from_timer(srmconsp, t, timer); |
71 | struct tty_port *port = &srmconsp->port; | 71 | struct tty_port *port = &srmconsp->port; |
72 | unsigned long flags; | 72 | unsigned long flags; |
73 | int incr = 10; | 73 | int incr = 10; |
@@ -206,8 +206,7 @@ static const struct tty_operations srmcons_ops = { | |||
206 | static int __init | 206 | static int __init |
207 | srmcons_init(void) | 207 | srmcons_init(void) |
208 | { | 208 | { |
209 | setup_timer(&srmcons_singleton.timer, srmcons_receive_chars, | 209 | timer_setup(&srmcons_singleton.timer, srmcons_receive_chars, 0); |
210 | (unsigned long)&srmcons_singleton); | ||
211 | if (srm_is_registered_console) { | 210 | if (srm_is_registered_console) { |
212 | struct tty_driver *driver; | 211 | struct tty_driver *driver; |
213 | int err; | 212 | int err; |
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 4a64a11ba63c..3b73813c6b04 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -305,7 +305,7 @@ static void n2100_restart(enum reboot_mode mode, const char *cmd) | |||
305 | 305 | ||
306 | static struct timer_list power_button_poll_timer; | 306 | static struct timer_list power_button_poll_timer; |
307 | 307 | ||
308 | static void power_button_poll(unsigned long dummy) | 308 | static void power_button_poll(struct timer_list *unused) |
309 | { | 309 | { |
310 | if (gpio_get_value(N2100_POWER_BUTTON) == 0) { | 310 | if (gpio_get_value(N2100_POWER_BUTTON) == 0) { |
311 | ctrl_alt_del(); | 311 | ctrl_alt_del(); |
@@ -336,7 +336,7 @@ static int __init n2100_request_gpios(void) | |||
336 | pr_err("could not set power GPIO as input\n"); | 336 | pr_err("could not set power GPIO as input\n"); |
337 | } | 337 | } |
338 | /* Set up power button poll timer */ | 338 | /* Set up power button poll timer */ |
339 | setup_timer(&power_button_poll_timer, power_button_poll, 0UL); | 339 | timer_setup(&power_button_poll_timer, power_button_poll, 0); |
340 | power_button_poll_timer.expires = jiffies + (HZ / 10); | 340 | power_button_poll_timer.expires = jiffies + (HZ / 10); |
341 | add_timer(&power_button_poll_timer); | 341 | add_timer(&power_button_poll_timer); |
342 | return 0; | 342 | return 0; |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index 3f5863de766a..39eae10ac8de 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -172,7 +172,7 @@ static struct platform_device db88f5281_nand_flash = { | |||
172 | static void __iomem *db88f5281_7seg; | 172 | static void __iomem *db88f5281_7seg; |
173 | static struct timer_list db88f5281_timer; | 173 | static struct timer_list db88f5281_timer; |
174 | 174 | ||
175 | static void db88f5281_7seg_event(unsigned long data) | 175 | static void db88f5281_7seg_event(struct timer_list *unused) |
176 | { | 176 | { |
177 | static int count = 0; | 177 | static int count = 0; |
178 | writel(0, db88f5281_7seg + (count << 4)); | 178 | writel(0, db88f5281_7seg + (count << 4)); |
@@ -189,7 +189,7 @@ static int __init db88f5281_7seg_init(void) | |||
189 | printk(KERN_ERR "Failed to ioremap db88f5281_7seg\n"); | 189 | printk(KERN_ERR "Failed to ioremap db88f5281_7seg\n"); |
190 | return -EIO; | 190 | return -EIO; |
191 | } | 191 | } |
192 | setup_timer(&db88f5281_timer, db88f5281_7seg_event, 0); | 192 | timer_setup(&db88f5281_timer, db88f5281_7seg_event, 0); |
193 | mod_timer(&db88f5281_timer, jiffies + 2 * HZ); | 193 | mod_timer(&db88f5281_timer, jiffies + 2 * HZ); |
194 | } | 194 | } |
195 | 195 | ||
diff --git a/arch/blackfin/kernel/nmi.c b/arch/blackfin/kernel/nmi.c index 828f4fbdb58a..8a211d95821f 100644 --- a/arch/blackfin/kernel/nmi.c +++ b/arch/blackfin/kernel/nmi.c | |||
@@ -166,7 +166,7 @@ int check_nmi_wdt_touched(void) | |||
166 | return 1; | 166 | return 1; |
167 | } | 167 | } |
168 | 168 | ||
169 | static void nmi_wdt_timer(unsigned long data) | 169 | static void nmi_wdt_timer(struct timer_list *unused) |
170 | { | 170 | { |
171 | if (check_nmi_wdt_touched()) | 171 | if (check_nmi_wdt_touched()) |
172 | nmi_wdt_keepalive(); | 172 | nmi_wdt_keepalive(); |
@@ -180,7 +180,7 @@ static int __init init_nmi_wdt(void) | |||
180 | nmi_wdt_start(); | 180 | nmi_wdt_start(); |
181 | nmi_active = true; | 181 | nmi_active = true; |
182 | 182 | ||
183 | setup_timer(&ntimer, nmi_wdt_timer, 0UL); | 183 | timer_setup(&ntimer, nmi_wdt_timer, 0); |
184 | ntimer.expires = jiffies + NMI_CHECK_TIMEOUT; | 184 | ntimer.expires = jiffies + NMI_CHECK_TIMEOUT; |
185 | add_timer(&ntimer); | 185 | add_timer(&ntimer); |
186 | 186 | ||
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c index a8103f6972cd..5d89e1ec5fcc 100644 --- a/arch/mips/lasat/picvue_proc.c +++ b/arch/mips/lasat/picvue_proc.c | |||
@@ -156,7 +156,7 @@ static const struct file_operations pvc_scroll_proc_fops = { | |||
156 | .write = pvc_scroll_proc_write, | 156 | .write = pvc_scroll_proc_write, |
157 | }; | 157 | }; |
158 | 158 | ||
159 | void pvc_proc_timerfunc(unsigned long data) | 159 | void pvc_proc_timerfunc(struct timer_list *unused) |
160 | { | 160 | { |
161 | if (scroll_dir < 0) | 161 | if (scroll_dir < 0) |
162 | pvc_move(DISPLAY|RIGHT); | 162 | pvc_move(DISPLAY|RIGHT); |
@@ -197,7 +197,7 @@ static int __init pvc_proc_init(void) | |||
197 | if (proc_entry == NULL) | 197 | if (proc_entry == NULL) |
198 | goto error; | 198 | goto error; |
199 | 199 | ||
200 | setup_timer(&timer, pvc_proc_timerfunc, 0UL); | 200 | timer_setup(&timer, pvc_proc_timerfunc, 0); |
201 | 201 | ||
202 | return 0; | 202 | return 0; |
203 | error: | 203 | error: |
diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c index e3c5f75d137c..8cdd852aedd1 100644 --- a/arch/powerpc/kernel/tau_6xx.c +++ b/arch/powerpc/kernel/tau_6xx.c | |||
@@ -188,7 +188,7 @@ static void tau_timeout(void * info) | |||
188 | local_irq_restore(flags); | 188 | local_irq_restore(flags); |
189 | } | 189 | } |
190 | 190 | ||
191 | static void tau_timeout_smp(unsigned long unused) | 191 | static void tau_timeout_smp(struct timer_list *unused) |
192 | { | 192 | { |
193 | 193 | ||
194 | /* schedule ourselves to be run again */ | 194 | /* schedule ourselves to be run again */ |
@@ -230,7 +230,7 @@ int __init TAU_init(void) | |||
230 | 230 | ||
231 | 231 | ||
232 | /* first, set up the window shrinking timer */ | 232 | /* first, set up the window shrinking timer */ |
233 | setup_timer(&tau_timer, tau_timeout_smp, 0UL); | 233 | timer_setup(&tau_timer, tau_timeout_smp, 0); |
234 | tau_timer.expires = jiffies + shrink_timer; | 234 | tau_timer.expires = jiffies + shrink_timer; |
235 | add_timer(&tau_timer); | 235 | add_timer(&tau_timer); |
236 | 236 | ||
diff --git a/arch/powerpc/oprofile/op_model_cell.c b/arch/powerpc/oprofile/op_model_cell.c index 264b6ab11978..b90a21bc2f3f 100644 --- a/arch/powerpc/oprofile/op_model_cell.c +++ b/arch/powerpc/oprofile/op_model_cell.c | |||
@@ -451,7 +451,7 @@ static inline void enable_ctr(u32 cpu, u32 ctr, u32 *pm07_cntrl) | |||
451 | * This routine will alternate loading the virtual counters for | 451 | * This routine will alternate loading the virtual counters for |
452 | * virtual CPUs | 452 | * virtual CPUs |
453 | */ | 453 | */ |
454 | static void cell_virtual_cntr(unsigned long data) | 454 | static void cell_virtual_cntr(struct timer_list *unused) |
455 | { | 455 | { |
456 | int i, prev_hdw_thread, next_hdw_thread; | 456 | int i, prev_hdw_thread, next_hdw_thread; |
457 | u32 cpu; | 457 | u32 cpu; |
@@ -555,7 +555,7 @@ static void cell_virtual_cntr(unsigned long data) | |||
555 | 555 | ||
556 | static void start_virt_cntrs(void) | 556 | static void start_virt_cntrs(void) |
557 | { | 557 | { |
558 | setup_timer(&timer_virt_cntr, cell_virtual_cntr, 0UL); | 558 | timer_setup(&timer_virt_cntr, cell_virtual_cntr, 0); |
559 | timer_virt_cntr.expires = jiffies + HZ / 10; | 559 | timer_virt_cntr.expires = jiffies + HZ / 10; |
560 | add_timer(&timer_virt_cntr); | 560 | add_timer(&timer_virt_cntr); |
561 | } | 561 | } |
@@ -587,7 +587,7 @@ static int cell_reg_setup_spu_cycles(struct op_counter_config *ctr, | |||
587 | * periodically based on kernel timer to switch which SPU is | 587 | * periodically based on kernel timer to switch which SPU is |
588 | * being monitored in a round robbin fashion. | 588 | * being monitored in a round robbin fashion. |
589 | */ | 589 | */ |
590 | static void spu_evnt_swap(unsigned long data) | 590 | static void spu_evnt_swap(struct timer_list *unused) |
591 | { | 591 | { |
592 | int node; | 592 | int node; |
593 | int cur_phys_spu, nxt_phys_spu, cur_spu_evnt_phys_spu_indx; | 593 | int cur_phys_spu, nxt_phys_spu, cur_spu_evnt_phys_spu_indx; |
@@ -677,7 +677,7 @@ static void spu_evnt_swap(unsigned long data) | |||
677 | 677 | ||
678 | static void start_spu_event_swap(void) | 678 | static void start_spu_event_swap(void) |
679 | { | 679 | { |
680 | setup_timer(&timer_spu_event_swap, spu_evnt_swap, 0UL); | 680 | timer_setup(&timer_spu_event_swap, spu_evnt_swap, 0); |
681 | timer_spu_event_swap.expires = jiffies + HZ / 25; | 681 | timer_spu_event_swap.expires = jiffies + HZ / 25; |
682 | add_timer(&timer_spu_event_swap); | 682 | add_timer(&timer_spu_event_swap); |
683 | } | 683 | } |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index e47761cdcb98..9033c8194eda 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -992,13 +992,13 @@ static void spu_calc_load(void) | |||
992 | CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks); | 992 | CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks); |
993 | } | 993 | } |
994 | 994 | ||
995 | static void spusched_wake(unsigned long data) | 995 | static void spusched_wake(struct timer_list *unused) |
996 | { | 996 | { |
997 | mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK); | 997 | mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK); |
998 | wake_up_process(spusched_task); | 998 | wake_up_process(spusched_task); |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | static void spuloadavg_wake(unsigned long data) | 1001 | static void spuloadavg_wake(struct timer_list *unused) |
1002 | { | 1002 | { |
1003 | mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ); | 1003 | mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ); |
1004 | spu_calc_load(); | 1004 | spu_calc_load(); |
@@ -1124,8 +1124,8 @@ int __init spu_sched_init(void) | |||
1124 | } | 1124 | } |
1125 | spin_lock_init(&spu_prio->runq_lock); | 1125 | spin_lock_init(&spu_prio->runq_lock); |
1126 | 1126 | ||
1127 | setup_timer(&spusched_timer, spusched_wake, 0); | 1127 | timer_setup(&spusched_timer, spusched_wake, 0); |
1128 | setup_timer(&spuloadavg_timer, spuloadavg_wake, 0); | 1128 | timer_setup(&spuloadavg_timer, spuloadavg_wake, 0); |
1129 | 1129 | ||
1130 | spusched_task = kthread_run(spusched_thread, NULL, "spusched"); | 1130 | spusched_task = kthread_run(spusched_thread, NULL, "spusched"); |
1131 | if (IS_ERR(spusched_task)) { | 1131 | if (IS_ERR(spusched_task)) { |
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c index 39a1d4225e0f..3408f315ef48 100644 --- a/arch/powerpc/platforms/powermac/low_i2c.c +++ b/arch/powerpc/platforms/powermac/low_i2c.c | |||
@@ -361,9 +361,9 @@ static irqreturn_t kw_i2c_irq(int irq, void *dev_id) | |||
361 | return IRQ_HANDLED; | 361 | return IRQ_HANDLED; |
362 | } | 362 | } |
363 | 363 | ||
364 | static void kw_i2c_timeout(unsigned long data) | 364 | static void kw_i2c_timeout(struct timer_list *t) |
365 | { | 365 | { |
366 | struct pmac_i2c_host_kw *host = (struct pmac_i2c_host_kw *)data; | 366 | struct pmac_i2c_host_kw *host = from_timer(host, t, timeout_timer); |
367 | unsigned long flags; | 367 | unsigned long flags; |
368 | 368 | ||
369 | spin_lock_irqsave(&host->lock, flags); | 369 | spin_lock_irqsave(&host->lock, flags); |
@@ -513,7 +513,7 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np) | |||
513 | mutex_init(&host->mutex); | 513 | mutex_init(&host->mutex); |
514 | init_completion(&host->complete); | 514 | init_completion(&host->complete); |
515 | spin_lock_init(&host->lock); | 515 | spin_lock_init(&host->lock); |
516 | setup_timer(&host->timeout_timer, kw_i2c_timeout, (unsigned long)host); | 516 | timer_setup(&host->timeout_timer, kw_i2c_timeout, 0); |
517 | 517 | ||
518 | psteps = of_get_property(np, "AAPL,address-step", NULL); | 518 | psteps = of_get_property(np, "AAPL,address-step", NULL); |
519 | steps = psteps ? (*psteps) : 0x10; | 519 | steps = psteps ? (*psteps) : 0x10; |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index 5cbd52169348..be6198193ec2 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -523,7 +523,7 @@ static void __init stp_reset(void) | |||
523 | } | 523 | } |
524 | } | 524 | } |
525 | 525 | ||
526 | static void stp_timeout(unsigned long dummy) | 526 | static void stp_timeout(struct timer_list *unused) |
527 | { | 527 | { |
528 | queue_work(time_sync_wq, &stp_work); | 528 | queue_work(time_sync_wq, &stp_work); |
529 | } | 529 | } |
@@ -532,7 +532,7 @@ static int __init stp_init(void) | |||
532 | { | 532 | { |
533 | if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags)) | 533 | if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags)) |
534 | return 0; | 534 | return 0; |
535 | setup_timer(&stp_timer, stp_timeout, 0UL); | 535 | timer_setup(&stp_timer, stp_timeout, 0); |
536 | time_init_wq(); | 536 | time_init_wq(); |
537 | if (!stp_online) | 537 | if (!stp_online) |
538 | return 0; | 538 | return 0; |
diff --git a/arch/sh/drivers/heartbeat.c b/arch/sh/drivers/heartbeat.c index c6d96049a0bb..e8af2ff29bc3 100644 --- a/arch/sh/drivers/heartbeat.c +++ b/arch/sh/drivers/heartbeat.c | |||
@@ -59,9 +59,9 @@ static inline void heartbeat_toggle_bit(struct heartbeat_data *hd, | |||
59 | } | 59 | } |
60 | } | 60 | } |
61 | 61 | ||
62 | static void heartbeat_timer(unsigned long data) | 62 | static void heartbeat_timer(struct timer_list *t) |
63 | { | 63 | { |
64 | struct heartbeat_data *hd = (struct heartbeat_data *)data; | 64 | struct heartbeat_data *hd = from_timer(hd, t, timer); |
65 | static unsigned bit = 0, up = 1; | 65 | static unsigned bit = 0, up = 1; |
66 | 66 | ||
67 | heartbeat_toggle_bit(hd, bit, hd->flags & HEARTBEAT_INVERTED); | 67 | heartbeat_toggle_bit(hd, bit, hd->flags & HEARTBEAT_INVERTED); |
@@ -133,7 +133,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev) | |||
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | setup_timer(&hd->timer, heartbeat_timer, (unsigned long)hd); | 136 | timer_setup(&hd->timer, heartbeat_timer, 0); |
137 | platform_set_drvdata(pdev, hd); | 137 | platform_set_drvdata(pdev, hd); |
138 | 138 | ||
139 | return mod_timer(&hd->timer, jiffies + 1); | 139 | return mod_timer(&hd->timer, jiffies + 1); |
diff --git a/arch/sh/drivers/pci/common.c b/arch/sh/drivers/pci/common.c index 0d7eb7b5ac8d..fe163ecd0719 100644 --- a/arch/sh/drivers/pci/common.c +++ b/arch/sh/drivers/pci/common.c | |||
@@ -85,18 +85,18 @@ int __init pci_is_66mhz_capable(struct pci_channel *hose, | |||
85 | return cap66 > 0; | 85 | return cap66 > 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void pcibios_enable_err(unsigned long __data) | 88 | static void pcibios_enable_err(struct timer_list *t) |
89 | { | 89 | { |
90 | struct pci_channel *hose = (struct pci_channel *)__data; | 90 | struct pci_channel *hose = from_timer(hose, t, err_timer); |
91 | 91 | ||
92 | del_timer(&hose->err_timer); | 92 | del_timer(&hose->err_timer); |
93 | printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n"); | 93 | printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n"); |
94 | enable_irq(hose->err_irq); | 94 | enable_irq(hose->err_irq); |
95 | } | 95 | } |
96 | 96 | ||
97 | static void pcibios_enable_serr(unsigned long __data) | 97 | static void pcibios_enable_serr(struct timer_list *t) |
98 | { | 98 | { |
99 | struct pci_channel *hose = (struct pci_channel *)__data; | 99 | struct pci_channel *hose = from_timer(hose, t, serr_timer); |
100 | 100 | ||
101 | del_timer(&hose->serr_timer); | 101 | del_timer(&hose->serr_timer); |
102 | printk(KERN_DEBUG "PCI: re-enabling system error IRQ.\n"); | 102 | printk(KERN_DEBUG "PCI: re-enabling system error IRQ.\n"); |
@@ -106,13 +106,11 @@ static void pcibios_enable_serr(unsigned long __data) | |||
106 | void pcibios_enable_timers(struct pci_channel *hose) | 106 | void pcibios_enable_timers(struct pci_channel *hose) |
107 | { | 107 | { |
108 | if (hose->err_irq) { | 108 | if (hose->err_irq) { |
109 | setup_timer(&hose->err_timer, pcibios_enable_err, | 109 | timer_setup(&hose->err_timer, pcibios_enable_err, 0); |
110 | (unsigned long)hose); | ||
111 | } | 110 | } |
112 | 111 | ||
113 | if (hose->serr_irq) { | 112 | if (hose->serr_irq) { |
114 | setup_timer(&hose->serr_timer, pcibios_enable_serr, | 113 | timer_setup(&hose->serr_timer, pcibios_enable_serr, 0); |
115 | (unsigned long)hose); | ||
116 | } | 114 | } |
117 | } | 115 | } |
118 | 116 | ||
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 2dc791507968..a17181160233 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c | |||
@@ -26,9 +26,9 @@ static ssize_t switch_show(struct device *dev, | |||
26 | } | 26 | } |
27 | static DEVICE_ATTR(switch, S_IRUGO, switch_show, NULL); | 27 | static DEVICE_ATTR(switch, S_IRUGO, switch_show, NULL); |
28 | 28 | ||
29 | static void switch_timer(unsigned long data) | 29 | static void switch_timer(struct timer_list *t) |
30 | { | 30 | { |
31 | struct push_switch *psw = (struct push_switch *)data; | 31 | struct push_switch *psw = from_timer(psw, t, debounce); |
32 | 32 | ||
33 | schedule_work(&psw->work); | 33 | schedule_work(&psw->work); |
34 | } | 34 | } |
@@ -78,7 +78,7 @@ static int switch_drv_probe(struct platform_device *pdev) | |||
78 | } | 78 | } |
79 | 79 | ||
80 | INIT_WORK(&psw->work, switch_work_handler); | 80 | INIT_WORK(&psw->work, switch_work_handler); |
81 | setup_timer(&psw->debounce, switch_timer, (unsigned long)psw); | 81 | timer_setup(&psw->debounce, switch_timer, 0); |
82 | 82 | ||
83 | /* Workqueue API brain-damage */ | 83 | /* Workqueue API brain-damage */ |
84 | psw->pdev = pdev; | 84 | psw->pdev = pdev; |
diff --git a/block/blk-stat.c b/block/blk-stat.c index 3a2f3c96f367..28003bf9941c 100644 --- a/block/blk-stat.c +++ b/block/blk-stat.c | |||
@@ -79,9 +79,9 @@ void blk_stat_add(struct request *rq) | |||
79 | rcu_read_unlock(); | 79 | rcu_read_unlock(); |
80 | } | 80 | } |
81 | 81 | ||
82 | static void blk_stat_timer_fn(unsigned long data) | 82 | static void blk_stat_timer_fn(struct timer_list *t) |
83 | { | 83 | { |
84 | struct blk_stat_callback *cb = (void *)data; | 84 | struct blk_stat_callback *cb = from_timer(cb, t, timer); |
85 | unsigned int bucket; | 85 | unsigned int bucket; |
86 | int cpu; | 86 | int cpu; |
87 | 87 | ||
@@ -130,7 +130,7 @@ blk_stat_alloc_callback(void (*timer_fn)(struct blk_stat_callback *), | |||
130 | cb->bucket_fn = bucket_fn; | 130 | cb->bucket_fn = bucket_fn; |
131 | cb->data = data; | 131 | cb->data = data; |
132 | cb->buckets = buckets; | 132 | cb->buckets = buckets; |
133 | setup_timer(&cb->timer, blk_stat_timer_fn, (unsigned long)cb); | 133 | timer_setup(&cb->timer, blk_stat_timer_fn, 0); |
134 | 134 | ||
135 | return cb; | 135 | return cb; |
136 | } | 136 | } |
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 96ad32623427..825bc29767e6 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -225,7 +225,7 @@ struct throtl_data | |||
225 | bool track_bio_latency; | 225 | bool track_bio_latency; |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static void throtl_pending_timer_fn(unsigned long arg); | 228 | static void throtl_pending_timer_fn(struct timer_list *t); |
229 | 229 | ||
230 | static inline struct throtl_grp *pd_to_tg(struct blkg_policy_data *pd) | 230 | static inline struct throtl_grp *pd_to_tg(struct blkg_policy_data *pd) |
231 | { | 231 | { |
@@ -478,8 +478,7 @@ static void throtl_service_queue_init(struct throtl_service_queue *sq) | |||
478 | INIT_LIST_HEAD(&sq->queued[0]); | 478 | INIT_LIST_HEAD(&sq->queued[0]); |
479 | INIT_LIST_HEAD(&sq->queued[1]); | 479 | INIT_LIST_HEAD(&sq->queued[1]); |
480 | sq->pending_tree = RB_ROOT; | 480 | sq->pending_tree = RB_ROOT; |
481 | setup_timer(&sq->pending_timer, throtl_pending_timer_fn, | 481 | timer_setup(&sq->pending_timer, throtl_pending_timer_fn, 0); |
482 | (unsigned long)sq); | ||
483 | } | 482 | } |
484 | 483 | ||
485 | static struct blkg_policy_data *throtl_pd_alloc(gfp_t gfp, int node) | 484 | static struct blkg_policy_data *throtl_pd_alloc(gfp_t gfp, int node) |
@@ -1249,9 +1248,9 @@ static bool throtl_can_upgrade(struct throtl_data *td, | |||
1249 | * the top-level service_tree is reached, throtl_data->dispatch_work is | 1248 | * the top-level service_tree is reached, throtl_data->dispatch_work is |
1250 | * kicked so that the ready bio's are issued. | 1249 | * kicked so that the ready bio's are issued. |
1251 | */ | 1250 | */ |
1252 | static void throtl_pending_timer_fn(unsigned long arg) | 1251 | static void throtl_pending_timer_fn(struct timer_list *t) |
1253 | { | 1252 | { |
1254 | struct throtl_service_queue *sq = (void *)arg; | 1253 | struct throtl_service_queue *sq = from_timer(sq, t, pending_timer); |
1255 | struct throtl_grp *tg = sq_to_tg(sq); | 1254 | struct throtl_grp *tg = sq_to_tg(sq); |
1256 | struct throtl_data *td = sq_to_td(sq); | 1255 | struct throtl_data *td = sq_to_td(sq); |
1257 | struct request_queue *q = td->queue; | 1256 | struct request_queue *q = td->queue; |
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index acf16c323e38..dd286ad404f8 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -293,7 +293,7 @@ static inline void __init show_version (void) { | |||
293 | 293 | ||
294 | */ | 294 | */ |
295 | 295 | ||
296 | static void do_housekeeping (unsigned long arg); | 296 | static void do_housekeeping (struct timer_list *t); |
297 | /********** globals **********/ | 297 | /********** globals **********/ |
298 | 298 | ||
299 | static unsigned short debug = 0; | 299 | static unsigned short debug = 0; |
@@ -1493,8 +1493,8 @@ static const struct atmdev_ops amb_ops = { | |||
1493 | }; | 1493 | }; |
1494 | 1494 | ||
1495 | /********** housekeeping **********/ | 1495 | /********** housekeeping **********/ |
1496 | static void do_housekeeping (unsigned long arg) { | 1496 | static void do_housekeeping (struct timer_list *t) { |
1497 | amb_dev * dev = (amb_dev *) arg; | 1497 | amb_dev * dev = from_timer(dev, t, housekeeping); |
1498 | 1498 | ||
1499 | // could collect device-specific (not driver/atm-linux) stats here | 1499 | // could collect device-specific (not driver/atm-linux) stats here |
1500 | 1500 | ||
@@ -2267,8 +2267,7 @@ static int amb_probe(struct pci_dev *pci_dev, | |||
2267 | dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS; | 2267 | dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS; |
2268 | dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS; | 2268 | dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS; |
2269 | 2269 | ||
2270 | setup_timer(&dev->housekeeping, do_housekeeping, | 2270 | timer_setup(&dev->housekeeping, do_housekeeping, 0); |
2271 | (unsigned long)dev); | ||
2272 | mod_timer(&dev->housekeeping, jiffies); | 2271 | mod_timer(&dev->housekeeping, jiffies); |
2273 | 2272 | ||
2274 | // enable host interrupts | 2273 | // enable host interrupts |
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 534001270be5..d97c05690faa 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -1656,9 +1656,9 @@ static irqreturn_t fs_irq (int irq, void *dev_id) | |||
1656 | 1656 | ||
1657 | 1657 | ||
1658 | #ifdef FS_POLL_FREQ | 1658 | #ifdef FS_POLL_FREQ |
1659 | static void fs_poll (unsigned long data) | 1659 | static void fs_poll (struct timer_list *t) |
1660 | { | 1660 | { |
1661 | struct fs_dev *dev = (struct fs_dev *) data; | 1661 | struct fs_dev *dev = from_timer(dev, t, timer); |
1662 | 1662 | ||
1663 | fs_irq (0, dev); | 1663 | fs_irq (0, dev); |
1664 | dev->timer.expires = jiffies + FS_POLL_FREQ; | 1664 | dev->timer.expires = jiffies + FS_POLL_FREQ; |
@@ -1885,7 +1885,7 @@ static int fs_init(struct fs_dev *dev) | |||
1885 | } | 1885 | } |
1886 | 1886 | ||
1887 | #ifdef FS_POLL_FREQ | 1887 | #ifdef FS_POLL_FREQ |
1888 | setup_timer (&dev->timer, fs_poll, (unsigned long)dev); | 1888 | timer_setup(&dev->timer, fs_poll, 0); |
1889 | dev->timer.expires = jiffies + FS_POLL_FREQ; | 1889 | dev->timer.expires = jiffies + FS_POLL_FREQ; |
1890 | add_timer (&dev->timer); | 1890 | add_timer (&dev->timer); |
1891 | #endif | 1891 | #endif |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index e121b8485731..5ddc203206b8 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -357,7 +357,7 @@ static inline void __init show_version (void) { | |||
357 | 357 | ||
358 | /********** globals **********/ | 358 | /********** globals **********/ |
359 | 359 | ||
360 | static void do_housekeeping (unsigned long arg); | 360 | static void do_housekeeping (struct timer_list *t); |
361 | 361 | ||
362 | static unsigned short debug = 0; | 362 | static unsigned short debug = 0; |
363 | static unsigned short vpi_bits = 0; | 363 | static unsigned short vpi_bits = 0; |
@@ -1418,9 +1418,9 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) | |||
1418 | 1418 | ||
1419 | /********** housekeeping **********/ | 1419 | /********** housekeeping **********/ |
1420 | 1420 | ||
1421 | static void do_housekeeping (unsigned long arg) { | 1421 | static void do_housekeeping (struct timer_list *t) { |
1422 | // just stats at the moment | 1422 | // just stats at the moment |
1423 | hrz_dev * dev = (hrz_dev *) arg; | 1423 | hrz_dev * dev = from_timer(dev, t, housekeeping); |
1424 | 1424 | ||
1425 | // collect device-specific (not driver/atm-linux) stats here | 1425 | // collect device-specific (not driver/atm-linux) stats here |
1426 | dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); | 1426 | dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); |
@@ -2796,7 +2796,7 @@ static int hrz_probe(struct pci_dev *pci_dev, | |||
2796 | dev->atm_dev->ci_range.vpi_bits = vpi_bits; | 2796 | dev->atm_dev->ci_range.vpi_bits = vpi_bits; |
2797 | dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; | 2797 | dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; |
2798 | 2798 | ||
2799 | setup_timer(&dev->housekeeping, do_housekeeping, (unsigned long) dev); | 2799 | timer_setup(&dev->housekeeping, do_housekeeping, 0); |
2800 | mod_timer(&dev->housekeeping, jiffies); | 2800 | mod_timer(&dev->housekeeping, jiffies); |
2801 | 2801 | ||
2802 | out: | 2802 | out: |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 0e3b9c44c808..0277f36be85b 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -1528,9 +1528,9 @@ idt77252_tx(struct idt77252_dev *card) | |||
1528 | 1528 | ||
1529 | 1529 | ||
1530 | static void | 1530 | static void |
1531 | tst_timer(unsigned long data) | 1531 | tst_timer(struct timer_list *t) |
1532 | { | 1532 | { |
1533 | struct idt77252_dev *card = (struct idt77252_dev *)data; | 1533 | struct idt77252_dev *card = from_timer(card, t, tst_timer); |
1534 | unsigned long base, idle, jump; | 1534 | unsigned long base, idle, jump; |
1535 | unsigned long flags; | 1535 | unsigned long flags; |
1536 | u32 pc; | 1536 | u32 pc; |
@@ -3634,7 +3634,7 @@ static int idt77252_init_one(struct pci_dev *pcidev, | |||
3634 | spin_lock_init(&card->cmd_lock); | 3634 | spin_lock_init(&card->cmd_lock); |
3635 | spin_lock_init(&card->tst_lock); | 3635 | spin_lock_init(&card->tst_lock); |
3636 | 3636 | ||
3637 | setup_timer(&card->tst_timer, tst_timer, (unsigned long)card); | 3637 | timer_setup(&card->tst_timer, tst_timer, 0); |
3638 | 3638 | ||
3639 | /* Do the I/O remapping... */ | 3639 | /* Do the I/O remapping... */ |
3640 | card->membase = ioremap(membase, 1024); | 3640 | card->membase = ioremap(membase, 1024); |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 87e8b5dfac39..6664aa50789e 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1761,9 +1761,9 @@ static void iter_dequeue(struct lanai_dev *lanai, vci_t vci) | |||
1761 | } | 1761 | } |
1762 | #endif /* !DEBUG_RW */ | 1762 | #endif /* !DEBUG_RW */ |
1763 | 1763 | ||
1764 | static void lanai_timed_poll(unsigned long arg) | 1764 | static void lanai_timed_poll(struct timer_list *t) |
1765 | { | 1765 | { |
1766 | struct lanai_dev *lanai = (struct lanai_dev *) arg; | 1766 | struct lanai_dev *lanai = from_timer(lanai, t, timer); |
1767 | #ifndef DEBUG_RW | 1767 | #ifndef DEBUG_RW |
1768 | unsigned long flags; | 1768 | unsigned long flags; |
1769 | #ifdef USE_POWERDOWN | 1769 | #ifdef USE_POWERDOWN |
@@ -1790,7 +1790,7 @@ static void lanai_timed_poll(unsigned long arg) | |||
1790 | 1790 | ||
1791 | static inline void lanai_timed_poll_start(struct lanai_dev *lanai) | 1791 | static inline void lanai_timed_poll_start(struct lanai_dev *lanai) |
1792 | { | 1792 | { |
1793 | setup_timer(&lanai->timer, lanai_timed_poll, (unsigned long)lanai); | 1793 | timer_setup(&lanai->timer, lanai_timed_poll, 0); |
1794 | lanai->timer.expires = jiffies + LANAI_POLL_PERIOD; | 1794 | lanai->timer.expires = jiffies + LANAI_POLL_PERIOD; |
1795 | add_timer(&lanai->timer); | 1795 | add_timer(&lanai->timer); |
1796 | } | 1796 | } |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 335447ed0ba4..cbec9adc01c7 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -145,7 +145,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user * arg); | |||
145 | #ifdef EXTRA_DEBUG | 145 | #ifdef EXTRA_DEBUG |
146 | static void which_list(ns_dev * card, struct sk_buff *skb); | 146 | static void which_list(ns_dev * card, struct sk_buff *skb); |
147 | #endif | 147 | #endif |
148 | static void ns_poll(unsigned long arg); | 148 | static void ns_poll(struct timer_list *unused); |
149 | static void ns_phy_put(struct atm_dev *dev, unsigned char value, | 149 | static void ns_phy_put(struct atm_dev *dev, unsigned char value, |
150 | unsigned long addr); | 150 | unsigned long addr); |
151 | static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr); | 151 | static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr); |
@@ -284,7 +284,7 @@ static int __init nicstar_init(void) | |||
284 | XPRINTK("nicstar: nicstar_init() returned.\n"); | 284 | XPRINTK("nicstar: nicstar_init() returned.\n"); |
285 | 285 | ||
286 | if (!error) { | 286 | if (!error) { |
287 | setup_timer(&ns_timer, ns_poll, 0UL); | 287 | timer_setup(&ns_timer, ns_poll, 0); |
288 | ns_timer.expires = jiffies + NS_POLL_PERIOD; | 288 | ns_timer.expires = jiffies + NS_POLL_PERIOD; |
289 | add_timer(&ns_timer); | 289 | add_timer(&ns_timer); |
290 | } | 290 | } |
@@ -2679,7 +2679,7 @@ static void which_list(ns_dev * card, struct sk_buff *skb) | |||
2679 | } | 2679 | } |
2680 | #endif /* EXTRA_DEBUG */ | 2680 | #endif /* EXTRA_DEBUG */ |
2681 | 2681 | ||
2682 | static void ns_poll(unsigned long arg) | 2682 | static void ns_poll(struct timer_list *unused) |
2683 | { | 2683 | { |
2684 | int i; | 2684 | int i; |
2685 | ns_dev *card; | 2685 | ns_dev *card; |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 6f14cdd6015b..442e777bdfb2 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -3079,8 +3079,8 @@ DAC960_InitializeController(DAC960_Controller_T *Controller) | |||
3079 | /* | 3079 | /* |
3080 | Initialize the Monitoring Timer. | 3080 | Initialize the Monitoring Timer. |
3081 | */ | 3081 | */ |
3082 | setup_timer(&Controller->MonitoringTimer, | 3082 | timer_setup(&Controller->MonitoringTimer, |
3083 | DAC960_MonitoringTimerFunction, (unsigned long)Controller); | 3083 | DAC960_MonitoringTimerFunction, 0); |
3084 | Controller->MonitoringTimer.expires = | 3084 | Controller->MonitoringTimer.expires = |
3085 | jiffies + DAC960_MonitoringTimerInterval; | 3085 | jiffies + DAC960_MonitoringTimerInterval; |
3086 | add_timer(&Controller->MonitoringTimer); | 3086 | add_timer(&Controller->MonitoringTimer); |
@@ -5619,9 +5619,9 @@ static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *Command) | |||
5619 | the status of DAC960 Controllers. | 5619 | the status of DAC960 Controllers. |
5620 | */ | 5620 | */ |
5621 | 5621 | ||
5622 | static void DAC960_MonitoringTimerFunction(unsigned long TimerData) | 5622 | static void DAC960_MonitoringTimerFunction(struct timer_list *t) |
5623 | { | 5623 | { |
5624 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) TimerData; | 5624 | DAC960_Controller_T *Controller = from_timer(Controller, t, MonitoringTimer); |
5625 | DAC960_Command_T *Command; | 5625 | DAC960_Command_T *Command; |
5626 | unsigned long flags; | 5626 | unsigned long flags; |
5627 | 5627 | ||
diff --git a/drivers/block/DAC960.h b/drivers/block/DAC960.h index 85fa9bb63759..6a6226a2b932 100644 --- a/drivers/block/DAC960.h +++ b/drivers/block/DAC960.h | |||
@@ -4406,7 +4406,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int, void *); | |||
4406 | static irqreturn_t DAC960_P_InterruptHandler(int, void *); | 4406 | static irqreturn_t DAC960_P_InterruptHandler(int, void *); |
4407 | static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *); | 4407 | static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *); |
4408 | static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *); | 4408 | static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *); |
4409 | static void DAC960_MonitoringTimerFunction(unsigned long); | 4409 | static void DAC960_MonitoringTimerFunction(struct timer_list *); |
4410 | static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *, | 4410 | static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *, |
4411 | DAC960_Controller_T *, ...); | 4411 | DAC960_Controller_T *, ...); |
4412 | static void DAC960_CreateProcEntries(DAC960_Controller_T *); | 4412 | static void DAC960_CreateProcEntries(DAC960_Controller_T *); |
diff --git a/drivers/block/rsxx/dma.c b/drivers/block/rsxx/dma.c index 6a1b2177951c..beaccf197a5a 100644 --- a/drivers/block/rsxx/dma.c +++ b/drivers/block/rsxx/dma.c | |||
@@ -354,9 +354,9 @@ static void rsxx_handle_dma_error(struct rsxx_dma_ctrl *ctrl, | |||
354 | rsxx_complete_dma(ctrl, dma, status); | 354 | rsxx_complete_dma(ctrl, dma, status); |
355 | } | 355 | } |
356 | 356 | ||
357 | static void dma_engine_stalled(unsigned long data) | 357 | static void dma_engine_stalled(struct timer_list *t) |
358 | { | 358 | { |
359 | struct rsxx_dma_ctrl *ctrl = (struct rsxx_dma_ctrl *)data; | 359 | struct rsxx_dma_ctrl *ctrl = from_timer(ctrl, t, activity_timer); |
360 | int cnt; | 360 | int cnt; |
361 | 361 | ||
362 | if (atomic_read(&ctrl->stats.hw_q_depth) == 0 || | 362 | if (atomic_read(&ctrl->stats.hw_q_depth) == 0 || |
@@ -838,8 +838,7 @@ static int rsxx_dma_ctrl_init(struct pci_dev *dev, | |||
838 | mutex_init(&ctrl->work_lock); | 838 | mutex_init(&ctrl->work_lock); |
839 | INIT_LIST_HEAD(&ctrl->queue); | 839 | INIT_LIST_HEAD(&ctrl->queue); |
840 | 840 | ||
841 | setup_timer(&ctrl->activity_timer, dma_engine_stalled, | 841 | timer_setup(&ctrl->activity_timer, dma_engine_stalled, 0); |
842 | (unsigned long)ctrl); | ||
843 | 842 | ||
844 | ctrl->issue_wq = alloc_ordered_workqueue(DRIVER_NAME"_issue", 0); | 843 | ctrl->issue_wq = alloc_ordered_workqueue(DRIVER_NAME"_issue", 0); |
845 | if (!ctrl->issue_wq) | 844 | if (!ctrl->issue_wq) |
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c index 2819f23e8bf2..de0d08133c7e 100644 --- a/drivers/block/skd_main.c +++ b/drivers/block/skd_main.c | |||
@@ -707,9 +707,9 @@ static void skd_start_queue(struct work_struct *work) | |||
707 | blk_mq_start_hw_queues(skdev->queue); | 707 | blk_mq_start_hw_queues(skdev->queue); |
708 | } | 708 | } |
709 | 709 | ||
710 | static void skd_timer_tick(ulong arg) | 710 | static void skd_timer_tick(struct timer_list *t) |
711 | { | 711 | { |
712 | struct skd_device *skdev = (struct skd_device *)arg; | 712 | struct skd_device *skdev = from_timer(skdev, t, timer); |
713 | unsigned long reqflags; | 713 | unsigned long reqflags; |
714 | u32 state; | 714 | u32 state; |
715 | 715 | ||
@@ -857,7 +857,7 @@ static int skd_start_timer(struct skd_device *skdev) | |||
857 | { | 857 | { |
858 | int rc; | 858 | int rc; |
859 | 859 | ||
860 | setup_timer(&skdev->timer, skd_timer_tick, (ulong)skdev); | 860 | timer_setup(&skdev->timer, skd_timer_tick, 0); |
861 | 861 | ||
862 | rc = mod_timer(&skdev->timer, (jiffies + HZ)); | 862 | rc = mod_timer(&skdev->timer, (jiffies + HZ)); |
863 | if (rc) | 863 | if (rc) |
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index ad9749463d4f..5ca56bfae63c 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c | |||
@@ -81,7 +81,7 @@ struct vdc_port { | |||
81 | 81 | ||
82 | static void vdc_ldc_reset(struct vdc_port *port); | 82 | static void vdc_ldc_reset(struct vdc_port *port); |
83 | static void vdc_ldc_reset_work(struct work_struct *work); | 83 | static void vdc_ldc_reset_work(struct work_struct *work); |
84 | static void vdc_ldc_reset_timer(unsigned long _arg); | 84 | static void vdc_ldc_reset_timer(struct timer_list *t); |
85 | 85 | ||
86 | static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio) | 86 | static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio) |
87 | { | 87 | { |
@@ -974,8 +974,7 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
974 | */ | 974 | */ |
975 | ldc_timeout = mdesc_get_property(hp, vdev->mp, "vdc-timeout", NULL); | 975 | ldc_timeout = mdesc_get_property(hp, vdev->mp, "vdc-timeout", NULL); |
976 | port->ldc_timeout = ldc_timeout ? *ldc_timeout : 0; | 976 | port->ldc_timeout = ldc_timeout ? *ldc_timeout : 0; |
977 | setup_timer(&port->ldc_reset_timer, vdc_ldc_reset_timer, | 977 | timer_setup(&port->ldc_reset_timer, vdc_ldc_reset_timer, 0); |
978 | (unsigned long)port); | ||
979 | INIT_WORK(&port->ldc_reset_work, vdc_ldc_reset_work); | 978 | INIT_WORK(&port->ldc_reset_work, vdc_ldc_reset_work); |
980 | 979 | ||
981 | err = vio_driver_init(&port->vio, vdev, VDEV_DISK, | 980 | err = vio_driver_init(&port->vio, vdev, VDEV_DISK, |
@@ -1087,9 +1086,9 @@ static void vdc_queue_drain(struct vdc_port *port) | |||
1087 | __blk_end_request_all(req, BLK_STS_IOERR); | 1086 | __blk_end_request_all(req, BLK_STS_IOERR); |
1088 | } | 1087 | } |
1089 | 1088 | ||
1090 | static void vdc_ldc_reset_timer(unsigned long _arg) | 1089 | static void vdc_ldc_reset_timer(struct timer_list *t) |
1091 | { | 1090 | { |
1092 | struct vdc_port *port = (struct vdc_port *) _arg; | 1091 | struct vdc_port *port = from_timer(port, t, ldc_reset_timer); |
1093 | struct vio_driver_state *vio = &port->vio; | 1092 | struct vio_driver_state *vio = &port->vio; |
1094 | unsigned long flags; | 1093 | unsigned long flags; |
1095 | 1094 | ||
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index b4d4ccfe7582..8077123678ad 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
@@ -718,7 +718,7 @@ static void check_batteries(struct cardinfo *card) | |||
718 | set_fault_to_battery_status(card); | 718 | set_fault_to_battery_status(card); |
719 | } | 719 | } |
720 | 720 | ||
721 | static void check_all_batteries(unsigned long ptr) | 721 | static void check_all_batteries(struct timer_list *unused) |
722 | { | 722 | { |
723 | int i; | 723 | int i; |
724 | 724 | ||
@@ -738,7 +738,7 @@ static void check_all_batteries(unsigned long ptr) | |||
738 | 738 | ||
739 | static void init_battery_timer(void) | 739 | static void init_battery_timer(void) |
740 | { | 740 | { |
741 | setup_timer(&battery_timer, check_all_batteries, 0UL); | 741 | timer_setup(&battery_timer, check_all_batteries, 0); |
742 | battery_timer.expires = jiffies + (HZ * 60); | 742 | battery_timer.expires = jiffies + (HZ * 60); |
743 | add_timer(&battery_timer); | 743 | add_timer(&battery_timer); |
744 | } | 744 | } |
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 14459d66ef0c..c24589414c75 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
@@ -770,9 +770,9 @@ static void ace_fsm_tasklet(unsigned long data) | |||
770 | spin_unlock_irqrestore(&ace->lock, flags); | 770 | spin_unlock_irqrestore(&ace->lock, flags); |
771 | } | 771 | } |
772 | 772 | ||
773 | static void ace_stall_timer(unsigned long data) | 773 | static void ace_stall_timer(struct timer_list *t) |
774 | { | 774 | { |
775 | struct ace_device *ace = (void *)data; | 775 | struct ace_device *ace = from_timer(ace, t, stall_timer); |
776 | unsigned long flags; | 776 | unsigned long flags; |
777 | 777 | ||
778 | dev_warn(ace->dev, | 778 | dev_warn(ace->dev, |
@@ -984,7 +984,7 @@ static int ace_setup(struct ace_device *ace) | |||
984 | * Initialize the state machine tasklet and stall timer | 984 | * Initialize the state machine tasklet and stall timer |
985 | */ | 985 | */ |
986 | tasklet_init(&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long)ace); | 986 | tasklet_init(&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long)ace); |
987 | setup_timer(&ace->stall_timer, ace_stall_timer, (unsigned long)ace); | 987 | timer_setup(&ace->stall_timer, ace_stall_timer, 0); |
988 | 988 | ||
989 | /* | 989 | /* |
990 | * Initialize the request queue | 990 | * Initialize the request queue |
diff --git a/drivers/char/ipmi/bt-bmc.c b/drivers/char/ipmi/bt-bmc.c index c4ef73c6f455..6edfaa72b98b 100644 --- a/drivers/char/ipmi/bt-bmc.c +++ b/drivers/char/ipmi/bt-bmc.c | |||
@@ -367,9 +367,9 @@ static const struct file_operations bt_bmc_fops = { | |||
367 | .unlocked_ioctl = bt_bmc_ioctl, | 367 | .unlocked_ioctl = bt_bmc_ioctl, |
368 | }; | 368 | }; |
369 | 369 | ||
370 | static void poll_timer(unsigned long data) | 370 | static void poll_timer(struct timer_list *t) |
371 | { | 371 | { |
372 | struct bt_bmc *bt_bmc = (void *)data; | 372 | struct bt_bmc *bt_bmc = from_timer(bt_bmc, t, poll_timer); |
373 | 373 | ||
374 | bt_bmc->poll_timer.expires += msecs_to_jiffies(500); | 374 | bt_bmc->poll_timer.expires += msecs_to_jiffies(500); |
375 | wake_up(&bt_bmc->queue); | 375 | wake_up(&bt_bmc->queue); |
@@ -487,8 +487,7 @@ static int bt_bmc_probe(struct platform_device *pdev) | |||
487 | dev_info(dev, "Using IRQ %d\n", bt_bmc->irq); | 487 | dev_info(dev, "Using IRQ %d\n", bt_bmc->irq); |
488 | } else { | 488 | } else { |
489 | dev_info(dev, "No IRQ; using timer\n"); | 489 | dev_info(dev, "No IRQ; using timer\n"); |
490 | setup_timer(&bt_bmc->poll_timer, poll_timer, | 490 | timer_setup(&bt_bmc->poll_timer, poll_timer, 0); |
491 | (unsigned long)bt_bmc); | ||
492 | bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10); | 491 | bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10); |
493 | add_timer(&bt_bmc->poll_timer); | 492 | add_timer(&bt_bmc->poll_timer); |
494 | } | 493 | } |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 9de189db2cc3..f45732a2cb3e 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -4766,7 +4766,7 @@ static struct timer_list ipmi_timer; | |||
4766 | 4766 | ||
4767 | static atomic_t stop_operation; | 4767 | static atomic_t stop_operation; |
4768 | 4768 | ||
4769 | static void ipmi_timeout(unsigned long data) | 4769 | static void ipmi_timeout(struct timer_list *unused) |
4770 | { | 4770 | { |
4771 | ipmi_smi_t intf; | 4771 | ipmi_smi_t intf; |
4772 | int nt = 0; | 4772 | int nt = 0; |
@@ -5172,7 +5172,7 @@ static int ipmi_init_msghandler(void) | |||
5172 | 5172 | ||
5173 | #endif /* CONFIG_IPMI_PROC_INTERFACE */ | 5173 | #endif /* CONFIG_IPMI_PROC_INTERFACE */ |
5174 | 5174 | ||
5175 | setup_timer(&ipmi_timer, ipmi_timeout, 0); | 5175 | timer_setup(&ipmi_timer, ipmi_timeout, 0); |
5176 | mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); | 5176 | mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); |
5177 | 5177 | ||
5178 | atomic_notifier_chain_register(&panic_notifier_list, &panic_block); | 5178 | atomic_notifier_chain_register(&panic_notifier_list, &panic_block); |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 71d33a1807e4..779869ed32b1 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -1091,9 +1091,9 @@ static void set_need_watch(void *send_info, bool enable) | |||
1091 | spin_unlock_irqrestore(&smi_info->si_lock, flags); | 1091 | spin_unlock_irqrestore(&smi_info->si_lock, flags); |
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | static void smi_timeout(unsigned long data) | 1094 | static void smi_timeout(struct timer_list *t) |
1095 | { | 1095 | { |
1096 | struct smi_info *smi_info = (struct smi_info *) data; | 1096 | struct smi_info *smi_info = from_timer(smi_info, t, si_timer); |
1097 | enum si_sm_result smi_result; | 1097 | enum si_sm_result smi_result; |
1098 | unsigned long flags; | 1098 | unsigned long flags; |
1099 | unsigned long jiffies_now; | 1099 | unsigned long jiffies_now; |
@@ -1166,7 +1166,7 @@ static int smi_start_processing(void *send_info, | |||
1166 | new_smi->intf = intf; | 1166 | new_smi->intf = intf; |
1167 | 1167 | ||
1168 | /* Set up the timer that drives the interface. */ | 1168 | /* Set up the timer that drives the interface. */ |
1169 | setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi); | 1169 | timer_setup(&new_smi->si_timer, smi_timeout, 0); |
1170 | smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES); | 1170 | smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES); |
1171 | 1171 | ||
1172 | /* Try to claim any interrupts. */ | 1172 | /* Try to claim any interrupts. */ |
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index 466b3a1c0adf..3cfaec728604 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c | |||
@@ -551,9 +551,9 @@ static void start_get(struct ssif_info *ssif_info) | |||
551 | } | 551 | } |
552 | } | 552 | } |
553 | 553 | ||
554 | static void retry_timeout(unsigned long data) | 554 | static void retry_timeout(struct timer_list *t) |
555 | { | 555 | { |
556 | struct ssif_info *ssif_info = (void *) data; | 556 | struct ssif_info *ssif_info = from_timer(ssif_info, t, retry_timer); |
557 | unsigned long oflags, *flags; | 557 | unsigned long oflags, *flags; |
558 | bool waiting; | 558 | bool waiting; |
559 | 559 | ||
@@ -1691,8 +1691,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
1691 | 1691 | ||
1692 | spin_lock_init(&ssif_info->lock); | 1692 | spin_lock_init(&ssif_info->lock); |
1693 | ssif_info->ssif_state = SSIF_NORMAL; | 1693 | ssif_info->ssif_state = SSIF_NORMAL; |
1694 | setup_timer(&ssif_info->retry_timer, retry_timeout, | 1694 | timer_setup(&ssif_info->retry_timer, retry_timeout, 0); |
1695 | (unsigned long)ssif_info); | ||
1696 | 1695 | ||
1697 | for (i = 0; i < SSIF_NUM_STATS; i++) | 1696 | for (i = 0; i < SSIF_NUM_STATS; i++) |
1698 | atomic_set(&ssif_info->stats[i], 0); | 1697 | atomic_set(&ssif_info->stats[i], 0); |
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c index 461bf0b8a094..230b99288024 100644 --- a/drivers/char/tpm/tpm-dev-common.c +++ b/drivers/char/tpm/tpm-dev-common.c | |||
@@ -22,9 +22,9 @@ | |||
22 | #include "tpm.h" | 22 | #include "tpm.h" |
23 | #include "tpm-dev.h" | 23 | #include "tpm-dev.h" |
24 | 24 | ||
25 | static void user_reader_timeout(unsigned long ptr) | 25 | static void user_reader_timeout(struct timer_list *t) |
26 | { | 26 | { |
27 | struct file_priv *priv = (struct file_priv *)ptr; | 27 | struct file_priv *priv = from_timer(priv, t, user_read_timer); |
28 | 28 | ||
29 | pr_warn("TPM user space timeout is deprecated (pid=%d)\n", | 29 | pr_warn("TPM user space timeout is deprecated (pid=%d)\n", |
30 | task_tgid_nr(current)); | 30 | task_tgid_nr(current)); |
@@ -48,8 +48,7 @@ void tpm_common_open(struct file *file, struct tpm_chip *chip, | |||
48 | priv->chip = chip; | 48 | priv->chip = chip; |
49 | atomic_set(&priv->data_pending, 0); | 49 | atomic_set(&priv->data_pending, 0); |
50 | mutex_init(&priv->buffer_mutex); | 50 | mutex_init(&priv->buffer_mutex); |
51 | setup_timer(&priv->user_read_timer, user_reader_timeout, | 51 | timer_setup(&priv->user_read_timer, user_reader_timeout, 0); |
52 | (unsigned long)priv); | ||
53 | INIT_WORK(&priv->work, timeout_work); | 52 | INIT_WORK(&priv->work, timeout_work); |
54 | 53 | ||
55 | file->private_data = priv; | 54 | file->private_data = priv; |
diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 09c1c4ff93ca..3717b3df34a4 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c | |||
@@ -367,9 +367,9 @@ void drm_vblank_disable_and_save(struct drm_device *dev, unsigned int pipe) | |||
367 | spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); | 367 | spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); |
368 | } | 368 | } |
369 | 369 | ||
370 | static void vblank_disable_fn(unsigned long arg) | 370 | static void vblank_disable_fn(struct timer_list *t) |
371 | { | 371 | { |
372 | struct drm_vblank_crtc *vblank = (void *)arg; | 372 | struct drm_vblank_crtc *vblank = from_timer(vblank, t, disable_timer); |
373 | struct drm_device *dev = vblank->dev; | 373 | struct drm_device *dev = vblank->dev; |
374 | unsigned int pipe = vblank->pipe; | 374 | unsigned int pipe = vblank->pipe; |
375 | unsigned long irqflags; | 375 | unsigned long irqflags; |
@@ -436,8 +436,7 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) | |||
436 | vblank->dev = dev; | 436 | vblank->dev = dev; |
437 | vblank->pipe = i; | 437 | vblank->pipe = i; |
438 | init_waitqueue_head(&vblank->queue); | 438 | init_waitqueue_head(&vblank->queue); |
439 | setup_timer(&vblank->disable_timer, vblank_disable_fn, | 439 | timer_setup(&vblank->disable_timer, vblank_disable_fn, 0); |
440 | (unsigned long)vblank); | ||
441 | seqlock_init(&vblank->seqlock); | 440 | seqlock_init(&vblank->seqlock); |
442 | } | 441 | } |
443 | 442 | ||
@@ -1019,7 +1018,7 @@ static void drm_vblank_put(struct drm_device *dev, unsigned int pipe) | |||
1019 | if (drm_vblank_offdelay == 0) | 1018 | if (drm_vblank_offdelay == 0) |
1020 | return; | 1019 | return; |
1021 | else if (drm_vblank_offdelay < 0) | 1020 | else if (drm_vblank_offdelay < 0) |
1022 | vblank_disable_fn((unsigned long)vblank); | 1021 | vblank_disable_fn(&vblank->disable_timer); |
1023 | else if (!dev->vblank_disable_immediate) | 1022 | else if (!dev->vblank_disable_immediate) |
1024 | mod_timer(&vblank->disable_timer, | 1023 | mod_timer(&vblank->disable_timer, |
1025 | jiffies + ((drm_vblank_offdelay * HZ)/1000)); | 1024 | jiffies + ((drm_vblank_offdelay * HZ)/1000)); |
@@ -1650,7 +1649,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe) | |||
1650 | spin_unlock_irqrestore(&dev->event_lock, irqflags); | 1649 | spin_unlock_irqrestore(&dev->event_lock, irqflags); |
1651 | 1650 | ||
1652 | if (disable_irq) | 1651 | if (disable_irq) |
1653 | vblank_disable_fn((unsigned long)vblank); | 1652 | vblank_disable_fn(&vblank->disable_timer); |
1654 | 1653 | ||
1655 | return true; | 1654 | return true; |
1656 | } | 1655 | } |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c index 53e03f8af3d5..e6b0940b1ac2 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c | |||
@@ -161,9 +161,9 @@ static const struct exynos_drm_crtc_ops vidi_crtc_ops = { | |||
161 | .atomic_flush = exynos_crtc_handle_event, | 161 | .atomic_flush = exynos_crtc_handle_event, |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static void vidi_fake_vblank_timer(unsigned long arg) | 164 | static void vidi_fake_vblank_timer(struct timer_list *t) |
165 | { | 165 | { |
166 | struct vidi_context *ctx = (void *)arg; | 166 | struct vidi_context *ctx = from_timer(ctx, t, timer); |
167 | 167 | ||
168 | if (drm_crtc_handle_vblank(&ctx->crtc->base)) | 168 | if (drm_crtc_handle_vblank(&ctx->crtc->base)) |
169 | mod_timer(&ctx->timer, | 169 | mod_timer(&ctx->timer, |
@@ -449,7 +449,7 @@ static int vidi_probe(struct platform_device *pdev) | |||
449 | 449 | ||
450 | ctx->pdev = pdev; | 450 | ctx->pdev = pdev; |
451 | 451 | ||
452 | setup_timer(&ctx->timer, vidi_fake_vblank_timer, (unsigned long)ctx); | 452 | timer_setup(&ctx->timer, vidi_fake_vblank_timer, 0); |
453 | 453 | ||
454 | mutex_init(&ctx->lock); | 454 | mutex_init(&ctx->lock); |
455 | 455 | ||
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 4d1f45acf2cd..127815253a84 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c | |||
@@ -601,9 +601,9 @@ tda998x_reset(struct tda998x_priv *priv) | |||
601 | * we have seen a HPD inactive->active transition. This code implements | 601 | * we have seen a HPD inactive->active transition. This code implements |
602 | * that delay. | 602 | * that delay. |
603 | */ | 603 | */ |
604 | static void tda998x_edid_delay_done(unsigned long data) | 604 | static void tda998x_edid_delay_done(struct timer_list *t) |
605 | { | 605 | { |
606 | struct tda998x_priv *priv = (struct tda998x_priv *)data; | 606 | struct tda998x_priv *priv = from_timer(priv, t, edid_delay_timer); |
607 | 607 | ||
608 | priv->edid_delay_active = false; | 608 | priv->edid_delay_active = false; |
609 | wake_up(&priv->edid_delay_waitq); | 609 | wake_up(&priv->edid_delay_waitq); |
@@ -1492,8 +1492,7 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv) | |||
1492 | 1492 | ||
1493 | mutex_init(&priv->mutex); /* protect the page access */ | 1493 | mutex_init(&priv->mutex); /* protect the page access */ |
1494 | init_waitqueue_head(&priv->edid_delay_waitq); | 1494 | init_waitqueue_head(&priv->edid_delay_waitq); |
1495 | setup_timer(&priv->edid_delay_timer, tda998x_edid_delay_done, | 1495 | timer_setup(&priv->edid_delay_timer, tda998x_edid_delay_done, 0); |
1496 | (unsigned long)priv); | ||
1497 | INIT_WORK(&priv->detect_work, tda998x_detect_work); | 1496 | INIT_WORK(&priv->detect_work, tda998x_detect_work); |
1498 | 1497 | ||
1499 | /* wake up the device: */ | 1498 | /* wake up the device: */ |
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c index 40f4840ef98e..970c7963ae29 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_preempt.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_preempt.c | |||
@@ -82,9 +82,9 @@ static struct msm_ringbuffer *get_next_ring(struct msm_gpu *gpu) | |||
82 | return NULL; | 82 | return NULL; |
83 | } | 83 | } |
84 | 84 | ||
85 | static void a5xx_preempt_timer(unsigned long data) | 85 | static void a5xx_preempt_timer(struct timer_list *t) |
86 | { | 86 | { |
87 | struct a5xx_gpu *a5xx_gpu = (struct a5xx_gpu *) data; | 87 | struct a5xx_gpu *a5xx_gpu = from_timer(a5xx_gpu, t, preempt_timer); |
88 | struct msm_gpu *gpu = &a5xx_gpu->base.base; | 88 | struct msm_gpu *gpu = &a5xx_gpu->base.base; |
89 | struct drm_device *dev = gpu->dev; | 89 | struct drm_device *dev = gpu->dev; |
90 | struct msm_drm_private *priv = dev->dev_private; | 90 | struct msm_drm_private *priv = dev->dev_private; |
@@ -300,6 +300,5 @@ void a5xx_preempt_init(struct msm_gpu *gpu) | |||
300 | } | 300 | } |
301 | } | 301 | } |
302 | 302 | ||
303 | setup_timer(&a5xx_gpu->preempt_timer, a5xx_preempt_timer, | 303 | timer_setup(&a5xx_gpu->preempt_timer, a5xx_preempt_timer, 0); |
304 | (unsigned long) a5xx_gpu); | ||
305 | } | 304 | } |
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 8d4477818ec2..232201403439 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c | |||
@@ -353,9 +353,9 @@ static void hangcheck_timer_reset(struct msm_gpu *gpu) | |||
353 | round_jiffies_up(jiffies + DRM_MSM_HANGCHECK_JIFFIES)); | 353 | round_jiffies_up(jiffies + DRM_MSM_HANGCHECK_JIFFIES)); |
354 | } | 354 | } |
355 | 355 | ||
356 | static void hangcheck_handler(unsigned long data) | 356 | static void hangcheck_handler(struct timer_list *t) |
357 | { | 357 | { |
358 | struct msm_gpu *gpu = (struct msm_gpu *)data; | 358 | struct msm_gpu *gpu = from_timer(gpu, t, hangcheck_timer); |
359 | struct drm_device *dev = gpu->dev; | 359 | struct drm_device *dev = gpu->dev; |
360 | struct msm_drm_private *priv = dev->dev_private; | 360 | struct msm_drm_private *priv = dev->dev_private; |
361 | struct msm_ringbuffer *ring = gpu->funcs->active_ring(gpu); | 361 | struct msm_ringbuffer *ring = gpu->funcs->active_ring(gpu); |
@@ -703,8 +703,7 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev, | |||
703 | INIT_WORK(&gpu->recover_work, recover_worker); | 703 | INIT_WORK(&gpu->recover_work, recover_worker); |
704 | 704 | ||
705 | 705 | ||
706 | setup_timer(&gpu->hangcheck_timer, hangcheck_handler, | 706 | timer_setup(&gpu->hangcheck_timer, hangcheck_handler, 0); |
707 | (unsigned long)gpu); | ||
708 | 707 | ||
709 | spin_lock_init(&gpu->perf_lock); | 708 | spin_lock_init(&gpu->perf_lock); |
710 | 709 | ||
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index cea744e4d9bd..c2cf6d98e577 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c | |||
@@ -4095,7 +4095,7 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev) | |||
4095 | } | 4095 | } |
4096 | 4096 | ||
4097 | #ifdef DSI_CATCH_MISSING_TE | 4097 | #ifdef DSI_CATCH_MISSING_TE |
4098 | static void dsi_te_timeout(unsigned long arg) | 4098 | static void dsi_te_timeout(struct timer_list *unused) |
4099 | { | 4099 | { |
4100 | DSSERR("TE not received for 250ms!\n"); | 4100 | DSSERR("TE not received for 250ms!\n"); |
4101 | } | 4101 | } |
@@ -5449,7 +5449,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) | |||
5449 | dsi_framedone_timeout_work_callback); | 5449 | dsi_framedone_timeout_work_callback); |
5450 | 5450 | ||
5451 | #ifdef DSI_CATCH_MISSING_TE | 5451 | #ifdef DSI_CATCH_MISSING_TE |
5452 | setup_timer(&dsi->te_timer, dsi_te_timeout, 0); | 5452 | timer_setup(&dsi->te_timer, dsi_te_timeout, 0); |
5453 | #endif | 5453 | #endif |
5454 | 5454 | ||
5455 | dsi_mem = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto"); | 5455 | dsi_mem = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto"); |
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c index a553e182ff53..3acfd576b7df 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c | |||
@@ -101,9 +101,9 @@ static void psr_set_state(struct psr_drv *psr, enum psr_state state) | |||
101 | spin_unlock_irqrestore(&psr->lock, flags); | 101 | spin_unlock_irqrestore(&psr->lock, flags); |
102 | } | 102 | } |
103 | 103 | ||
104 | static void psr_flush_handler(unsigned long data) | 104 | static void psr_flush_handler(struct timer_list *t) |
105 | { | 105 | { |
106 | struct psr_drv *psr = (struct psr_drv *)data; | 106 | struct psr_drv *psr = from_timer(psr, t, flush_timer); |
107 | unsigned long flags; | 107 | unsigned long flags; |
108 | 108 | ||
109 | /* If the state has changed since we initiated the flush, do nothing */ | 109 | /* If the state has changed since we initiated the flush, do nothing */ |
@@ -232,7 +232,7 @@ int rockchip_drm_psr_register(struct drm_encoder *encoder, | |||
232 | if (!psr) | 232 | if (!psr) |
233 | return -ENOMEM; | 233 | return -ENOMEM; |
234 | 234 | ||
235 | setup_timer(&psr->flush_timer, psr_flush_handler, (unsigned long)psr); | 235 | timer_setup(&psr->flush_timer, psr_flush_handler, 0); |
236 | spin_lock_init(&psr->lock); | 236 | spin_lock_init(&psr->lock); |
237 | 237 | ||
238 | psr->active = true; | 238 | psr->active = true; |
diff --git a/drivers/gpu/drm/vgem/vgem_fence.c b/drivers/gpu/drm/vgem/vgem_fence.c index 8fd52f211e9d..b28876c222b4 100644 --- a/drivers/gpu/drm/vgem/vgem_fence.c +++ b/drivers/gpu/drm/vgem/vgem_fence.c | |||
@@ -85,9 +85,9 @@ static const struct dma_fence_ops vgem_fence_ops = { | |||
85 | .timeline_value_str = vgem_fence_timeline_value_str, | 85 | .timeline_value_str = vgem_fence_timeline_value_str, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static void vgem_fence_timeout(unsigned long data) | 88 | static void vgem_fence_timeout(struct timer_list *t) |
89 | { | 89 | { |
90 | struct vgem_fence *fence = (struct vgem_fence *)data; | 90 | struct vgem_fence *fence = from_timer(fence, t, timer); |
91 | 91 | ||
92 | dma_fence_signal(&fence->base); | 92 | dma_fence_signal(&fence->base); |
93 | } | 93 | } |
@@ -105,7 +105,7 @@ static struct dma_fence *vgem_fence_create(struct vgem_file *vfile, | |||
105 | dma_fence_init(&fence->base, &vgem_fence_ops, &fence->lock, | 105 | dma_fence_init(&fence->base, &vgem_fence_ops, &fence->lock, |
106 | dma_fence_context_alloc(1), 1); | 106 | dma_fence_context_alloc(1), 1); |
107 | 107 | ||
108 | setup_timer(&fence->timer, vgem_fence_timeout, (unsigned long)fence); | 108 | timer_setup(&fence->timer, vgem_fence_timeout, 0); |
109 | 109 | ||
110 | /* We force the fence to expire within 10s to prevent driver hangs */ | 110 | /* We force the fence to expire within 10s to prevent driver hangs */ |
111 | mod_timer(&fence->timer, jiffies + VGEM_FENCE_TIMEOUT); | 111 | mod_timer(&fence->timer, jiffies + VGEM_FENCE_TIMEOUT); |
diff --git a/drivers/gpu/drm/via/via_dmablit.c b/drivers/gpu/drm/via/via_dmablit.c index 32c9938e1e1e..d6e84a589ef1 100644 --- a/drivers/gpu/drm/via/via_dmablit.c +++ b/drivers/gpu/drm/via/via_dmablit.c | |||
@@ -452,9 +452,9 @@ via_dmablit_sync(struct drm_device *dev, uint32_t handle, int engine) | |||
452 | 452 | ||
453 | 453 | ||
454 | static void | 454 | static void |
455 | via_dmablit_timer(unsigned long data) | 455 | via_dmablit_timer(struct timer_list *t) |
456 | { | 456 | { |
457 | drm_via_blitq_t *blitq = (drm_via_blitq_t *) data; | 457 | drm_via_blitq_t *blitq = from_timer(blitq, t, poll_timer); |
458 | struct drm_device *dev = blitq->dev; | 458 | struct drm_device *dev = blitq->dev; |
459 | int engine = (int) | 459 | int engine = (int) |
460 | (blitq - ((drm_via_private_t *)dev->dev_private)->blit_queues); | 460 | (blitq - ((drm_via_private_t *)dev->dev_private)->blit_queues); |
@@ -559,8 +559,7 @@ via_init_dmablit(struct drm_device *dev) | |||
559 | init_waitqueue_head(blitq->blit_queue + j); | 559 | init_waitqueue_head(blitq->blit_queue + j); |
560 | init_waitqueue_head(&blitq->busy_queue); | 560 | init_waitqueue_head(&blitq->busy_queue); |
561 | INIT_WORK(&blitq->wq, via_dmablit_workqueue); | 561 | INIT_WORK(&blitq->wq, via_dmablit_workqueue); |
562 | setup_timer(&blitq->poll_timer, via_dmablit_timer, | 562 | timer_setup(&blitq->poll_timer, via_dmablit_timer, 0); |
563 | (unsigned long)blitq); | ||
564 | } | 563 | } |
565 | } | 564 | } |
566 | 565 | ||
diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c index 07cbc70f00e7..eae7d52cf1a8 100644 --- a/drivers/hid/hid-appleir.c +++ b/drivers/hid/hid-appleir.c | |||
@@ -173,9 +173,9 @@ static void battery_flat(struct appleir *appleir) | |||
173 | dev_err(&appleir->input_dev->dev, "possible flat battery?\n"); | 173 | dev_err(&appleir->input_dev->dev, "possible flat battery?\n"); |
174 | } | 174 | } |
175 | 175 | ||
176 | static void key_up_tick(unsigned long data) | 176 | static void key_up_tick(struct timer_list *t) |
177 | { | 177 | { |
178 | struct appleir *appleir = (struct appleir *)data; | 178 | struct appleir *appleir = from_timer(appleir, t, key_up_timer); |
179 | struct hid_device *hid = appleir->hid; | 179 | struct hid_device *hid = appleir->hid; |
180 | unsigned long flags; | 180 | unsigned long flags; |
181 | 181 | ||
@@ -303,8 +303,7 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id) | |||
303 | hid->quirks |= HID_QUIRK_HIDINPUT_FORCE; | 303 | hid->quirks |= HID_QUIRK_HIDINPUT_FORCE; |
304 | 304 | ||
305 | spin_lock_init(&appleir->lock); | 305 | spin_lock_init(&appleir->lock); |
306 | setup_timer(&appleir->key_up_timer, | 306 | timer_setup(&appleir->key_up_timer, key_up_tick, 0); |
307 | key_up_tick, (unsigned long) appleir); | ||
308 | 307 | ||
309 | hid_set_drvdata(hid, appleir); | 308 | hid_set_drvdata(hid, appleir); |
310 | 309 | ||
diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index 49c4bd34b3c5..87eda34ea2f8 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c | |||
@@ -239,9 +239,9 @@ drop_note: | |||
239 | return; | 239 | return; |
240 | } | 240 | } |
241 | 241 | ||
242 | static void pcmidi_sustained_note_release(unsigned long data) | 242 | static void pcmidi_sustained_note_release(struct timer_list *t) |
243 | { | 243 | { |
244 | struct pcmidi_sustain *pms = (struct pcmidi_sustain *)data; | 244 | struct pcmidi_sustain *pms = from_timer(pms, t, timer); |
245 | 245 | ||
246 | pcmidi_send_note(pms->pm, pms->status, pms->note, pms->velocity); | 246 | pcmidi_send_note(pms->pm, pms->status, pms->note, pms->velocity); |
247 | pms->in_use = 0; | 247 | pms->in_use = 0; |
@@ -256,8 +256,7 @@ static void init_sustain_timers(struct pcmidi_snd *pm) | |||
256 | pms = &pm->sustained_notes[i]; | 256 | pms = &pm->sustained_notes[i]; |
257 | pms->in_use = 0; | 257 | pms->in_use = 0; |
258 | pms->pm = pm; | 258 | pms->pm = pm; |
259 | setup_timer(&pms->timer, pcmidi_sustained_note_release, | 259 | timer_setup(&pms->timer, pcmidi_sustained_note_release, 0); |
260 | (unsigned long)pms); | ||
261 | } | 260 | } |
262 | } | 261 | } |
263 | 262 | ||
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index d00391418d1a..579884ebd94d 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c | |||
@@ -1226,9 +1226,9 @@ static void wiimote_schedule(struct wiimote_data *wdata) | |||
1226 | spin_unlock_irqrestore(&wdata->state.lock, flags); | 1226 | spin_unlock_irqrestore(&wdata->state.lock, flags); |
1227 | } | 1227 | } |
1228 | 1228 | ||
1229 | static void wiimote_init_timeout(unsigned long arg) | 1229 | static void wiimote_init_timeout(struct timer_list *t) |
1230 | { | 1230 | { |
1231 | struct wiimote_data *wdata = (void*)arg; | 1231 | struct wiimote_data *wdata = from_timer(wdata, t, timer); |
1232 | 1232 | ||
1233 | wiimote_schedule(wdata); | 1233 | wiimote_schedule(wdata); |
1234 | } | 1234 | } |
@@ -1740,7 +1740,7 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev) | |||
1740 | wdata->state.cmd_battery = 0xff; | 1740 | wdata->state.cmd_battery = 0xff; |
1741 | 1741 | ||
1742 | INIT_WORK(&wdata->init_worker, wiimote_init_worker); | 1742 | INIT_WORK(&wdata->init_worker, wiimote_init_worker); |
1743 | setup_timer(&wdata->timer, wiimote_init_timeout, (long)wdata); | 1743 | timer_setup(&wdata->timer, wiimote_init_timeout, 0); |
1744 | 1744 | ||
1745 | return wdata; | 1745 | return wdata; |
1746 | } | 1746 | } |
diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c index ea7adb638d99..2ba2ff5e59c4 100644 --- a/drivers/iio/common/ssp_sensors/ssp_dev.c +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c | |||
@@ -175,9 +175,9 @@ static void ssp_wdt_work_func(struct work_struct *work) | |||
175 | data->timeout_cnt = 0; | 175 | data->timeout_cnt = 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static void ssp_wdt_timer_func(unsigned long ptr) | 178 | static void ssp_wdt_timer_func(struct timer_list *t) |
179 | { | 179 | { |
180 | struct ssp_data *data = (struct ssp_data *)ptr; | 180 | struct ssp_data *data = from_timer(data, t, wdt_timer); |
181 | 181 | ||
182 | switch (data->fw_dl_state) { | 182 | switch (data->fw_dl_state) { |
183 | case SSP_FW_DL_STATE_FAIL: | 183 | case SSP_FW_DL_STATE_FAIL: |
@@ -571,7 +571,7 @@ static int ssp_probe(struct spi_device *spi) | |||
571 | INIT_WORK(&data->work_wdt, ssp_wdt_work_func); | 571 | INIT_WORK(&data->work_wdt, ssp_wdt_work_func); |
572 | INIT_DELAYED_WORK(&data->work_refresh, ssp_refresh_task); | 572 | INIT_DELAYED_WORK(&data->work_refresh, ssp_refresh_task); |
573 | 573 | ||
574 | setup_timer(&data->wdt_timer, ssp_wdt_timer_func, (unsigned long)data); | 574 | timer_setup(&data->wdt_timer, ssp_wdt_timer_func, 0); |
575 | 575 | ||
576 | ret = request_threaded_irq(data->spi->irq, NULL, | 576 | ret = request_threaded_irq(data->spi->irq, NULL, |
577 | ssp_irq_thread_fn, | 577 | ssp_irq_thread_fn, |
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 9beee9cef137..ee0ee1f9994b 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c | |||
@@ -642,9 +642,9 @@ err: | |||
642 | return -ENOMEM; | 642 | return -ENOMEM; |
643 | } | 643 | } |
644 | 644 | ||
645 | static void delay_time_func(unsigned long ctx) | 645 | static void delay_time_func(struct timer_list *t) |
646 | { | 646 | { |
647 | struct mlx5_ib_dev *dev = (struct mlx5_ib_dev *)ctx; | 647 | struct mlx5_ib_dev *dev = from_timer(dev, t, delay_timer); |
648 | 648 | ||
649 | dev->fill_delay = 0; | 649 | dev->fill_delay = 0; |
650 | } | 650 | } |
@@ -663,7 +663,7 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev) | |||
663 | return -ENOMEM; | 663 | return -ENOMEM; |
664 | } | 664 | } |
665 | 665 | ||
666 | setup_timer(&dev->delay_timer, delay_time_func, (unsigned long)dev); | 666 | timer_setup(&dev->delay_timer, delay_time_func, 0); |
667 | for (i = 0; i < MAX_MR_CACHE_ENTRIES; i++) { | 667 | for (i = 0; i < MAX_MR_CACHE_ENTRIES; i++) { |
668 | ent = &cache->ent[i]; | 668 | ent = &cache->ent[i]; |
669 | INIT_LIST_HEAD(&ent->head); | 669 | INIT_LIST_HEAD(&ent->head); |
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index cedc665364cd..73862a836062 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -202,9 +202,9 @@ void gameport_stop_polling(struct gameport *gameport) | |||
202 | } | 202 | } |
203 | EXPORT_SYMBOL(gameport_stop_polling); | 203 | EXPORT_SYMBOL(gameport_stop_polling); |
204 | 204 | ||
205 | static void gameport_run_poll_handler(unsigned long d) | 205 | static void gameport_run_poll_handler(struct timer_list *t) |
206 | { | 206 | { |
207 | struct gameport *gameport = (struct gameport *)d; | 207 | struct gameport *gameport = from_timer(gameport, t, poll_timer); |
208 | 208 | ||
209 | gameport->poll_handler(gameport); | 209 | gameport->poll_handler(gameport); |
210 | if (gameport->poll_cnt) | 210 | if (gameport->poll_cnt) |
@@ -542,8 +542,7 @@ static void gameport_init_port(struct gameport *gameport) | |||
542 | 542 | ||
543 | INIT_LIST_HEAD(&gameport->node); | 543 | INIT_LIST_HEAD(&gameport->node); |
544 | spin_lock_init(&gameport->timer_lock); | 544 | spin_lock_init(&gameport->timer_lock); |
545 | setup_timer(&gameport->poll_timer, gameport_run_poll_handler, | 545 | timer_setup(&gameport->poll_timer, gameport_run_poll_handler, 0); |
546 | (unsigned long)gameport); | ||
547 | } | 546 | } |
548 | 547 | ||
549 | /* | 548 | /* |
diff --git a/drivers/input/joystick/db9.c b/drivers/input/joystick/db9.c index f4ad83eab67f..de0dd4756c84 100644 --- a/drivers/input/joystick/db9.c +++ b/drivers/input/joystick/db9.c | |||
@@ -364,9 +364,9 @@ static int db9_saturn(int mode, struct parport *port, struct input_dev *devs[]) | |||
364 | return 0; | 364 | return 0; |
365 | } | 365 | } |
366 | 366 | ||
367 | static void db9_timer(unsigned long private) | 367 | static void db9_timer(struct timer_list *t) |
368 | { | 368 | { |
369 | struct db9 *db9 = (void *) private; | 369 | struct db9 *db9 = from_timer(db9, t, timer); |
370 | struct parport *port = db9->pd->port; | 370 | struct parport *port = db9->pd->port; |
371 | struct input_dev *dev = db9->dev[0]; | 371 | struct input_dev *dev = db9->dev[0]; |
372 | struct input_dev *dev2 = db9->dev[1]; | 372 | struct input_dev *dev2 = db9->dev[1]; |
@@ -609,7 +609,7 @@ static void db9_attach(struct parport *pp) | |||
609 | db9->pd = pd; | 609 | db9->pd = pd; |
610 | db9->mode = mode; | 610 | db9->mode = mode; |
611 | db9->parportno = pp->number; | 611 | db9->parportno = pp->number; |
612 | setup_timer(&db9->timer, db9_timer, (long)db9); | 612 | timer_setup(&db9->timer, db9_timer, 0); |
613 | 613 | ||
614 | for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) { | 614 | for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) { |
615 | 615 | ||
diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index ca734ea97e53..2ffb2e8bdc3b 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c | |||
@@ -743,9 +743,9 @@ static void gc_psx_process_packet(struct gc *gc) | |||
743 | * gc_timer() initiates reads of console pads data. | 743 | * gc_timer() initiates reads of console pads data. |
744 | */ | 744 | */ |
745 | 745 | ||
746 | static void gc_timer(unsigned long private) | 746 | static void gc_timer(struct timer_list *t) |
747 | { | 747 | { |
748 | struct gc *gc = (void *) private; | 748 | struct gc *gc = from_timer(gc, t, timer); |
749 | 749 | ||
750 | /* | 750 | /* |
751 | * N64 pads - must be read first, any read confuses them for 200 us | 751 | * N64 pads - must be read first, any read confuses them for 200 us |
@@ -974,7 +974,7 @@ static void gc_attach(struct parport *pp) | |||
974 | mutex_init(&gc->mutex); | 974 | mutex_init(&gc->mutex); |
975 | gc->pd = pd; | 975 | gc->pd = pd; |
976 | gc->parportno = pp->number; | 976 | gc->parportno = pp->number; |
977 | setup_timer(&gc->timer, gc_timer, (long) gc); | 977 | timer_setup(&gc->timer, gc_timer, 0); |
978 | 978 | ||
979 | for (i = 0; i < n_pads && i < GC_MAX_DEVICES; i++) { | 979 | for (i = 0; i < n_pads && i < GC_MAX_DEVICES; i++) { |
980 | if (!pads[i]) | 980 | if (!pads[i]) |
diff --git a/drivers/input/joystick/turbografx.c b/drivers/input/joystick/turbografx.c index a1fdc75a438d..e2685753e460 100644 --- a/drivers/input/joystick/turbografx.c +++ b/drivers/input/joystick/turbografx.c | |||
@@ -89,9 +89,9 @@ static struct tgfx { | |||
89 | * tgfx_timer() reads and analyzes TurboGraFX joystick data. | 89 | * tgfx_timer() reads and analyzes TurboGraFX joystick data. |
90 | */ | 90 | */ |
91 | 91 | ||
92 | static void tgfx_timer(unsigned long private) | 92 | static void tgfx_timer(struct timer_list *t) |
93 | { | 93 | { |
94 | struct tgfx *tgfx = (void *) private; | 94 | struct tgfx *tgfx = from_timer(tgfx, t, timer); |
95 | struct input_dev *dev; | 95 | struct input_dev *dev; |
96 | int data1, data2, i; | 96 | int data1, data2, i; |
97 | 97 | ||
@@ -200,7 +200,7 @@ static void tgfx_attach(struct parport *pp) | |||
200 | mutex_init(&tgfx->sem); | 200 | mutex_init(&tgfx->sem); |
201 | tgfx->pd = pd; | 201 | tgfx->pd = pd; |
202 | tgfx->parportno = pp->number; | 202 | tgfx->parportno = pp->number; |
203 | setup_timer(&tgfx->timer, tgfx_timer, (long)tgfx); | 203 | timer_setup(&tgfx->timer, tgfx_timer, 0); |
204 | 204 | ||
205 | for (i = 0; i < n_devs; i++) { | 205 | for (i = 0; i < n_devs; i++) { |
206 | if (n_buttons[i] < 1) | 206 | if (n_buttons[i] < 1) |
diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index 466aaa8ba841..83fe2621effe 100644 --- a/drivers/iommu/iova.c +++ b/drivers/iommu/iova.c | |||
@@ -36,7 +36,7 @@ static unsigned long iova_rcache_get(struct iova_domain *iovad, | |||
36 | static void init_iova_rcaches(struct iova_domain *iovad); | 36 | static void init_iova_rcaches(struct iova_domain *iovad); |
37 | static void free_iova_rcaches(struct iova_domain *iovad); | 37 | static void free_iova_rcaches(struct iova_domain *iovad); |
38 | static void fq_destroy_all_entries(struct iova_domain *iovad); | 38 | static void fq_destroy_all_entries(struct iova_domain *iovad); |
39 | static void fq_flush_timeout(unsigned long data); | 39 | static void fq_flush_timeout(struct timer_list *t); |
40 | 40 | ||
41 | void | 41 | void |
42 | init_iova_domain(struct iova_domain *iovad, unsigned long granule, | 42 | init_iova_domain(struct iova_domain *iovad, unsigned long granule, |
@@ -107,7 +107,7 @@ int init_iova_flush_queue(struct iova_domain *iovad, | |||
107 | spin_lock_init(&fq->lock); | 107 | spin_lock_init(&fq->lock); |
108 | } | 108 | } |
109 | 109 | ||
110 | setup_timer(&iovad->fq_timer, fq_flush_timeout, (unsigned long)iovad); | 110 | timer_setup(&iovad->fq_timer, fq_flush_timeout, 0); |
111 | atomic_set(&iovad->fq_timer_on, 0); | 111 | atomic_set(&iovad->fq_timer_on, 0); |
112 | 112 | ||
113 | return 0; | 113 | return 0; |
@@ -519,9 +519,9 @@ static void fq_destroy_all_entries(struct iova_domain *iovad) | |||
519 | } | 519 | } |
520 | } | 520 | } |
521 | 521 | ||
522 | static void fq_flush_timeout(unsigned long data) | 522 | static void fq_flush_timeout(struct timer_list *t) |
523 | { | 523 | { |
524 | struct iova_domain *iovad = (struct iova_domain *)data; | 524 | struct iova_domain *iovad = from_timer(iovad, t, fq_timer); |
525 | int cpu; | 525 | int cpu; |
526 | 526 | ||
527 | atomic_set(&iovad->fq_timer_on, 0); | 527 | atomic_set(&iovad->fq_timer_on, 0); |
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c index 89dd1303a98a..49fef08858c5 100644 --- a/drivers/isdn/capi/capidrv.c +++ b/drivers/isdn/capi/capidrv.c | |||
@@ -2235,9 +2235,9 @@ static void send_listen(capidrv_contr *card) | |||
2235 | send_message(card, &cmdcmsg); | 2235 | send_message(card, &cmdcmsg); |
2236 | } | 2236 | } |
2237 | 2237 | ||
2238 | static void listentimerfunc(unsigned long x) | 2238 | static void listentimerfunc(struct timer_list *t) |
2239 | { | 2239 | { |
2240 | capidrv_contr *card = (capidrv_contr *)x; | 2240 | capidrv_contr *card = from_timer(card, t, listentimer); |
2241 | if (card->state != ST_LISTEN_NONE && card->state != ST_LISTEN_ACTIVE) | 2241 | if (card->state != ST_LISTEN_NONE && card->state != ST_LISTEN_ACTIVE) |
2242 | printk(KERN_ERR "%s: controller dead ??\n", card->name); | 2242 | printk(KERN_ERR "%s: controller dead ??\n", card->name); |
2243 | send_listen(card); | 2243 | send_listen(card); |
@@ -2264,7 +2264,7 @@ static int capidrv_addcontr(u16 contr, struct capi_profile *profp) | |||
2264 | return -1; | 2264 | return -1; |
2265 | } | 2265 | } |
2266 | card->owner = THIS_MODULE; | 2266 | card->owner = THIS_MODULE; |
2267 | setup_timer(&card->listentimer, listentimerfunc, (unsigned long)card); | 2267 | timer_setup(&card->listentimer, listentimerfunc, 0); |
2268 | strcpy(card->name, id); | 2268 | strcpy(card->name, id); |
2269 | card->contrnr = contr; | 2269 | card->contrnr = contr; |
2270 | card->nbchan = profp->nbchannel; | 2270 | card->nbchan = profp->nbchannel; |
diff --git a/drivers/isdn/divert/isdn_divert.c b/drivers/isdn/divert/isdn_divert.c index 6f423bc49d0d..5620fd2c6009 100644 --- a/drivers/isdn/divert/isdn_divert.c +++ b/drivers/isdn/divert/isdn_divert.c | |||
@@ -55,10 +55,10 @@ DEFINE_SPINLOCK(divert_lock); | |||
55 | /***************************/ | 55 | /***************************/ |
56 | /* timer callback function */ | 56 | /* timer callback function */ |
57 | /***************************/ | 57 | /***************************/ |
58 | static void deflect_timer_expire(ulong arg) | 58 | static void deflect_timer_expire(struct timer_list *t) |
59 | { | 59 | { |
60 | unsigned long flags; | 60 | unsigned long flags; |
61 | struct call_struc *cs = (struct call_struc *) arg; | 61 | struct call_struc *cs = from_timer(cs, t, timer); |
62 | 62 | ||
63 | spin_lock_irqsave(&divert_lock, flags); | 63 | spin_lock_irqsave(&divert_lock, flags); |
64 | del_timer(&cs->timer); /* delete active timer */ | 64 | del_timer(&cs->timer); /* delete active timer */ |
@@ -157,7 +157,7 @@ int cf_command(int drvid, int mode, | |||
157 | /* allocate mem for information struct */ | 157 | /* allocate mem for information struct */ |
158 | if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) | 158 | if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) |
159 | return (-ENOMEM); /* no memory */ | 159 | return (-ENOMEM); /* no memory */ |
160 | setup_timer(&cs->timer, deflect_timer_expire, (ulong)cs); | 160 | timer_setup(&cs->timer, deflect_timer_expire, 0); |
161 | cs->info[0] = '\0'; | 161 | cs->info[0] = '\0'; |
162 | cs->ics.driver = drvid; | 162 | cs->ics.driver = drvid; |
163 | cs->ics.command = ISDN_CMD_PROT_IO; /* protocol specific io */ | 163 | cs->ics.command = ISDN_CMD_PROT_IO; /* protocol specific io */ |
@@ -450,8 +450,7 @@ static int isdn_divert_icall(isdn_ctrl *ic) | |||
450 | return (0); /* no external deflection needed */ | 450 | return (0); /* no external deflection needed */ |
451 | if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) | 451 | if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) |
452 | return (0); /* no memory */ | 452 | return (0); /* no memory */ |
453 | setup_timer(&cs->timer, deflect_timer_expire, | 453 | timer_setup(&cs->timer, deflect_timer_expire, 0); |
454 | (ulong)cs); | ||
455 | cs->info[0] = '\0'; | 454 | cs->info[0] = '\0'; |
456 | 455 | ||
457 | cs->ics = *ic; /* copy incoming data */ | 456 | cs->ics = *ic; /* copy incoming data */ |
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c index c61049585cbd..0033d74a7291 100644 --- a/drivers/isdn/hardware/eicon/divasi.c +++ b/drivers/isdn/hardware/eicon/divasi.c | |||
@@ -78,7 +78,7 @@ static unsigned int um_idi_poll(struct file *file, poll_table *wait); | |||
78 | static int um_idi_open(struct inode *inode, struct file *file); | 78 | static int um_idi_open(struct inode *inode, struct file *file); |
79 | static int um_idi_release(struct inode *inode, struct file *file); | 79 | static int um_idi_release(struct inode *inode, struct file *file); |
80 | static int remove_entity(void *entity); | 80 | static int remove_entity(void *entity); |
81 | static void diva_um_timer_function(unsigned long data); | 81 | static void diva_um_timer_function(struct timer_list *t); |
82 | 82 | ||
83 | /* | 83 | /* |
84 | * proc entry | 84 | * proc entry |
@@ -300,8 +300,7 @@ static int um_idi_open_adapter(struct file *file, int adapter_nr) | |||
300 | p_os = (diva_um_idi_os_context_t *) diva_um_id_get_os_context(e); | 300 | p_os = (diva_um_idi_os_context_t *) diva_um_id_get_os_context(e); |
301 | init_waitqueue_head(&p_os->read_wait); | 301 | init_waitqueue_head(&p_os->read_wait); |
302 | init_waitqueue_head(&p_os->close_wait); | 302 | init_waitqueue_head(&p_os->close_wait); |
303 | setup_timer(&p_os->diva_timer_id, (void *)diva_um_timer_function, | 303 | timer_setup(&p_os->diva_timer_id, diva_um_timer_function, 0); |
304 | (unsigned long)p_os); | ||
305 | p_os->aborted = 0; | 304 | p_os->aborted = 0; |
306 | p_os->adapter_nr = adapter_nr; | 305 | p_os->adapter_nr = adapter_nr; |
307 | return (1); | 306 | return (1); |
@@ -457,9 +456,9 @@ void diva_os_wakeup_close(void *os_context) | |||
457 | } | 456 | } |
458 | 457 | ||
459 | static | 458 | static |
460 | void diva_um_timer_function(unsigned long data) | 459 | void diva_um_timer_function(struct timer_list *t) |
461 | { | 460 | { |
462 | diva_um_idi_os_context_t *p_os = (diva_um_idi_os_context_t *) data; | 461 | diva_um_idi_os_context_t *p_os = from_timer(p_os, t, diva_timer_id); |
463 | 462 | ||
464 | p_os->aborted = 1; | 463 | p_os->aborted = 1; |
465 | wake_up_interruptible(&p_os->read_wait); | 464 | wake_up_interruptible(&p_os->read_wait); |
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index 3cf07b8ced1c..4d85645c87f7 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -2855,7 +2855,7 @@ irq_notforus: | |||
2855 | */ | 2855 | */ |
2856 | 2856 | ||
2857 | static void | 2857 | static void |
2858 | hfcmulti_dbusy_timer(struct hfc_multi *hc) | 2858 | hfcmulti_dbusy_timer(struct timer_list *t) |
2859 | { | 2859 | { |
2860 | } | 2860 | } |
2861 | 2861 | ||
@@ -3877,8 +3877,7 @@ hfcmulti_initmode(struct dchannel *dch) | |||
3877 | if (hc->dnum[pt]) { | 3877 | if (hc->dnum[pt]) { |
3878 | mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol, | 3878 | mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol, |
3879 | -1, 0, -1, 0); | 3879 | -1, 0, -1, 0); |
3880 | setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer, | 3880 | timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0); |
3881 | (long)dch); | ||
3882 | } | 3881 | } |
3883 | for (i = 1; i <= 31; i++) { | 3882 | for (i = 1; i <= 31; i++) { |
3884 | if (!((1 << i) & hc->bmask[pt])) /* skip unused chan */ | 3883 | if (!((1 << i) & hc->bmask[pt])) /* skip unused chan */ |
@@ -3984,8 +3983,7 @@ hfcmulti_initmode(struct dchannel *dch) | |||
3984 | hc->chan[i].slot_rx = -1; | 3983 | hc->chan[i].slot_rx = -1; |
3985 | hc->chan[i].conf = -1; | 3984 | hc->chan[i].conf = -1; |
3986 | mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0); | 3985 | mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0); |
3987 | setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer, | 3986 | timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0); |
3988 | (long)dch); | ||
3989 | hc->chan[i - 2].slot_tx = -1; | 3987 | hc->chan[i - 2].slot_tx = -1; |
3990 | hc->chan[i - 2].slot_rx = -1; | 3988 | hc->chan[i - 2].slot_rx = -1; |
3991 | hc->chan[i - 2].conf = -1; | 3989 | hc->chan[i - 2].conf = -1; |
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index e4ebbee863a1..ba3fe14bbe00 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
@@ -1241,7 +1241,7 @@ hfcpci_int(int intno, void *dev_id) | |||
1241 | * timer callback for D-chan busy resolution. Currently no function | 1241 | * timer callback for D-chan busy resolution. Currently no function |
1242 | */ | 1242 | */ |
1243 | static void | 1243 | static void |
1244 | hfcpci_dbusy_timer(struct hfc_pci *hc) | 1244 | hfcpci_dbusy_timer(struct timer_list *t) |
1245 | { | 1245 | { |
1246 | } | 1246 | } |
1247 | 1247 | ||
@@ -1717,8 +1717,7 @@ static void | |||
1717 | inithfcpci(struct hfc_pci *hc) | 1717 | inithfcpci(struct hfc_pci *hc) |
1718 | { | 1718 | { |
1719 | printk(KERN_DEBUG "inithfcpci: entered\n"); | 1719 | printk(KERN_DEBUG "inithfcpci: entered\n"); |
1720 | setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer, | 1720 | timer_setup(&hc->dch.timer, hfcpci_dbusy_timer, 0); |
1721 | (long)&hc->dch); | ||
1722 | hc->chanlimit = 2; | 1721 | hc->chanlimit = 2; |
1723 | mode_hfcpci(&hc->bch[0], 1, -1); | 1722 | mode_hfcpci(&hc->bch[0], 1, -1); |
1724 | mode_hfcpci(&hc->bch[1], 2, -1); | 1723 | mode_hfcpci(&hc->bch[1], 2, -1); |
diff --git a/drivers/isdn/hardware/mISDN/mISDNisar.c b/drivers/isdn/hardware/mISDN/mISDNisar.c index 5b078591b6ee..b791688d0228 100644 --- a/drivers/isdn/hardware/mISDN/mISDNisar.c +++ b/drivers/isdn/hardware/mISDN/mISDNisar.c | |||
@@ -1146,9 +1146,9 @@ mISDNisar_irq(struct isar_hw *isar) | |||
1146 | EXPORT_SYMBOL(mISDNisar_irq); | 1146 | EXPORT_SYMBOL(mISDNisar_irq); |
1147 | 1147 | ||
1148 | static void | 1148 | static void |
1149 | ftimer_handler(unsigned long data) | 1149 | ftimer_handler(struct timer_list *t) |
1150 | { | 1150 | { |
1151 | struct isar_ch *ch = (struct isar_ch *)data; | 1151 | struct isar_ch *ch = from_timer(ch, t, ftimer); |
1152 | 1152 | ||
1153 | pr_debug("%s: ftimer flags %lx\n", ch->is->name, ch->bch.Flags); | 1153 | pr_debug("%s: ftimer flags %lx\n", ch->is->name, ch->bch.Flags); |
1154 | test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags); | 1154 | test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags); |
@@ -1635,11 +1635,9 @@ init_isar(struct isar_hw *isar) | |||
1635 | } | 1635 | } |
1636 | if (isar->version != 1) | 1636 | if (isar->version != 1) |
1637 | return -EINVAL; | 1637 | return -EINVAL; |
1638 | setup_timer(&isar->ch[0].ftimer, &ftimer_handler, | 1638 | timer_setup(&isar->ch[0].ftimer, ftimer_handler, 0); |
1639 | (long)&isar->ch[0]); | ||
1640 | test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags); | 1639 | test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags); |
1641 | setup_timer(&isar->ch[1].ftimer, &ftimer_handler, | 1640 | timer_setup(&isar->ch[1].ftimer, ftimer_handler, 0); |
1642 | (long)&isar->ch[1]); | ||
1643 | test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags); | 1641 | test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags); |
1644 | return 0; | 1642 | return 0; |
1645 | } | 1643 | } |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 3fa2f7b31131..8b03d618185e 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -231,7 +231,7 @@ static int isdn_timer_cnt2 = 0; | |||
231 | static int isdn_timer_cnt3 = 0; | 231 | static int isdn_timer_cnt3 = 0; |
232 | 232 | ||
233 | static void | 233 | static void |
234 | isdn_timer_funct(ulong dummy) | 234 | isdn_timer_funct(struct timer_list *unused) |
235 | { | 235 | { |
236 | int tf = dev->tflags; | 236 | int tf = dev->tflags; |
237 | if (tf & ISDN_TIMER_FAST) { | 237 | if (tf & ISDN_TIMER_FAST) { |
@@ -2294,7 +2294,7 @@ static int __init isdn_init(void) | |||
2294 | printk(KERN_WARNING "isdn: Could not allocate device-struct.\n"); | 2294 | printk(KERN_WARNING "isdn: Could not allocate device-struct.\n"); |
2295 | return -EIO; | 2295 | return -EIO; |
2296 | } | 2296 | } |
2297 | setup_timer(&dev->timer, isdn_timer_funct, 0UL); | 2297 | timer_setup(&dev->timer, isdn_timer_funct, 0); |
2298 | spin_lock_init(&dev->lock); | 2298 | spin_lock_init(&dev->lock); |
2299 | spin_lock_init(&dev->timerlock); | 2299 | spin_lock_init(&dev->timerlock); |
2300 | #ifdef MODULE | 2300 | #ifdef MODULE |
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index 59d40160cab2..c138f66f2659 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -1509,9 +1509,9 @@ static int isdn_net_ioctl(struct net_device *dev, | |||
1509 | 1509 | ||
1510 | /* called via cisco_timer.function */ | 1510 | /* called via cisco_timer.function */ |
1511 | static void | 1511 | static void |
1512 | isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data) | 1512 | isdn_net_ciscohdlck_slarp_send_keepalive(struct timer_list *t) |
1513 | { | 1513 | { |
1514 | isdn_net_local *lp = (isdn_net_local *) data; | 1514 | isdn_net_local *lp = from_timer(lp, t, cisco_timer); |
1515 | struct sk_buff *skb; | 1515 | struct sk_buff *skb; |
1516 | unsigned char *p; | 1516 | unsigned char *p; |
1517 | unsigned long last_cisco_myseq = lp->cisco_myseq; | 1517 | unsigned long last_cisco_myseq = lp->cisco_myseq; |
@@ -1615,9 +1615,8 @@ isdn_net_ciscohdlck_connected(isdn_net_local *lp) | |||
1615 | /* send slarp request because interface/seq.no.s reset */ | 1615 | /* send slarp request because interface/seq.no.s reset */ |
1616 | isdn_net_ciscohdlck_slarp_send_request(lp); | 1616 | isdn_net_ciscohdlck_slarp_send_request(lp); |
1617 | 1617 | ||
1618 | setup_timer(&lp->cisco_timer, | 1618 | timer_setup(&lp->cisco_timer, |
1619 | isdn_net_ciscohdlck_slarp_send_keepalive, | 1619 | isdn_net_ciscohdlck_slarp_send_keepalive, 0); |
1620 | (unsigned long)lp); | ||
1621 | lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ; | 1620 | lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ; |
1622 | add_timer(&lp->cisco_timer); | 1621 | add_timer(&lp->cisco_timer); |
1623 | } | 1622 | } |
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index cd2b3c69771a..e07aefb9151d 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c | |||
@@ -50,7 +50,7 @@ static struct ippp_ccp_reset *isdn_ppp_ccp_reset_alloc(struct ippp_struct *is); | |||
50 | static void isdn_ppp_ccp_reset_free(struct ippp_struct *is); | 50 | static void isdn_ppp_ccp_reset_free(struct ippp_struct *is); |
51 | static void isdn_ppp_ccp_reset_free_state(struct ippp_struct *is, | 51 | static void isdn_ppp_ccp_reset_free_state(struct ippp_struct *is, |
52 | unsigned char id); | 52 | unsigned char id); |
53 | static void isdn_ppp_ccp_timer_callback(unsigned long closure); | 53 | static void isdn_ppp_ccp_timer_callback(struct timer_list *t); |
54 | static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_struct *is, | 54 | static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_struct *is, |
55 | unsigned char id); | 55 | unsigned char id); |
56 | static void isdn_ppp_ccp_reset_trans(struct ippp_struct *is, | 56 | static void isdn_ppp_ccp_reset_trans(struct ippp_struct *is, |
@@ -2327,10 +2327,10 @@ static void isdn_ppp_ccp_reset_free_state(struct ippp_struct *is, | |||
2327 | 2327 | ||
2328 | /* The timer callback function which is called when a ResetReq has timed out, | 2328 | /* The timer callback function which is called when a ResetReq has timed out, |
2329 | aka has never been answered by a ResetAck */ | 2329 | aka has never been answered by a ResetAck */ |
2330 | static void isdn_ppp_ccp_timer_callback(unsigned long closure) | 2330 | static void isdn_ppp_ccp_timer_callback(struct timer_list *t) |
2331 | { | 2331 | { |
2332 | struct ippp_ccp_reset_state *rs = | 2332 | struct ippp_ccp_reset_state *rs = |
2333 | (struct ippp_ccp_reset_state *)closure; | 2333 | from_timer(rs, t, timer); |
2334 | 2334 | ||
2335 | if (!rs) { | 2335 | if (!rs) { |
2336 | printk(KERN_ERR "ippp_ccp: timer cb with zero closure.\n"); | 2336 | printk(KERN_ERR "ippp_ccp: timer cb with zero closure.\n"); |
@@ -2376,8 +2376,7 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s | |||
2376 | rs->state = CCPResetIdle; | 2376 | rs->state = CCPResetIdle; |
2377 | rs->is = is; | 2377 | rs->is = is; |
2378 | rs->id = id; | 2378 | rs->id = id; |
2379 | setup_timer(&rs->timer, isdn_ppp_ccp_timer_callback, | 2379 | timer_setup(&rs->timer, isdn_ppp_ccp_timer_callback, 0); |
2380 | (unsigned long)rs); | ||
2381 | is->reset->rs[id] = rs; | 2380 | is->reset->rs[id] = rs; |
2382 | } | 2381 | } |
2383 | return rs; | 2382 | return rs; |
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index d30130c8d0f3..960f26348bb5 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c | |||
@@ -541,9 +541,9 @@ isdn_tty_senddown(modem_info *info) | |||
541 | * into the tty's buffer. | 541 | * into the tty's buffer. |
542 | */ | 542 | */ |
543 | static void | 543 | static void |
544 | isdn_tty_modem_do_ncarrier(unsigned long data) | 544 | isdn_tty_modem_do_ncarrier(struct timer_list *t) |
545 | { | 545 | { |
546 | modem_info *info = (modem_info *) data; | 546 | modem_info *info = from_timer(info, t, nc_timer); |
547 | isdn_tty_modem_result(RESULT_NO_CARRIER, info); | 547 | isdn_tty_modem_result(RESULT_NO_CARRIER, info); |
548 | } | 548 | } |
549 | 549 | ||
@@ -1812,8 +1812,7 @@ isdn_tty_modem_init(void) | |||
1812 | info->isdn_channel = -1; | 1812 | info->isdn_channel = -1; |
1813 | info->drv_index = -1; | 1813 | info->drv_index = -1; |
1814 | info->xmit_size = ISDN_SERIAL_XMIT_SIZE; | 1814 | info->xmit_size = ISDN_SERIAL_XMIT_SIZE; |
1815 | setup_timer(&info->nc_timer, isdn_tty_modem_do_ncarrier, | 1815 | timer_setup(&info->nc_timer, isdn_tty_modem_do_ncarrier, 0); |
1816 | (unsigned long)info); | ||
1817 | skb_queue_head_init(&info->xmit_queue); | 1816 | skb_queue_head_init(&info->xmit_queue); |
1818 | #ifdef CONFIG_ISDN_AUDIO | 1817 | #ifdef CONFIG_ISDN_AUDIO |
1819 | skb_queue_head_init(&info->dtmf_queue); | 1818 | skb_queue_head_init(&info->dtmf_queue); |
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index e179b33d3775..bc68dbbcaec1 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
@@ -145,9 +145,9 @@ void s5p_mfc_cleanup_queue(struct list_head *lh, struct vb2_queue *vq) | |||
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | static void s5p_mfc_watchdog(unsigned long arg) | 148 | static void s5p_mfc_watchdog(struct timer_list *t) |
149 | { | 149 | { |
150 | struct s5p_mfc_dev *dev = (struct s5p_mfc_dev *)arg; | 150 | struct s5p_mfc_dev *dev = from_timer(dev, t, watchdog_timer); |
151 | 151 | ||
152 | if (test_bit(0, &dev->hw_lock)) | 152 | if (test_bit(0, &dev->hw_lock)) |
153 | atomic_inc(&dev->watchdog_cnt); | 153 | atomic_inc(&dev->watchdog_cnt); |
@@ -1314,8 +1314,7 @@ static int s5p_mfc_probe(struct platform_device *pdev) | |||
1314 | dev->hw_lock = 0; | 1314 | dev->hw_lock = 0; |
1315 | INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker); | 1315 | INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker); |
1316 | atomic_set(&dev->watchdog_cnt, 0); | 1316 | atomic_set(&dev->watchdog_cnt, 0); |
1317 | setup_timer(&dev->watchdog_timer, s5p_mfc_watchdog, | 1317 | timer_setup(&dev->watchdog_timer, s5p_mfc_watchdog, 0); |
1318 | (unsigned long)dev); | ||
1319 | 1318 | ||
1320 | ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); | 1319 | ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); |
1321 | if (ret) | 1320 | if (ret) |
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c index 59280ac31937..a0acee7671b1 100644 --- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | |||
@@ -61,9 +61,9 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei); | |||
61 | 61 | ||
62 | #define FIFO_LEN 1024 | 62 | #define FIFO_LEN 1024 |
63 | 63 | ||
64 | static void c8sectpfe_timer_interrupt(unsigned long ac8sectpfei) | 64 | static void c8sectpfe_timer_interrupt(struct timer_list *t) |
65 | { | 65 | { |
66 | struct c8sectpfei *fei = (struct c8sectpfei *)ac8sectpfei; | 66 | struct c8sectpfei *fei = from_timer(fei, t, timer); |
67 | struct channel_info *channel; | 67 | struct channel_info *channel; |
68 | int chan_num; | 68 | int chan_num; |
69 | 69 | ||
@@ -865,8 +865,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) | |||
865 | } | 865 | } |
866 | 866 | ||
867 | /* Setup timer interrupt */ | 867 | /* Setup timer interrupt */ |
868 | setup_timer(&fei->timer, c8sectpfe_timer_interrupt, | 868 | timer_setup(&fei->timer, c8sectpfe_timer_interrupt, 0); |
869 | (unsigned long)fei); | ||
870 | 869 | ||
871 | mutex_init(&fei->lock); | 870 | mutex_init(&fei->lock); |
872 | 871 | ||
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index b01fba020d5f..7bf9fa2f8534 100644 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c | |||
@@ -388,9 +388,9 @@ static void device_run(void *priv) | |||
388 | schedule_irq(dev, ctx->transtime); | 388 | schedule_irq(dev, ctx->transtime); |
389 | } | 389 | } |
390 | 390 | ||
391 | static void device_isr(unsigned long priv) | 391 | static void device_isr(struct timer_list *t) |
392 | { | 392 | { |
393 | struct vim2m_dev *vim2m_dev = (struct vim2m_dev *)priv; | 393 | struct vim2m_dev *vim2m_dev = from_timer(vim2m_dev, t, timer); |
394 | struct vim2m_ctx *curr_ctx; | 394 | struct vim2m_ctx *curr_ctx; |
395 | struct vb2_v4l2_buffer *src_vb, *dst_vb; | 395 | struct vb2_v4l2_buffer *src_vb, *dst_vb; |
396 | unsigned long flags; | 396 | unsigned long flags; |
@@ -1024,7 +1024,7 @@ static int vim2m_probe(struct platform_device *pdev) | |||
1024 | v4l2_info(&dev->v4l2_dev, | 1024 | v4l2_info(&dev->v4l2_dev, |
1025 | "Device registered as /dev/video%d\n", vfd->num); | 1025 | "Device registered as /dev/video%d\n", vfd->num); |
1026 | 1026 | ||
1027 | setup_timer(&dev->timer, device_isr, (long)dev); | 1027 | timer_setup(&dev->timer, device_isr, 0); |
1028 | platform_set_drvdata(pdev, dev); | 1028 | platform_set_drvdata(pdev, dev); |
1029 | 1029 | ||
1030 | dev->m2m_dev = v4l2_m2m_init(&m2m_ops); | 1030 | dev->m2m_dev = v4l2_m2m_init(&m2m_ops); |
diff --git a/drivers/media/usb/au0828/au0828-dvb.c b/drivers/media/usb/au0828/au0828-dvb.c index d701c04b3783..d9093a3c57c5 100644 --- a/drivers/media/usb/au0828/au0828-dvb.c +++ b/drivers/media/usb/au0828/au0828-dvb.c | |||
@@ -105,9 +105,9 @@ static struct tda18271_config hauppauge_woodbury_tunerconfig = { | |||
105 | 105 | ||
106 | static void au0828_restart_dvb_streaming(struct work_struct *work); | 106 | static void au0828_restart_dvb_streaming(struct work_struct *work); |
107 | 107 | ||
108 | static void au0828_bulk_timeout(unsigned long data) | 108 | static void au0828_bulk_timeout(struct timer_list *t) |
109 | { | 109 | { |
110 | struct au0828_dev *dev = (struct au0828_dev *) data; | 110 | struct au0828_dev *dev = from_timer(dev, t, bulk_timeout); |
111 | 111 | ||
112 | dprintk(1, "%s called\n", __func__); | 112 | dprintk(1, "%s called\n", __func__); |
113 | dev->bulk_timeout_running = 0; | 113 | dev->bulk_timeout_running = 0; |
@@ -648,8 +648,7 @@ int au0828_dvb_register(struct au0828_dev *dev) | |||
648 | return ret; | 648 | return ret; |
649 | } | 649 | } |
650 | 650 | ||
651 | setup_timer(&dev->bulk_timeout, au0828_bulk_timeout, | 651 | timer_setup(&dev->bulk_timeout, au0828_bulk_timeout, 0); |
652 | (unsigned long)dev); | ||
653 | 652 | ||
654 | return 0; | 653 | return 0; |
655 | } | 654 | } |
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 654f67c25863..a240153821e0 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c | |||
@@ -954,9 +954,9 @@ int au0828_analog_unregister(struct au0828_dev *dev) | |||
954 | /* This function ensures that video frames continue to be delivered even if | 954 | /* This function ensures that video frames continue to be delivered even if |
955 | the ITU-656 input isn't receiving any data (thereby preventing applications | 955 | the ITU-656 input isn't receiving any data (thereby preventing applications |
956 | such as tvtime from hanging) */ | 956 | such as tvtime from hanging) */ |
957 | static void au0828_vid_buffer_timeout(unsigned long data) | 957 | static void au0828_vid_buffer_timeout(struct timer_list *t) |
958 | { | 958 | { |
959 | struct au0828_dev *dev = (struct au0828_dev *) data; | 959 | struct au0828_dev *dev = from_timer(dev, t, vid_timeout); |
960 | struct au0828_dmaqueue *dma_q = &dev->vidq; | 960 | struct au0828_dmaqueue *dma_q = &dev->vidq; |
961 | struct au0828_buffer *buf; | 961 | struct au0828_buffer *buf; |
962 | unsigned char *vid_data; | 962 | unsigned char *vid_data; |
@@ -978,9 +978,9 @@ static void au0828_vid_buffer_timeout(unsigned long data) | |||
978 | spin_unlock_irqrestore(&dev->slock, flags); | 978 | spin_unlock_irqrestore(&dev->slock, flags); |
979 | } | 979 | } |
980 | 980 | ||
981 | static void au0828_vbi_buffer_timeout(unsigned long data) | 981 | static void au0828_vbi_buffer_timeout(struct timer_list *t) |
982 | { | 982 | { |
983 | struct au0828_dev *dev = (struct au0828_dev *) data; | 983 | struct au0828_dev *dev = from_timer(dev, t, vbi_timeout); |
984 | struct au0828_dmaqueue *dma_q = &dev->vbiq; | 984 | struct au0828_dmaqueue *dma_q = &dev->vbiq; |
985 | struct au0828_buffer *buf; | 985 | struct au0828_buffer *buf; |
986 | unsigned char *vbi_data; | 986 | unsigned char *vbi_data; |
@@ -1953,10 +1953,8 @@ int au0828_analog_register(struct au0828_dev *dev, | |||
1953 | INIT_LIST_HEAD(&dev->vidq.active); | 1953 | INIT_LIST_HEAD(&dev->vidq.active); |
1954 | INIT_LIST_HEAD(&dev->vbiq.active); | 1954 | INIT_LIST_HEAD(&dev->vbiq.active); |
1955 | 1955 | ||
1956 | setup_timer(&dev->vid_timeout, au0828_vid_buffer_timeout, | 1956 | timer_setup(&dev->vid_timeout, au0828_vid_buffer_timeout, 0); |
1957 | (unsigned long)dev); | 1957 | timer_setup(&dev->vbi_timeout, au0828_vbi_buffer_timeout, 0); |
1958 | setup_timer(&dev->vbi_timeout, au0828_vbi_buffer_timeout, | ||
1959 | (unsigned long)dev); | ||
1960 | 1958 | ||
1961 | dev->width = NTSC_STD_W; | 1959 | dev->width = NTSC_STD_W; |
1962 | dev->height = NTSC_STD_H; | 1960 | dev->height = NTSC_STD_H; |
diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c index 22de7f5ed032..57b13dfbd21e 100644 --- a/drivers/memstick/core/ms_block.c +++ b/drivers/memstick/core/ms_block.c | |||
@@ -1492,9 +1492,9 @@ static int msb_ftl_scan(struct msb_data *msb) | |||
1492 | return 0; | 1492 | return 0; |
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | static void msb_cache_flush_timer(unsigned long data) | 1495 | static void msb_cache_flush_timer(struct timer_list *t) |
1496 | { | 1496 | { |
1497 | struct msb_data *msb = (struct msb_data *)data; | 1497 | struct msb_data *msb = from_timer(msb, t, cache_flush_timer); |
1498 | msb->need_flush_cache = true; | 1498 | msb->need_flush_cache = true; |
1499 | queue_work(msb->io_queue, &msb->io_work); | 1499 | queue_work(msb->io_queue, &msb->io_work); |
1500 | } | 1500 | } |
@@ -1514,8 +1514,7 @@ static void msb_cache_discard(struct msb_data *msb) | |||
1514 | 1514 | ||
1515 | static int msb_cache_init(struct msb_data *msb) | 1515 | static int msb_cache_init(struct msb_data *msb) |
1516 | { | 1516 | { |
1517 | setup_timer(&msb->cache_flush_timer, msb_cache_flush_timer, | 1517 | timer_setup(&msb->cache_flush_timer, msb_cache_flush_timer, 0); |
1518 | (unsigned long)msb); | ||
1519 | 1518 | ||
1520 | if (!msb->cache) | 1519 | if (!msb->cache) |
1521 | msb->cache = kzalloc(msb->block_size, GFP_KERNEL); | 1520 | msb->cache = kzalloc(msb->block_size, GFP_KERNEL); |
diff --git a/drivers/mfd/rtsx_usb.c b/drivers/mfd/rtsx_usb.c index 691dab791f7a..59d61b04c197 100644 --- a/drivers/mfd/rtsx_usb.c +++ b/drivers/mfd/rtsx_usb.c | |||
@@ -40,9 +40,9 @@ static const struct mfd_cell rtsx_usb_cells[] = { | |||
40 | }, | 40 | }, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static void rtsx_usb_sg_timed_out(unsigned long data) | 43 | static void rtsx_usb_sg_timed_out(struct timer_list *t) |
44 | { | 44 | { |
45 | struct rtsx_ucr *ucr = (struct rtsx_ucr *)data; | 45 | struct rtsx_ucr *ucr = from_timer(ucr, t, sg_timer); |
46 | 46 | ||
47 | dev_dbg(&ucr->pusb_intf->dev, "%s: sg transfer timed out", __func__); | 47 | dev_dbg(&ucr->pusb_intf->dev, "%s: sg transfer timed out", __func__); |
48 | usb_sg_cancel(&ucr->current_sg); | 48 | usb_sg_cancel(&ucr->current_sg); |
@@ -663,7 +663,7 @@ static int rtsx_usb_probe(struct usb_interface *intf, | |||
663 | goto out_init_fail; | 663 | goto out_init_fail; |
664 | 664 | ||
665 | /* initialize USB SG transfer timer */ | 665 | /* initialize USB SG transfer timer */ |
666 | setup_timer(&ucr->sg_timer, rtsx_usb_sg_timed_out, (unsigned long) ucr); | 666 | timer_setup(&ucr->sg_timer, rtsx_usb_sg_timed_out, 0); |
667 | 667 | ||
668 | ret = mfd_add_hotplug_devices(&intf->dev, rtsx_usb_cells, | 668 | ret = mfd_add_hotplug_devices(&intf->dev, rtsx_usb_cells, |
669 | ARRAY_SIZE(rtsx_usb_cells)); | 669 | ARRAY_SIZE(rtsx_usb_cells)); |
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 35a9e4fd1a9f..64b03d6eaf18 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -160,9 +160,9 @@ out: | |||
160 | return err; | 160 | return err; |
161 | } | 161 | } |
162 | 162 | ||
163 | static void mmc_retune_timer(unsigned long data) | 163 | static void mmc_retune_timer(struct timer_list *t) |
164 | { | 164 | { |
165 | struct mmc_host *host = (struct mmc_host *)data; | 165 | struct mmc_host *host = from_timer(host, t, retune_timer); |
166 | 166 | ||
167 | mmc_retune_needed(host); | 167 | mmc_retune_needed(host); |
168 | } | 168 | } |
@@ -389,7 +389,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
389 | init_waitqueue_head(&host->wq); | 389 | init_waitqueue_head(&host->wq); |
390 | INIT_DELAYED_WORK(&host->detect, mmc_rescan); | 390 | INIT_DELAYED_WORK(&host->detect, mmc_rescan); |
391 | INIT_DELAYED_WORK(&host->sdio_irq_work, sdio_irq_work); | 391 | INIT_DELAYED_WORK(&host->sdio_irq_work, sdio_irq_work); |
392 | setup_timer(&host->retune_timer, mmc_retune_timer, (unsigned long)host); | 392 | timer_setup(&host->retune_timer, mmc_retune_timer, 0); |
393 | 393 | ||
394 | /* | 394 | /* |
395 | * By default, hosts do not support SGIO or large requests. | 395 | * By default, hosts do not support SGIO or large requests. |
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c index 3692dd547879..4237c7cebf02 100644 --- a/drivers/mtd/sm_ftl.c +++ b/drivers/mtd/sm_ftl.c | |||
@@ -989,9 +989,9 @@ restart: | |||
989 | 989 | ||
990 | 990 | ||
991 | /* flush timer, runs a second after last write */ | 991 | /* flush timer, runs a second after last write */ |
992 | static void sm_cache_flush_timer(unsigned long data) | 992 | static void sm_cache_flush_timer(struct timer_list *t) |
993 | { | 993 | { |
994 | struct sm_ftl *ftl = (struct sm_ftl *)data; | 994 | struct sm_ftl *ftl = from_timer(ftl, t, timer); |
995 | queue_work(cache_flush_workqueue, &ftl->flush_work); | 995 | queue_work(cache_flush_workqueue, &ftl->flush_work); |
996 | } | 996 | } |
997 | 997 | ||
@@ -1139,7 +1139,7 @@ static void sm_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd) | |||
1139 | 1139 | ||
1140 | 1140 | ||
1141 | mutex_init(&ftl->mutex); | 1141 | mutex_init(&ftl->mutex); |
1142 | setup_timer(&ftl->timer, sm_cache_flush_timer, (unsigned long)ftl); | 1142 | timer_setup(&ftl->timer, sm_cache_flush_timer, 0); |
1143 | INIT_WORK(&ftl->flush_work, sm_cache_flush_work); | 1143 | INIT_WORK(&ftl->flush_work, sm_cache_flush_work); |
1144 | init_completion(&ftl->erase_completion); | 1144 | init_completion(&ftl->erase_completion); |
1145 | 1145 | ||
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c index fed75e75207a..b8029ea03307 100644 --- a/drivers/net/caif/caif_hsi.c +++ b/drivers/net/caif/caif_hsi.c | |||
@@ -66,9 +66,9 @@ static const struct cfhsi_config hsi_default_config = { | |||
66 | 66 | ||
67 | static LIST_HEAD(cfhsi_list); | 67 | static LIST_HEAD(cfhsi_list); |
68 | 68 | ||
69 | static void cfhsi_inactivity_tout(unsigned long arg) | 69 | static void cfhsi_inactivity_tout(struct timer_list *t) |
70 | { | 70 | { |
71 | struct cfhsi *cfhsi = (struct cfhsi *)arg; | 71 | struct cfhsi *cfhsi = from_timer(cfhsi, t, inactivity_timer); |
72 | 72 | ||
73 | netdev_dbg(cfhsi->ndev, "%s.\n", | 73 | netdev_dbg(cfhsi->ndev, "%s.\n", |
74 | __func__); | 74 | __func__); |
@@ -737,9 +737,9 @@ out_of_sync: | |||
737 | schedule_work(&cfhsi->out_of_sync_work); | 737 | schedule_work(&cfhsi->out_of_sync_work); |
738 | } | 738 | } |
739 | 739 | ||
740 | static void cfhsi_rx_slowpath(unsigned long arg) | 740 | static void cfhsi_rx_slowpath(struct timer_list *t) |
741 | { | 741 | { |
742 | struct cfhsi *cfhsi = (struct cfhsi *)arg; | 742 | struct cfhsi *cfhsi = from_timer(cfhsi, t, rx_slowpath_timer); |
743 | 743 | ||
744 | netdev_dbg(cfhsi->ndev, "%s.\n", | 744 | netdev_dbg(cfhsi->ndev, "%s.\n", |
745 | __func__); | 745 | __func__); |
@@ -997,9 +997,9 @@ static void cfhsi_wake_down_cb(struct cfhsi_cb_ops *cb_ops) | |||
997 | wake_up_interruptible(&cfhsi->wake_down_wait); | 997 | wake_up_interruptible(&cfhsi->wake_down_wait); |
998 | } | 998 | } |
999 | 999 | ||
1000 | static void cfhsi_aggregation_tout(unsigned long arg) | 1000 | static void cfhsi_aggregation_tout(struct timer_list *t) |
1001 | { | 1001 | { |
1002 | struct cfhsi *cfhsi = (struct cfhsi *)arg; | 1002 | struct cfhsi *cfhsi = from_timer(cfhsi, t, aggregation_timer); |
1003 | 1003 | ||
1004 | netdev_dbg(cfhsi->ndev, "%s.\n", | 1004 | netdev_dbg(cfhsi->ndev, "%s.\n", |
1005 | __func__); | 1005 | __func__); |
@@ -1211,14 +1211,11 @@ static int cfhsi_open(struct net_device *ndev) | |||
1211 | init_waitqueue_head(&cfhsi->flush_fifo_wait); | 1211 | init_waitqueue_head(&cfhsi->flush_fifo_wait); |
1212 | 1212 | ||
1213 | /* Setup the inactivity timer. */ | 1213 | /* Setup the inactivity timer. */ |
1214 | setup_timer(&cfhsi->inactivity_timer, cfhsi_inactivity_tout, | 1214 | timer_setup(&cfhsi->inactivity_timer, cfhsi_inactivity_tout, 0); |
1215 | (unsigned long)cfhsi); | ||
1216 | /* Setup the slowpath RX timer. */ | 1215 | /* Setup the slowpath RX timer. */ |
1217 | setup_timer(&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath, | 1216 | timer_setup(&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath, 0); |
1218 | (unsigned long)cfhsi); | ||
1219 | /* Setup the aggregation timer. */ | 1217 | /* Setup the aggregation timer. */ |
1220 | setup_timer(&cfhsi->aggregation_timer, cfhsi_aggregation_tout, | 1218 | timer_setup(&cfhsi->aggregation_timer, cfhsi_aggregation_tout, 0); |
1221 | (unsigned long)cfhsi); | ||
1222 | 1219 | ||
1223 | /* Activate HSI interface. */ | 1220 | /* Activate HSI interface. */ |
1224 | res = cfhsi->ops->cfhsi_up(cfhsi->ops); | 1221 | res = cfhsi->ops->cfhsi_up(cfhsi->ops); |
diff --git a/drivers/net/dsa/mv88e6xxx/phy.c b/drivers/net/dsa/mv88e6xxx/phy.c index 436668bd50dc..46af8052e535 100644 --- a/drivers/net/dsa/mv88e6xxx/phy.c +++ b/drivers/net/dsa/mv88e6xxx/phy.c | |||
@@ -149,9 +149,9 @@ static void mv88e6xxx_phy_ppu_reenable_work(struct work_struct *ugly) | |||
149 | mutex_unlock(&chip->reg_lock); | 149 | mutex_unlock(&chip->reg_lock); |
150 | } | 150 | } |
151 | 151 | ||
152 | static void mv88e6xxx_phy_ppu_reenable_timer(unsigned long _ps) | 152 | static void mv88e6xxx_phy_ppu_reenable_timer(struct timer_list *t) |
153 | { | 153 | { |
154 | struct mv88e6xxx_chip *chip = (void *)_ps; | 154 | struct mv88e6xxx_chip *chip = from_timer(chip, t, ppu_timer); |
155 | 155 | ||
156 | schedule_work(&chip->ppu_work); | 156 | schedule_work(&chip->ppu_work); |
157 | } | 157 | } |
@@ -193,8 +193,7 @@ static void mv88e6xxx_phy_ppu_state_init(struct mv88e6xxx_chip *chip) | |||
193 | { | 193 | { |
194 | mutex_init(&chip->ppu_mutex); | 194 | mutex_init(&chip->ppu_mutex); |
195 | INIT_WORK(&chip->ppu_work, mv88e6xxx_phy_ppu_reenable_work); | 195 | INIT_WORK(&chip->ppu_work, mv88e6xxx_phy_ppu_reenable_work); |
196 | setup_timer(&chip->ppu_timer, mv88e6xxx_phy_ppu_reenable_timer, | 196 | timer_setup(&chip->ppu_timer, mv88e6xxx_phy_ppu_reenable_timer, 0); |
197 | (unsigned long)chip); | ||
198 | } | 197 | } |
199 | 198 | ||
200 | static void mv88e6xxx_phy_ppu_state_destroy(struct mv88e6xxx_chip *chip) | 199 | static void mv88e6xxx_phy_ppu_state_destroy(struct mv88e6xxx_chip *chip) |
diff --git a/drivers/net/eql.c b/drivers/net/eql.c index fccce4b47778..74263f8efe1a 100644 --- a/drivers/net/eql.c +++ b/drivers/net/eql.c | |||
@@ -139,9 +139,9 @@ static netdev_tx_t eql_slave_xmit(struct sk_buff *skb, struct net_device *dev); | |||
139 | 139 | ||
140 | static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave); | 140 | static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave); |
141 | 141 | ||
142 | static void eql_timer(unsigned long param) | 142 | static void eql_timer(struct timer_list *t) |
143 | { | 143 | { |
144 | equalizer_t *eql = (equalizer_t *) param; | 144 | equalizer_t *eql = from_timer(eql, t, timer); |
145 | struct list_head *this, *tmp, *head; | 145 | struct list_head *this, *tmp, *head; |
146 | 146 | ||
147 | spin_lock(&eql->queue.lock); | 147 | spin_lock(&eql->queue.lock); |
@@ -178,7 +178,7 @@ static void __init eql_setup(struct net_device *dev) | |||
178 | { | 178 | { |
179 | equalizer_t *eql = netdev_priv(dev); | 179 | equalizer_t *eql = netdev_priv(dev); |
180 | 180 | ||
181 | setup_timer(&eql->timer, eql_timer, (unsigned long)eql); | 181 | timer_setup(&eql->timer, eql_timer, 0); |
182 | eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; | 182 | eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; |
183 | 183 | ||
184 | spin_lock_init(&eql->queue.lock); | 184 | spin_lock_init(&eql->queue.lock); |
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c index 0658cde1586a..7120f2b9c6ef 100644 --- a/drivers/net/ethernet/adi/bfin_mac.c +++ b/drivers/net/ethernet/adi/bfin_mac.c | |||
@@ -1092,9 +1092,11 @@ static void tx_reclaim_skb(struct bfin_mac_local *lp) | |||
1092 | return; | 1092 | return; |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | static void tx_reclaim_skb_timeout(unsigned long lp) | 1095 | static void tx_reclaim_skb_timeout(struct timer_list *t) |
1096 | { | 1096 | { |
1097 | tx_reclaim_skb((struct bfin_mac_local *)lp); | 1097 | struct bfin_mac_local *lp = from_timer(lp, t, tx_reclaim_timer); |
1098 | |||
1099 | tx_reclaim_skb(lp); | ||
1098 | } | 1100 | } |
1099 | 1101 | ||
1100 | static int bfin_mac_hard_start_xmit(struct sk_buff *skb, | 1102 | static int bfin_mac_hard_start_xmit(struct sk_buff *skb, |
@@ -1650,8 +1652,7 @@ static int bfin_mac_probe(struct platform_device *pdev) | |||
1650 | ndev->netdev_ops = &bfin_mac_netdev_ops; | 1652 | ndev->netdev_ops = &bfin_mac_netdev_ops; |
1651 | ndev->ethtool_ops = &bfin_mac_ethtool_ops; | 1653 | ndev->ethtool_ops = &bfin_mac_ethtool_ops; |
1652 | 1654 | ||
1653 | setup_timer(&lp->tx_reclaim_timer, tx_reclaim_skb_timeout, | 1655 | timer_setup(&lp->tx_reclaim_timer, tx_reclaim_skb_timeout, 0); |
1654 | (unsigned long)lp); | ||
1655 | 1656 | ||
1656 | lp->flags = 0; | 1657 | lp->flags = 0; |
1657 | netif_napi_add(ndev, &lp->napi, bfin_mac_poll, CONFIG_BFIN_RX_DESC_NUM); | 1658 | netif_napi_add(ndev, &lp->napi, bfin_mac_poll, CONFIG_BFIN_RX_DESC_NUM); |
diff --git a/drivers/net/ethernet/agere/et131x.c b/drivers/net/ethernet/agere/et131x.c index 658e92f79d36..48220b6c600d 100644 --- a/drivers/net/ethernet/agere/et131x.c +++ b/drivers/net/ethernet/agere/et131x.c | |||
@@ -3080,9 +3080,9 @@ err_out: | |||
3080 | * The routine called when the error timer expires, to track the number of | 3080 | * The routine called when the error timer expires, to track the number of |
3081 | * recurring errors. | 3081 | * recurring errors. |
3082 | */ | 3082 | */ |
3083 | static void et131x_error_timer_handler(unsigned long data) | 3083 | static void et131x_error_timer_handler(struct timer_list *t) |
3084 | { | 3084 | { |
3085 | struct et131x_adapter *adapter = (struct et131x_adapter *)data; | 3085 | struct et131x_adapter *adapter = from_timer(adapter, t, error_timer); |
3086 | struct phy_device *phydev = adapter->netdev->phydev; | 3086 | struct phy_device *phydev = adapter->netdev->phydev; |
3087 | 3087 | ||
3088 | if (et1310_in_phy_coma(adapter)) { | 3088 | if (et1310_in_phy_coma(adapter)) { |
@@ -3624,8 +3624,7 @@ static int et131x_open(struct net_device *netdev) | |||
3624 | int result; | 3624 | int result; |
3625 | 3625 | ||
3626 | /* Start the timer to track NIC errors */ | 3626 | /* Start the timer to track NIC errors */ |
3627 | setup_timer(&adapter->error_timer, et131x_error_timer_handler, | 3627 | timer_setup(&adapter->error_timer, et131x_error_timer_handler, 0); |
3628 | (unsigned long)adapter); | ||
3629 | adapter->error_timer.expires = jiffies + | 3628 | adapter->error_timer.expires = jiffies + |
3630 | msecs_to_jiffies(TX_ERROR_PERIOD); | 3629 | msecs_to_jiffies(TX_ERROR_PERIOD); |
3631 | add_timer(&adapter->error_timer); | 3630 | add_timer(&adapter->error_timer); |
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c index 1c1ddd891ca3..97c5a89a9cf7 100644 --- a/drivers/net/ethernet/amazon/ena/ena_netdev.c +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c | |||
@@ -2859,9 +2859,9 @@ static void ena_update_host_info(struct ena_admin_host_info *host_info, | |||
2859 | (netdev->features & GENMASK_ULL(63, 32)) >> 32; | 2859 | (netdev->features & GENMASK_ULL(63, 32)) >> 32; |
2860 | } | 2860 | } |
2861 | 2861 | ||
2862 | static void ena_timer_service(unsigned long data) | 2862 | static void ena_timer_service(struct timer_list *t) |
2863 | { | 2863 | { |
2864 | struct ena_adapter *adapter = (struct ena_adapter *)data; | 2864 | struct ena_adapter *adapter = from_timer(adapter, t, timer_service); |
2865 | u8 *debug_area = adapter->ena_dev->host_attr.debug_area_virt_addr; | 2865 | u8 *debug_area = adapter->ena_dev->host_attr.debug_area_virt_addr; |
2866 | struct ena_admin_host_info *host_info = | 2866 | struct ena_admin_host_info *host_info = |
2867 | adapter->ena_dev->host_attr.host_info; | 2867 | adapter->ena_dev->host_attr.host_info; |
@@ -3278,8 +3278,7 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3278 | 3278 | ||
3279 | ena_update_hints(adapter, &get_feat_ctx.hw_hints); | 3279 | ena_update_hints(adapter, &get_feat_ctx.hw_hints); |
3280 | 3280 | ||
3281 | setup_timer(&adapter->timer_service, ena_timer_service, | 3281 | timer_setup(&adapter->timer_service, ena_timer_service, 0); |
3282 | (unsigned long)adapter); | ||
3283 | mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ)); | 3282 | mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ)); |
3284 | 3283 | ||
3285 | dev_info(&pdev->dev, "%s found at mem %lx, mac addr %pM Queues %d\n", | 3284 | dev_info(&pdev->dev, "%s found at mem %lx, mac addr %pM Queues %d\n", |
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 483e97691eea..78dfb2ab78ce 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c | |||
@@ -163,9 +163,9 @@ static int aq_nic_update_link_status(struct aq_nic_s *self) | |||
163 | return 0; | 163 | return 0; |
164 | } | 164 | } |
165 | 165 | ||
166 | static void aq_nic_service_timer_cb(unsigned long param) | 166 | static void aq_nic_service_timer_cb(struct timer_list *t) |
167 | { | 167 | { |
168 | struct aq_nic_s *self = (struct aq_nic_s *)param; | 168 | struct aq_nic_s *self = from_timer(self, t, service_timer); |
169 | struct net_device *ndev = aq_nic_get_ndev(self); | 169 | struct net_device *ndev = aq_nic_get_ndev(self); |
170 | int err = 0; | 170 | int err = 0; |
171 | unsigned int i = 0U; | 171 | unsigned int i = 0U; |
@@ -201,9 +201,9 @@ err_exit: | |||
201 | jiffies + AQ_CFG_SERVICE_TIMER_INTERVAL); | 201 | jiffies + AQ_CFG_SERVICE_TIMER_INTERVAL); |
202 | } | 202 | } |
203 | 203 | ||
204 | static void aq_nic_polling_timer_cb(unsigned long param) | 204 | static void aq_nic_polling_timer_cb(struct timer_list *t) |
205 | { | 205 | { |
206 | struct aq_nic_s *self = (struct aq_nic_s *)param; | 206 | struct aq_nic_s *self = from_timer(self, t, polling_timer); |
207 | struct aq_vec_s *aq_vec = NULL; | 207 | struct aq_vec_s *aq_vec = NULL; |
208 | unsigned int i = 0U; | 208 | unsigned int i = 0U; |
209 | 209 | ||
@@ -440,14 +440,12 @@ int aq_nic_start(struct aq_nic_s *self) | |||
440 | err = aq_nic_update_interrupt_moderation_settings(self); | 440 | err = aq_nic_update_interrupt_moderation_settings(self); |
441 | if (err) | 441 | if (err) |
442 | goto err_exit; | 442 | goto err_exit; |
443 | setup_timer(&self->service_timer, &aq_nic_service_timer_cb, | 443 | timer_setup(&self->service_timer, aq_nic_service_timer_cb, 0); |
444 | (unsigned long)self); | ||
445 | mod_timer(&self->service_timer, jiffies + | 444 | mod_timer(&self->service_timer, jiffies + |
446 | AQ_CFG_SERVICE_TIMER_INTERVAL); | 445 | AQ_CFG_SERVICE_TIMER_INTERVAL); |
447 | 446 | ||
448 | if (self->aq_nic_cfg.is_polling) { | 447 | if (self->aq_nic_cfg.is_polling) { |
449 | setup_timer(&self->polling_timer, &aq_nic_polling_timer_cb, | 448 | timer_setup(&self->polling_timer, aq_nic_polling_timer_cb, 0); |
450 | (unsigned long)self); | ||
451 | mod_timer(&self->polling_timer, jiffies + | 449 | mod_timer(&self->polling_timer, jiffies + |
452 | AQ_CFG_POLLING_TIMER_INTERVAL); | 450 | AQ_CFG_POLLING_TIMER_INTERVAL); |
453 | } else { | 451 | } else { |
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index 8c9986f3fc01..94270f654b3b 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -222,9 +222,10 @@ static u32 atl1c_wait_until_idle(struct atl1c_hw *hw, u32 modu_ctrl) | |||
222 | * atl1c_phy_config - Timer Call-back | 222 | * atl1c_phy_config - Timer Call-back |
223 | * @data: pointer to netdev cast into an unsigned long | 223 | * @data: pointer to netdev cast into an unsigned long |
224 | */ | 224 | */ |
225 | static void atl1c_phy_config(unsigned long data) | 225 | static void atl1c_phy_config(struct timer_list *t) |
226 | { | 226 | { |
227 | struct atl1c_adapter *adapter = (struct atl1c_adapter *) data; | 227 | struct atl1c_adapter *adapter = from_timer(adapter, t, |
228 | phy_config_timer); | ||
228 | struct atl1c_hw *hw = &adapter->hw; | 229 | struct atl1c_hw *hw = &adapter->hw; |
229 | unsigned long flags; | 230 | unsigned long flags; |
230 | 231 | ||
@@ -2613,8 +2614,7 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2613 | adapter->mii.phy_id_mask = 0x1f; | 2614 | adapter->mii.phy_id_mask = 0x1f; |
2614 | adapter->mii.reg_num_mask = MDIO_CTRL_REG_MASK; | 2615 | adapter->mii.reg_num_mask = MDIO_CTRL_REG_MASK; |
2615 | netif_napi_add(netdev, &adapter->napi, atl1c_clean, 64); | 2616 | netif_napi_add(netdev, &adapter->napi, atl1c_clean, 64); |
2616 | setup_timer(&adapter->phy_config_timer, atl1c_phy_config, | 2617 | timer_setup(&adapter->phy_config_timer, atl1c_phy_config, 0); |
2617 | (unsigned long)adapter); | ||
2618 | /* setup the private structure */ | 2618 | /* setup the private structure */ |
2619 | err = atl1c_sw_init(adapter); | 2619 | err = atl1c_sw_init(adapter); |
2620 | if (err) { | 2620 | if (err) { |
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c index 4f7e195af0bc..9dc6da039a6d 100644 --- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c +++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c | |||
@@ -130,9 +130,10 @@ static inline void atl1e_irq_reset(struct atl1e_adapter *adapter) | |||
130 | * atl1e_phy_config - Timer Call-back | 130 | * atl1e_phy_config - Timer Call-back |
131 | * @data: pointer to netdev cast into an unsigned long | 131 | * @data: pointer to netdev cast into an unsigned long |
132 | */ | 132 | */ |
133 | static void atl1e_phy_config(unsigned long data) | 133 | static void atl1e_phy_config(struct timer_list *t) |
134 | { | 134 | { |
135 | struct atl1e_adapter *adapter = (struct atl1e_adapter *) data; | 135 | struct atl1e_adapter *adapter = from_timer(adapter, t, |
136 | phy_config_timer); | ||
136 | struct atl1e_hw *hw = &adapter->hw; | 137 | struct atl1e_hw *hw = &adapter->hw; |
137 | unsigned long flags; | 138 | unsigned long flags; |
138 | 139 | ||
@@ -2361,8 +2362,7 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2361 | 2362 | ||
2362 | netif_napi_add(netdev, &adapter->napi, atl1e_clean, 64); | 2363 | netif_napi_add(netdev, &adapter->napi, atl1e_clean, 64); |
2363 | 2364 | ||
2364 | setup_timer(&adapter->phy_config_timer, atl1e_phy_config, | 2365 | timer_setup(&adapter->phy_config_timer, atl1e_phy_config, 0); |
2365 | (unsigned long)adapter); | ||
2366 | 2366 | ||
2367 | /* get user settings */ | 2367 | /* get user settings */ |
2368 | atl1e_check_options(adapter); | 2368 | atl1e_check_options(adapter); |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index 83d2db2abb45..b81fbf119bce 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -2575,9 +2575,10 @@ static irqreturn_t atl1_intr(int irq, void *data) | |||
2575 | * atl1_phy_config - Timer Call-back | 2575 | * atl1_phy_config - Timer Call-back |
2576 | * @data: pointer to netdev cast into an unsigned long | 2576 | * @data: pointer to netdev cast into an unsigned long |
2577 | */ | 2577 | */ |
2578 | static void atl1_phy_config(unsigned long data) | 2578 | static void atl1_phy_config(struct timer_list *t) |
2579 | { | 2579 | { |
2580 | struct atl1_adapter *adapter = (struct atl1_adapter *)data; | 2580 | struct atl1_adapter *adapter = from_timer(adapter, t, |
2581 | phy_config_timer); | ||
2581 | struct atl1_hw *hw = &adapter->hw; | 2582 | struct atl1_hw *hw = &adapter->hw; |
2582 | unsigned long flags; | 2583 | unsigned long flags; |
2583 | 2584 | ||
@@ -3071,8 +3072,7 @@ static int atl1_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3071 | /* assume we have no link for now */ | 3072 | /* assume we have no link for now */ |
3072 | netif_carrier_off(netdev); | 3073 | netif_carrier_off(netdev); |
3073 | 3074 | ||
3074 | setup_timer(&adapter->phy_config_timer, atl1_phy_config, | 3075 | timer_setup(&adapter->phy_config_timer, atl1_phy_config, 0); |
3075 | (unsigned long)adapter); | ||
3076 | adapter->phy_timer_pending = false; | 3076 | adapter->phy_timer_pending = false; |
3077 | 3077 | ||
3078 | INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task); | 3078 | INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task); |
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 77a1c03255de..db4bcc51023a 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c | |||
@@ -1028,9 +1028,9 @@ static void atl2_tx_timeout(struct net_device *netdev) | |||
1028 | * atl2_watchdog - Timer Call-back | 1028 | * atl2_watchdog - Timer Call-back |
1029 | * @data: pointer to netdev cast into an unsigned long | 1029 | * @data: pointer to netdev cast into an unsigned long |
1030 | */ | 1030 | */ |
1031 | static void atl2_watchdog(unsigned long data) | 1031 | static void atl2_watchdog(struct timer_list *t) |
1032 | { | 1032 | { |
1033 | struct atl2_adapter *adapter = (struct atl2_adapter *) data; | 1033 | struct atl2_adapter *adapter = from_timer(adapter, t, watchdog_timer); |
1034 | 1034 | ||
1035 | if (!test_bit(__ATL2_DOWN, &adapter->flags)) { | 1035 | if (!test_bit(__ATL2_DOWN, &adapter->flags)) { |
1036 | u32 drop_rxd, drop_rxs; | 1036 | u32 drop_rxd, drop_rxs; |
@@ -1053,9 +1053,10 @@ static void atl2_watchdog(unsigned long data) | |||
1053 | * atl2_phy_config - Timer Call-back | 1053 | * atl2_phy_config - Timer Call-back |
1054 | * @data: pointer to netdev cast into an unsigned long | 1054 | * @data: pointer to netdev cast into an unsigned long |
1055 | */ | 1055 | */ |
1056 | static void atl2_phy_config(unsigned long data) | 1056 | static void atl2_phy_config(struct timer_list *t) |
1057 | { | 1057 | { |
1058 | struct atl2_adapter *adapter = (struct atl2_adapter *) data; | 1058 | struct atl2_adapter *adapter = from_timer(adapter, t, |
1059 | phy_config_timer); | ||
1059 | struct atl2_hw *hw = &adapter->hw; | 1060 | struct atl2_hw *hw = &adapter->hw; |
1060 | unsigned long flags; | 1061 | unsigned long flags; |
1061 | 1062 | ||
@@ -1434,11 +1435,9 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1434 | 1435 | ||
1435 | atl2_check_options(adapter); | 1436 | atl2_check_options(adapter); |
1436 | 1437 | ||
1437 | setup_timer(&adapter->watchdog_timer, atl2_watchdog, | 1438 | timer_setup(&adapter->watchdog_timer, atl2_watchdog, 0); |
1438 | (unsigned long)adapter); | ||
1439 | 1439 | ||
1440 | setup_timer(&adapter->phy_config_timer, atl2_phy_config, | 1440 | timer_setup(&adapter->phy_config_timer, atl2_phy_config, 0); |
1441 | (unsigned long)adapter); | ||
1442 | 1441 | ||
1443 | INIT_WORK(&adapter->reset_task, atl2_reset_task); | 1442 | INIT_WORK(&adapter->reset_task, atl2_reset_task); |
1444 | INIT_WORK(&adapter->link_chg_task, atl2_link_chg_task); | 1443 | INIT_WORK(&adapter->link_chg_task, atl2_link_chg_task); |
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c index 42e44fc03a18..e445ab724827 100644 --- a/drivers/net/ethernet/broadcom/b44.c +++ b/drivers/net/ethernet/broadcom/b44.c | |||
@@ -599,9 +599,9 @@ static void b44_check_phy(struct b44 *bp) | |||
599 | } | 599 | } |
600 | } | 600 | } |
601 | 601 | ||
602 | static void b44_timer(unsigned long __opaque) | 602 | static void b44_timer(struct timer_list *t) |
603 | { | 603 | { |
604 | struct b44 *bp = (struct b44 *) __opaque; | 604 | struct b44 *bp = from_timer(bp, t, timer); |
605 | 605 | ||
606 | spin_lock_irq(&bp->lock); | 606 | spin_lock_irq(&bp->lock); |
607 | 607 | ||
@@ -1474,7 +1474,7 @@ static int b44_open(struct net_device *dev) | |||
1474 | goto out; | 1474 | goto out; |
1475 | } | 1475 | } |
1476 | 1476 | ||
1477 | setup_timer(&bp->timer, b44_timer, (unsigned long)bp); | 1477 | timer_setup(&bp->timer, b44_timer, 0); |
1478 | bp->timer.expires = jiffies + HZ; | 1478 | bp->timer.expires = jiffies + HZ; |
1479 | add_timer(&bp->timer); | 1479 | add_timer(&bp->timer); |
1480 | 1480 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index b3055a76dfbf..7919f6112ecf 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c | |||
@@ -6183,9 +6183,9 @@ bnx2_5708_serdes_timer(struct bnx2 *bp) | |||
6183 | } | 6183 | } |
6184 | 6184 | ||
6185 | static void | 6185 | static void |
6186 | bnx2_timer(unsigned long data) | 6186 | bnx2_timer(struct timer_list *t) |
6187 | { | 6187 | { |
6188 | struct bnx2 *bp = (struct bnx2 *) data; | 6188 | struct bnx2 *bp = from_timer(bp, t, timer); |
6189 | 6189 | ||
6190 | if (!netif_running(bp->dev)) | 6190 | if (!netif_running(bp->dev)) |
6191 | return; | 6191 | return; |
@@ -8462,7 +8462,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
8462 | bnx2_set_default_link(bp); | 8462 | bnx2_set_default_link(bp); |
8463 | bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX; | 8463 | bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX; |
8464 | 8464 | ||
8465 | setup_timer(&bp->timer, bnx2_timer, (unsigned long)bp); | 8465 | timer_setup(&bp->timer, bnx2_timer, 0); |
8466 | bp->timer.expires = RUN_AT(BNX2_TIMER_INTERVAL); | 8466 | bp->timer.expires = RUN_AT(BNX2_TIMER_INTERVAL); |
8467 | 8467 | ||
8468 | #ifdef BCM_CNIC | 8468 | #ifdef BCM_CNIC |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index be9fd7d184d0..91e2a7560b48 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |||
@@ -5761,9 +5761,9 @@ void bnx2x_drv_pulse(struct bnx2x *bp) | |||
5761 | bp->fw_drv_pulse_wr_seq); | 5761 | bp->fw_drv_pulse_wr_seq); |
5762 | } | 5762 | } |
5763 | 5763 | ||
5764 | static void bnx2x_timer(unsigned long data) | 5764 | static void bnx2x_timer(struct timer_list *t) |
5765 | { | 5765 | { |
5766 | struct bnx2x *bp = (struct bnx2x *) data; | 5766 | struct bnx2x *bp = from_timer(bp, t, timer); |
5767 | 5767 | ||
5768 | if (!netif_running(bp->dev)) | 5768 | if (!netif_running(bp->dev)) |
5769 | return; | 5769 | return; |
@@ -12421,7 +12421,7 @@ static int bnx2x_init_bp(struct bnx2x *bp) | |||
12421 | 12421 | ||
12422 | bp->current_interval = CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ; | 12422 | bp->current_interval = CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ; |
12423 | 12423 | ||
12424 | setup_timer(&bp->timer, bnx2x_timer, (unsigned long)bp); | 12424 | timer_setup(&bp->timer, bnx2x_timer, 0); |
12425 | bp->timer.expires = jiffies + bp->current_interval; | 12425 | bp->timer.expires = jiffies + bp->current_interval; |
12426 | 12426 | ||
12427 | if (SHMEM2_HAS(bp, dcbx_lldp_params_offset) && | 12427 | if (SHMEM2_HAS(bp, dcbx_lldp_params_offset) && |
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 33c49ad697e4..c5c38d4b7d1c 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c | |||
@@ -6962,9 +6962,9 @@ static void bnxt_poll_controller(struct net_device *dev) | |||
6962 | } | 6962 | } |
6963 | #endif | 6963 | #endif |
6964 | 6964 | ||
6965 | static void bnxt_timer(unsigned long data) | 6965 | static void bnxt_timer(struct timer_list *t) |
6966 | { | 6966 | { |
6967 | struct bnxt *bp = (struct bnxt *)data; | 6967 | struct bnxt *bp = from_timer(bp, t, timer); |
6968 | struct net_device *dev = bp->dev; | 6968 | struct net_device *dev = bp->dev; |
6969 | 6969 | ||
6970 | if (!netif_running(dev)) | 6970 | if (!netif_running(dev)) |
@@ -7236,7 +7236,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
7236 | 7236 | ||
7237 | bnxt_init_dflt_coal(bp); | 7237 | bnxt_init_dflt_coal(bp); |
7238 | 7238 | ||
7239 | setup_timer(&bp->timer, bnxt_timer, (unsigned long)bp); | 7239 | timer_setup(&bp->timer, bnxt_timer, 0); |
7240 | bp->current_interval = BNXT_TIMER_INTERVAL; | 7240 | bp->current_interval = BNXT_TIMER_INTERVAL; |
7241 | 7241 | ||
7242 | clear_bit(BNXT_STATE_OPEN, &bp->state); | 7242 | clear_bit(BNXT_STATE_OPEN, &bp->state); |
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index d8d5f207c759..de51c2177d03 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c | |||
@@ -10931,9 +10931,9 @@ static void tg3_chk_missed_msi(struct tg3 *tp) | |||
10931 | } | 10931 | } |
10932 | } | 10932 | } |
10933 | 10933 | ||
10934 | static void tg3_timer(unsigned long __opaque) | 10934 | static void tg3_timer(struct timer_list *t) |
10935 | { | 10935 | { |
10936 | struct tg3 *tp = (struct tg3 *) __opaque; | 10936 | struct tg3 *tp = from_timer(tp, t, timer); |
10937 | 10937 | ||
10938 | spin_lock(&tp->lock); | 10938 | spin_lock(&tp->lock); |
10939 | 10939 | ||
@@ -11087,7 +11087,7 @@ static void tg3_timer_init(struct tg3 *tp) | |||
11087 | tp->asf_multiplier = (HZ / tp->timer_offset) * | 11087 | tp->asf_multiplier = (HZ / tp->timer_offset) * |
11088 | TG3_FW_UPDATE_FREQ_SEC; | 11088 | TG3_FW_UPDATE_FREQ_SEC; |
11089 | 11089 | ||
11090 | setup_timer(&tp->timer, tg3_timer, (unsigned long)tp); | 11090 | timer_setup(&tp->timer, tg3_timer, 0); |
11091 | } | 11091 | } |
11092 | 11092 | ||
11093 | static void tg3_timer_start(struct tg3 *tp) | 11093 | static void tg3_timer_start(struct tg3 *tp) |
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c index 4a11baffe02d..e130fb757e7b 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c | |||
@@ -1676,9 +1676,9 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget) | |||
1676 | return work_done; | 1676 | return work_done; |
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | static void enic_notify_timer(unsigned long data) | 1679 | static void enic_notify_timer(struct timer_list *t) |
1680 | { | 1680 | { |
1681 | struct enic *enic = (struct enic *)data; | 1681 | struct enic *enic = from_timer(enic, t, notify_timer); |
1682 | 1682 | ||
1683 | enic_notify_check(enic); | 1683 | enic_notify_check(enic); |
1684 | 1684 | ||
@@ -2846,8 +2846,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2846 | /* Setup notification timer, HW reset task, and wq locks | 2846 | /* Setup notification timer, HW reset task, and wq locks |
2847 | */ | 2847 | */ |
2848 | 2848 | ||
2849 | setup_timer(&enic->notify_timer, enic_notify_timer, | 2849 | timer_setup(&enic->notify_timer, enic_notify_timer, 0); |
2850 | (unsigned long)enic); | ||
2851 | 2850 | ||
2852 | enic_set_rx_coal_setting(enic); | 2851 | enic_set_rx_coal_setting(enic); |
2853 | INIT_WORK(&enic->reset, enic_reset); | 2852 | INIT_WORK(&enic->reset, enic_reset); |
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 81c1fac00d33..62f204f32316 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |||
@@ -1346,9 +1346,9 @@ static void mib_counters_update(struct mv643xx_eth_private *mp) | |||
1346 | spin_unlock_bh(&mp->mib_counters_lock); | 1346 | spin_unlock_bh(&mp->mib_counters_lock); |
1347 | } | 1347 | } |
1348 | 1348 | ||
1349 | static void mib_counters_timer_wrapper(unsigned long _mp) | 1349 | static void mib_counters_timer_wrapper(struct timer_list *t) |
1350 | { | 1350 | { |
1351 | struct mv643xx_eth_private *mp = (void *)_mp; | 1351 | struct mv643xx_eth_private *mp = from_timer(mp, t, mib_counters_timer); |
1352 | mib_counters_update(mp); | 1352 | mib_counters_update(mp); |
1353 | mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); | 1353 | mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ); |
1354 | } | 1354 | } |
@@ -2321,9 +2321,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget) | |||
2321 | return work_done; | 2321 | return work_done; |
2322 | } | 2322 | } |
2323 | 2323 | ||
2324 | static inline void oom_timer_wrapper(unsigned long data) | 2324 | static inline void oom_timer_wrapper(struct timer_list *t) |
2325 | { | 2325 | { |
2326 | struct mv643xx_eth_private *mp = (void *)data; | 2326 | struct mv643xx_eth_private *mp = from_timer(mp, t, rx_oom); |
2327 | 2327 | ||
2328 | napi_schedule(&mp->napi); | 2328 | napi_schedule(&mp->napi); |
2329 | } | 2329 | } |
@@ -3178,8 +3178,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
3178 | 3178 | ||
3179 | mib_counters_clear(mp); | 3179 | mib_counters_clear(mp); |
3180 | 3180 | ||
3181 | setup_timer(&mp->mib_counters_timer, mib_counters_timer_wrapper, | 3181 | timer_setup(&mp->mib_counters_timer, mib_counters_timer_wrapper, 0); |
3182 | (unsigned long)mp); | ||
3183 | mp->mib_counters_timer.expires = jiffies + 30 * HZ; | 3182 | mp->mib_counters_timer.expires = jiffies + 30 * HZ; |
3184 | 3183 | ||
3185 | spin_lock_init(&mp->mib_counters_lock); | 3184 | spin_lock_init(&mp->mib_counters_lock); |
@@ -3188,7 +3187,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev) | |||
3188 | 3187 | ||
3189 | netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, NAPI_POLL_WEIGHT); | 3188 | netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, NAPI_POLL_WEIGHT); |
3190 | 3189 | ||
3191 | setup_timer(&mp->rx_oom, oom_timer_wrapper, (unsigned long)mp); | 3190 | timer_setup(&mp->rx_oom, oom_timer_wrapper, 0); |
3192 | 3191 | ||
3193 | 3192 | ||
3194 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 3193 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index 91b1c154fd29..7bbd86f08e5f 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c | |||
@@ -362,9 +362,9 @@ static void rxq_refill(struct net_device *dev) | |||
362 | } | 362 | } |
363 | } | 363 | } |
364 | 364 | ||
365 | static inline void rxq_refill_timer_wrapper(unsigned long data) | 365 | static inline void rxq_refill_timer_wrapper(struct timer_list *t) |
366 | { | 366 | { |
367 | struct pxa168_eth_private *pep = (void *)data; | 367 | struct pxa168_eth_private *pep = from_timer(pep, t, timeout); |
368 | napi_schedule(&pep->napi); | 368 | napi_schedule(&pep->napi); |
369 | } | 369 | } |
370 | 370 | ||
@@ -1496,8 +1496,7 @@ static int pxa168_eth_probe(struct platform_device *pdev) | |||
1496 | netif_napi_add(dev, &pep->napi, pxa168_rx_poll, pep->rx_ring_size); | 1496 | netif_napi_add(dev, &pep->napi, pxa168_rx_poll, pep->rx_ring_size); |
1497 | 1497 | ||
1498 | memset(&pep->timeout, 0, sizeof(struct timer_list)); | 1498 | memset(&pep->timeout, 0, sizeof(struct timer_list)); |
1499 | setup_timer(&pep->timeout, rxq_refill_timer_wrapper, | 1499 | timer_setup(&pep->timeout, rxq_refill_timer_wrapper, 0); |
1500 | (unsigned long)pep); | ||
1501 | 1500 | ||
1502 | pep->smi_bus = mdiobus_alloc(); | 1501 | pep->smi_bus = mdiobus_alloc(); |
1503 | if (!pep->smi_bus) { | 1502 | if (!pep->smi_bus) { |
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c index eef35bf3e849..6e423f098a60 100644 --- a/drivers/net/ethernet/marvell/skge.c +++ b/drivers/net/ethernet/marvell/skge.c | |||
@@ -1495,9 +1495,9 @@ static int xm_check_link(struct net_device *dev) | |||
1495 | * get an interrupt when carrier is detected, need to poll for | 1495 | * get an interrupt when carrier is detected, need to poll for |
1496 | * link coming up. | 1496 | * link coming up. |
1497 | */ | 1497 | */ |
1498 | static void xm_link_timer(unsigned long arg) | 1498 | static void xm_link_timer(struct timer_list *t) |
1499 | { | 1499 | { |
1500 | struct skge_port *skge = (struct skge_port *) arg; | 1500 | struct skge_port *skge = from_timer(skge, t, link_timer); |
1501 | struct net_device *dev = skge->netdev; | 1501 | struct net_device *dev = skge->netdev; |
1502 | struct skge_hw *hw = skge->hw; | 1502 | struct skge_hw *hw = skge->hw; |
1503 | int port = skge->port; | 1503 | int port = skge->port; |
@@ -3897,7 +3897,7 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, | |||
3897 | 3897 | ||
3898 | /* Only used for Genesis XMAC */ | 3898 | /* Only used for Genesis XMAC */ |
3899 | if (is_genesis(hw)) | 3899 | if (is_genesis(hw)) |
3900 | setup_timer(&skge->link_timer, xm_link_timer, (unsigned long) skge); | 3900 | timer_setup(&skge->link_timer, xm_link_timer, 0); |
3901 | else { | 3901 | else { |
3902 | dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | | 3902 | dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | |
3903 | NETIF_F_RXCSUM; | 3903 | NETIF_F_RXCSUM; |
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index 1145cde2274a..9efe1771423c 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -2974,9 +2974,9 @@ static int sky2_rx_hung(struct net_device *dev) | |||
2974 | } | 2974 | } |
2975 | } | 2975 | } |
2976 | 2976 | ||
2977 | static void sky2_watchdog(unsigned long arg) | 2977 | static void sky2_watchdog(struct timer_list *t) |
2978 | { | 2978 | { |
2979 | struct sky2_hw *hw = (struct sky2_hw *) arg; | 2979 | struct sky2_hw *hw = from_timer(hw, t, watchdog_timer); |
2980 | 2980 | ||
2981 | /* Check for lost IRQ once a second */ | 2981 | /* Check for lost IRQ once a second */ |
2982 | if (sky2_read32(hw, B0_ISRC)) { | 2982 | if (sky2_read32(hw, B0_ISRC)) { |
@@ -5083,7 +5083,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5083 | sky2_show_addr(dev1); | 5083 | sky2_show_addr(dev1); |
5084 | } | 5084 | } |
5085 | 5085 | ||
5086 | setup_timer(&hw->watchdog_timer, sky2_watchdog, (unsigned long) hw); | 5086 | timer_setup(&hw->watchdog_timer, sky2_watchdog, 0); |
5087 | INIT_WORK(&hw->restart_work, sky2_restart); | 5087 | INIT_WORK(&hw->restart_work, sky2_restart); |
5088 | 5088 | ||
5089 | pci_set_drvdata(pdev, hw); | 5089 | pci_set_drvdata(pdev, hw); |
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index b171ed2015fe..2521c8c40015 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c | |||
@@ -3501,7 +3501,7 @@ static void myri10ge_watchdog(struct work_struct *work) | |||
3501 | * cannot detect a NIC with a parity error in a timely fashion if the | 3501 | * cannot detect a NIC with a parity error in a timely fashion if the |
3502 | * NIC is lightly loaded. | 3502 | * NIC is lightly loaded. |
3503 | */ | 3503 | */ |
3504 | static void myri10ge_watchdog_timer(unsigned long arg) | 3504 | static void myri10ge_watchdog_timer(struct timer_list *t) |
3505 | { | 3505 | { |
3506 | struct myri10ge_priv *mgp; | 3506 | struct myri10ge_priv *mgp; |
3507 | struct myri10ge_slice_state *ss; | 3507 | struct myri10ge_slice_state *ss; |
@@ -3509,7 +3509,7 @@ static void myri10ge_watchdog_timer(unsigned long arg) | |||
3509 | u32 rx_pause_cnt; | 3509 | u32 rx_pause_cnt; |
3510 | u16 cmd; | 3510 | u16 cmd; |
3511 | 3511 | ||
3512 | mgp = (struct myri10ge_priv *)arg; | 3512 | mgp = from_timer(mgp, t, watchdog_timer); |
3513 | 3513 | ||
3514 | rx_pause_cnt = ntohl(mgp->ss[0].fw_stats->dropped_pause); | 3514 | rx_pause_cnt = ntohl(mgp->ss[0].fw_stats->dropped_pause); |
3515 | busy_slice_cnt = 0; | 3515 | busy_slice_cnt = 0; |
@@ -3930,8 +3930,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3930 | pci_save_state(pdev); | 3930 | pci_save_state(pdev); |
3931 | 3931 | ||
3932 | /* Setup the watchdog timer */ | 3932 | /* Setup the watchdog timer */ |
3933 | setup_timer(&mgp->watchdog_timer, myri10ge_watchdog_timer, | 3933 | timer_setup(&mgp->watchdog_timer, myri10ge_watchdog_timer, 0); |
3934 | (unsigned long)mgp); | ||
3935 | 3934 | ||
3936 | netdev->ethtool_ops = &myri10ge_ethtool_ops; | 3935 | netdev->ethtool_ops = &myri10ge_ethtool_ops; |
3937 | INIT_WORK(&mgp->watchdog_work, myri10ge_watchdog); | 3936 | INIT_WORK(&mgp->watchdog_work, myri10ge_watchdog); |
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 457ee80307ea..40e52ffb732f 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | |||
@@ -1089,9 +1089,10 @@ static void pch_gbe_set_mode(struct pch_gbe_adapter *adapter, u16 speed, | |||
1089 | * pch_gbe_watchdog - Watchdog process | 1089 | * pch_gbe_watchdog - Watchdog process |
1090 | * @data: Board private structure | 1090 | * @data: Board private structure |
1091 | */ | 1091 | */ |
1092 | static void pch_gbe_watchdog(unsigned long data) | 1092 | static void pch_gbe_watchdog(struct timer_list *t) |
1093 | { | 1093 | { |
1094 | struct pch_gbe_adapter *adapter = (struct pch_gbe_adapter *)data; | 1094 | struct pch_gbe_adapter *adapter = from_timer(adapter, t, |
1095 | watchdog_timer); | ||
1095 | struct net_device *netdev = adapter->netdev; | 1096 | struct net_device *netdev = adapter->netdev; |
1096 | struct pch_gbe_hw *hw = &adapter->hw; | 1097 | struct pch_gbe_hw *hw = &adapter->hw; |
1097 | 1098 | ||
@@ -2644,8 +2645,7 @@ static int pch_gbe_probe(struct pci_dev *pdev, | |||
2644 | dev_err(&pdev->dev, "Invalid MAC address, " | 2645 | dev_err(&pdev->dev, "Invalid MAC address, " |
2645 | "interface disabled.\n"); | 2646 | "interface disabled.\n"); |
2646 | } | 2647 | } |
2647 | setup_timer(&adapter->watchdog_timer, pch_gbe_watchdog, | 2648 | timer_setup(&adapter->watchdog_timer, pch_gbe_watchdog, 0); |
2648 | (unsigned long)adapter); | ||
2649 | 2649 | ||
2650 | INIT_WORK(&adapter->reset_task, pch_gbe_reset_task); | 2650 | INIT_WORK(&adapter->reset_task, pch_gbe_reset_task); |
2651 | 2651 | ||
diff --git a/drivers/net/ethernet/pasemi/pasemi_mac.c b/drivers/net/ethernet/pasemi/pasemi_mac.c index 49591d9c2e1b..c9a55b774935 100644 --- a/drivers/net/ethernet/pasemi/pasemi_mac.c +++ b/drivers/net/ethernet/pasemi/pasemi_mac.c | |||
@@ -943,9 +943,9 @@ static irqreturn_t pasemi_mac_rx_intr(int irq, void *data) | |||
943 | 943 | ||
944 | #define TX_CLEAN_INTERVAL HZ | 944 | #define TX_CLEAN_INTERVAL HZ |
945 | 945 | ||
946 | static void pasemi_mac_tx_timer(unsigned long data) | 946 | static void pasemi_mac_tx_timer(struct timer_list *t) |
947 | { | 947 | { |
948 | struct pasemi_mac_txring *txring = (struct pasemi_mac_txring *)data; | 948 | struct pasemi_mac_txring *txring = from_timer(txring, t, clean_timer); |
949 | struct pasemi_mac *mac = txring->mac; | 949 | struct pasemi_mac *mac = txring->mac; |
950 | 950 | ||
951 | pasemi_mac_clean_tx(txring); | 951 | pasemi_mac_clean_tx(txring); |
@@ -1199,8 +1199,7 @@ static int pasemi_mac_open(struct net_device *dev) | |||
1199 | if (dev->phydev) | 1199 | if (dev->phydev) |
1200 | phy_start(dev->phydev); | 1200 | phy_start(dev->phydev); |
1201 | 1201 | ||
1202 | setup_timer(&mac->tx->clean_timer, pasemi_mac_tx_timer, | 1202 | timer_setup(&mac->tx->clean_timer, pasemi_mac_tx_timer, 0); |
1203 | (unsigned long)mac->tx); | ||
1204 | mod_timer(&mac->tx->clean_timer, jiffies + HZ); | 1203 | mod_timer(&mac->tx->clean_timer, jiffies + HZ); |
1205 | 1204 | ||
1206 | return 0; | 1205 | return 0; |
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c index 05479d435469..9e5264d8773b 100644 --- a/drivers/net/ethernet/qlogic/qla3xxx.c +++ b/drivers/net/ethernet/qlogic/qla3xxx.c | |||
@@ -3749,9 +3749,9 @@ static void ql_get_board_info(struct ql3_adapter *qdev) | |||
3749 | qdev->pci_slot = (u8) PCI_SLOT(qdev->pdev->devfn); | 3749 | qdev->pci_slot = (u8) PCI_SLOT(qdev->pdev->devfn); |
3750 | } | 3750 | } |
3751 | 3751 | ||
3752 | static void ql3xxx_timer(unsigned long ptr) | 3752 | static void ql3xxx_timer(struct timer_list *t) |
3753 | { | 3753 | { |
3754 | struct ql3_adapter *qdev = (struct ql3_adapter *)ptr; | 3754 | struct ql3_adapter *qdev = from_timer(qdev, t, adapter_timer); |
3755 | queue_delayed_work(qdev->workqueue, &qdev->link_state_work, 0); | 3755 | queue_delayed_work(qdev->workqueue, &qdev->link_state_work, 0); |
3756 | } | 3756 | } |
3757 | 3757 | ||
@@ -3891,7 +3891,7 @@ static int ql3xxx_probe(struct pci_dev *pdev, | |||
3891 | INIT_DELAYED_WORK(&qdev->tx_timeout_work, ql_tx_timeout_work); | 3891 | INIT_DELAYED_WORK(&qdev->tx_timeout_work, ql_tx_timeout_work); |
3892 | INIT_DELAYED_WORK(&qdev->link_state_work, ql_link_state_machine_work); | 3892 | INIT_DELAYED_WORK(&qdev->link_state_work, ql_link_state_machine_work); |
3893 | 3893 | ||
3894 | setup_timer(&qdev->adapter_timer, ql3xxx_timer, (unsigned long)qdev); | 3894 | timer_setup(&qdev->adapter_timer, ql3xxx_timer, 0); |
3895 | qdev->adapter_timer.expires = jiffies + HZ * 2; /* two second delay */ | 3895 | qdev->adapter_timer.expires = jiffies + HZ * 2; /* two second delay */ |
3896 | 3896 | ||
3897 | if (!cards_found) { | 3897 | if (!cards_found) { |
diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c index 0653b70723a3..6d6fb8cf3e7c 100644 --- a/drivers/net/ethernet/rocker/rocker_ofdpa.c +++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c | |||
@@ -1983,9 +1983,9 @@ err_out: | |||
1983 | return err; | 1983 | return err; |
1984 | } | 1984 | } |
1985 | 1985 | ||
1986 | static void ofdpa_fdb_cleanup(unsigned long data) | 1986 | static void ofdpa_fdb_cleanup(struct timer_list *t) |
1987 | { | 1987 | { |
1988 | struct ofdpa *ofdpa = (struct ofdpa *)data; | 1988 | struct ofdpa *ofdpa = from_timer(ofdpa, t, fdb_cleanup_timer); |
1989 | struct ofdpa_port *ofdpa_port; | 1989 | struct ofdpa_port *ofdpa_port; |
1990 | struct ofdpa_fdb_tbl_entry *entry; | 1990 | struct ofdpa_fdb_tbl_entry *entry; |
1991 | struct hlist_node *tmp; | 1991 | struct hlist_node *tmp; |
@@ -2368,8 +2368,7 @@ static int ofdpa_init(struct rocker *rocker) | |||
2368 | hash_init(ofdpa->neigh_tbl); | 2368 | hash_init(ofdpa->neigh_tbl); |
2369 | spin_lock_init(&ofdpa->neigh_tbl_lock); | 2369 | spin_lock_init(&ofdpa->neigh_tbl_lock); |
2370 | 2370 | ||
2371 | setup_timer(&ofdpa->fdb_cleanup_timer, ofdpa_fdb_cleanup, | 2371 | timer_setup(&ofdpa->fdb_cleanup_timer, ofdpa_fdb_cleanup, 0); |
2372 | (unsigned long) ofdpa); | ||
2373 | mod_timer(&ofdpa->fdb_cleanup_timer, jiffies); | 2372 | mod_timer(&ofdpa->fdb_cleanup_timer, jiffies); |
2374 | 2373 | ||
2375 | ofdpa->ageing_time = BR_DEFAULT_AGEING_TIME; | 2374 | ofdpa->ageing_time = BR_DEFAULT_AGEING_TIME; |
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index ff4fb5eae1af..f63c2ddced3c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -345,9 +345,9 @@ void stmmac_disable_eee_mode(struct stmmac_priv *priv) | |||
345 | * if there is no data transfer and if we are not in LPI state, | 345 | * if there is no data transfer and if we are not in LPI state, |
346 | * then MAC Transmitter can be moved to LPI state. | 346 | * then MAC Transmitter can be moved to LPI state. |
347 | */ | 347 | */ |
348 | static void stmmac_eee_ctrl_timer(unsigned long arg) | 348 | static void stmmac_eee_ctrl_timer(struct timer_list *t) |
349 | { | 349 | { |
350 | struct stmmac_priv *priv = (struct stmmac_priv *)arg; | 350 | struct stmmac_priv *priv = from_timer(priv, t, eee_ctrl_timer); |
351 | 351 | ||
352 | stmmac_enable_eee_mode(priv); | 352 | stmmac_enable_eee_mode(priv); |
353 | mod_timer(&priv->eee_ctrl_timer, STMMAC_LPI_T(eee_timer)); | 353 | mod_timer(&priv->eee_ctrl_timer, STMMAC_LPI_T(eee_timer)); |
@@ -401,9 +401,8 @@ bool stmmac_eee_init(struct stmmac_priv *priv) | |||
401 | spin_lock_irqsave(&priv->lock, flags); | 401 | spin_lock_irqsave(&priv->lock, flags); |
402 | if (!priv->eee_active) { | 402 | if (!priv->eee_active) { |
403 | priv->eee_active = 1; | 403 | priv->eee_active = 1; |
404 | setup_timer(&priv->eee_ctrl_timer, | 404 | timer_setup(&priv->eee_ctrl_timer, |
405 | stmmac_eee_ctrl_timer, | 405 | stmmac_eee_ctrl_timer, 0); |
406 | (unsigned long)priv); | ||
407 | mod_timer(&priv->eee_ctrl_timer, | 406 | mod_timer(&priv->eee_ctrl_timer, |
408 | STMMAC_LPI_T(eee_timer)); | 407 | STMMAC_LPI_T(eee_timer)); |
409 | 408 | ||
@@ -2221,9 +2220,9 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) | |||
2221 | * Description: | 2220 | * Description: |
2222 | * This is the timer handler to directly invoke the stmmac_tx_clean. | 2221 | * This is the timer handler to directly invoke the stmmac_tx_clean. |
2223 | */ | 2222 | */ |
2224 | static void stmmac_tx_timer(unsigned long data) | 2223 | static void stmmac_tx_timer(struct timer_list *t) |
2225 | { | 2224 | { |
2226 | struct stmmac_priv *priv = (struct stmmac_priv *)data; | 2225 | struct stmmac_priv *priv = from_timer(priv, t, txtimer); |
2227 | u32 tx_queues_count = priv->plat->tx_queues_to_use; | 2226 | u32 tx_queues_count = priv->plat->tx_queues_to_use; |
2228 | u32 queue; | 2227 | u32 queue; |
2229 | 2228 | ||
@@ -2244,7 +2243,7 @@ static void stmmac_init_tx_coalesce(struct stmmac_priv *priv) | |||
2244 | { | 2243 | { |
2245 | priv->tx_coal_frames = STMMAC_TX_FRAMES; | 2244 | priv->tx_coal_frames = STMMAC_TX_FRAMES; |
2246 | priv->tx_coal_timer = STMMAC_COAL_TX_TIMER; | 2245 | priv->tx_coal_timer = STMMAC_COAL_TX_TIMER; |
2247 | setup_timer(&priv->txtimer, stmmac_tx_timer, (unsigned long)priv); | 2246 | timer_setup(&priv->txtimer, stmmac_tx_timer, 0); |
2248 | priv->txtimer.expires = STMMAC_COAL_TIMER(priv->tx_coal_timer); | 2247 | priv->txtimer.expires = STMMAC_COAL_TIMER(priv->tx_coal_timer); |
2249 | add_timer(&priv->txtimer); | 2248 | add_timer(&priv->txtimer); |
2250 | } | 2249 | } |
diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c index e1b55b8fb8e0..1f8e9601592a 100644 --- a/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c +++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-net.c | |||
@@ -358,9 +358,9 @@ static irqreturn_t xlgmac_dma_isr(int irq, void *data) | |||
358 | return IRQ_HANDLED; | 358 | return IRQ_HANDLED; |
359 | } | 359 | } |
360 | 360 | ||
361 | static void xlgmac_tx_timer(unsigned long data) | 361 | static void xlgmac_tx_timer(struct timer_list *t) |
362 | { | 362 | { |
363 | struct xlgmac_channel *channel = (struct xlgmac_channel *)data; | 363 | struct xlgmac_channel *channel = from_timer(channel, t, tx_timer); |
364 | struct xlgmac_pdata *pdata = channel->pdata; | 364 | struct xlgmac_pdata *pdata = channel->pdata; |
365 | struct napi_struct *napi; | 365 | struct napi_struct *napi; |
366 | 366 | ||
@@ -391,8 +391,7 @@ static void xlgmac_init_timers(struct xlgmac_pdata *pdata) | |||
391 | if (!channel->tx_ring) | 391 | if (!channel->tx_ring) |
392 | break; | 392 | break; |
393 | 393 | ||
394 | setup_timer(&channel->tx_timer, xlgmac_tx_timer, | 394 | timer_setup(&channel->tx_timer, xlgmac_tx_timer, 0); |
395 | (unsigned long)channel); | ||
396 | } | 395 | } |
397 | } | 396 | } |
398 | 397 | ||
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index cd1185e66133..b432a75fb874 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c | |||
@@ -765,9 +765,9 @@ int cpsw_ale_control_get(struct cpsw_ale *ale, int port, int control) | |||
765 | } | 765 | } |
766 | EXPORT_SYMBOL_GPL(cpsw_ale_control_get); | 766 | EXPORT_SYMBOL_GPL(cpsw_ale_control_get); |
767 | 767 | ||
768 | static void cpsw_ale_timer(unsigned long arg) | 768 | static void cpsw_ale_timer(struct timer_list *t) |
769 | { | 769 | { |
770 | struct cpsw_ale *ale = (struct cpsw_ale *)arg; | 770 | struct cpsw_ale *ale = from_timer(ale, t, timer); |
771 | 771 | ||
772 | cpsw_ale_control_set(ale, 0, ALE_AGEOUT, 1); | 772 | cpsw_ale_control_set(ale, 0, ALE_AGEOUT, 1); |
773 | 773 | ||
@@ -859,7 +859,7 @@ void cpsw_ale_start(struct cpsw_ale *ale) | |||
859 | cpsw_ale_control_set(ale, 0, ALE_ENABLE, 1); | 859 | cpsw_ale_control_set(ale, 0, ALE_ENABLE, 1); |
860 | cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1); | 860 | cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1); |
861 | 861 | ||
862 | setup_timer(&ale->timer, cpsw_ale_timer, (unsigned long)ale); | 862 | timer_setup(&ale->timer, cpsw_ale_timer, 0); |
863 | if (ale->ageout) { | 863 | if (ale->ageout) { |
864 | ale->timer.expires = jiffies + ale->ageout; | 864 | ale->timer.expires = jiffies + ale->ageout; |
865 | add_timer(&ale->timer); | 865 | add_timer(&ale->timer); |
diff --git a/drivers/net/ethernet/ti/netcp_ethss.c b/drivers/net/ethernet/ti/netcp_ethss.c index 4ad821655e51..e831c49713ee 100644 --- a/drivers/net/ethernet/ti/netcp_ethss.c +++ b/drivers/net/ethernet/ti/netcp_ethss.c | |||
@@ -2745,9 +2745,9 @@ static int gbe_ioctl(void *intf_priv, struct ifreq *req, int cmd) | |||
2745 | return -EOPNOTSUPP; | 2745 | return -EOPNOTSUPP; |
2746 | } | 2746 | } |
2747 | 2747 | ||
2748 | static void netcp_ethss_timer(unsigned long arg) | 2748 | static void netcp_ethss_timer(struct timer_list *t) |
2749 | { | 2749 | { |
2750 | struct gbe_priv *gbe_dev = (struct gbe_priv *)arg; | 2750 | struct gbe_priv *gbe_dev = from_timer(gbe_dev, t, timer); |
2751 | struct gbe_intf *gbe_intf; | 2751 | struct gbe_intf *gbe_intf; |
2752 | struct gbe_slave *slave; | 2752 | struct gbe_slave *slave; |
2753 | 2753 | ||
@@ -3616,8 +3616,7 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev, | |||
3616 | } | 3616 | } |
3617 | spin_unlock_bh(&gbe_dev->hw_stats_lock); | 3617 | spin_unlock_bh(&gbe_dev->hw_stats_lock); |
3618 | 3618 | ||
3619 | setup_timer(&gbe_dev->timer, netcp_ethss_timer, | 3619 | timer_setup(&gbe_dev->timer, netcp_ethss_timer, 0); |
3620 | (unsigned long)gbe_dev); | ||
3621 | gbe_dev->timer.expires = jiffies + GBE_TIMER_INTERVAL; | 3620 | gbe_dev->timer.expires = jiffies + GBE_TIMER_INTERVAL; |
3622 | add_timer(&gbe_dev->timer); | 3621 | add_timer(&gbe_dev->timer); |
3623 | *inst_priv = gbe_dev; | 3622 | *inst_priv = gbe_dev; |
diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c index a913538d3213..d925b8203996 100644 --- a/drivers/net/ethernet/toshiba/spider_net.c +++ b/drivers/net/ethernet/toshiba/spider_net.c | |||
@@ -912,8 +912,9 @@ spider_net_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
912 | * packets, including updating the queue tail pointer. | 912 | * packets, including updating the queue tail pointer. |
913 | */ | 913 | */ |
914 | static void | 914 | static void |
915 | spider_net_cleanup_tx_ring(struct spider_net_card *card) | 915 | spider_net_cleanup_tx_ring(struct timer_list *t) |
916 | { | 916 | { |
917 | struct spider_net_card *card = from_timer(card, t, tx_timer); | ||
917 | if ((spider_net_release_tx_chain(card, 0) != 0) && | 918 | if ((spider_net_release_tx_chain(card, 0) != 0) && |
918 | (card->netdev->flags & IFF_UP)) { | 919 | (card->netdev->flags & IFF_UP)) { |
919 | spider_net_kick_tx_dma(card); | 920 | spider_net_kick_tx_dma(card); |
@@ -1265,7 +1266,7 @@ static int spider_net_poll(struct napi_struct *napi, int budget) | |||
1265 | spider_net_refill_rx_chain(card); | 1266 | spider_net_refill_rx_chain(card); |
1266 | spider_net_enable_rxdmac(card); | 1267 | spider_net_enable_rxdmac(card); |
1267 | 1268 | ||
1268 | spider_net_cleanup_tx_ring(card); | 1269 | spider_net_cleanup_tx_ring(&card->tx_timer); |
1269 | 1270 | ||
1270 | /* if all packets are in the stack, enable interrupts and return 0 */ | 1271 | /* if all packets are in the stack, enable interrupts and return 0 */ |
1271 | /* if not, return 1 */ | 1272 | /* if not, return 1 */ |
@@ -1977,9 +1978,9 @@ init_firmware_failed: | |||
1977 | * @data: used for pointer to card structure | 1978 | * @data: used for pointer to card structure |
1978 | * | 1979 | * |
1979 | */ | 1980 | */ |
1980 | static void spider_net_link_phy(unsigned long data) | 1981 | static void spider_net_link_phy(struct timer_list *t) |
1981 | { | 1982 | { |
1982 | struct spider_net_card *card = (struct spider_net_card *)data; | 1983 | struct spider_net_card *card = from_timer(card, t, aneg_timer); |
1983 | struct mii_phy *phy = &card->phy; | 1984 | struct mii_phy *phy = &card->phy; |
1984 | 1985 | ||
1985 | /* if link didn't come up after SPIDER_NET_ANEG_TIMEOUT tries, setup phy again */ | 1986 | /* if link didn't come up after SPIDER_NET_ANEG_TIMEOUT tries, setup phy again */ |
@@ -2256,14 +2257,11 @@ spider_net_setup_netdev(struct spider_net_card *card) | |||
2256 | 2257 | ||
2257 | pci_set_drvdata(card->pdev, netdev); | 2258 | pci_set_drvdata(card->pdev, netdev); |
2258 | 2259 | ||
2259 | setup_timer(&card->tx_timer, | 2260 | timer_setup(&card->tx_timer, spider_net_cleanup_tx_ring, 0); |
2260 | (void(*)(unsigned long))spider_net_cleanup_tx_ring, | ||
2261 | (unsigned long)card); | ||
2262 | netdev->irq = card->pdev->irq; | 2261 | netdev->irq = card->pdev->irq; |
2263 | 2262 | ||
2264 | card->aneg_count = 0; | 2263 | card->aneg_count = 0; |
2265 | setup_timer(&card->aneg_timer, spider_net_link_phy, | 2264 | timer_setup(&card->aneg_timer, spider_net_link_phy, 0); |
2266 | (unsigned long)card); | ||
2267 | 2265 | ||
2268 | netif_napi_add(netdev, &card->napi, | 2266 | netif_napi_add(netdev, &card->napi, |
2269 | spider_net_poll, SPIDER_NET_NAPI_WEIGHT); | 2267 | spider_net_poll, SPIDER_NET_NAPI_WEIGHT); |
diff --git a/drivers/net/slip/slip.c b/drivers/net/slip/slip.c index eb8a18991d8c..cc63102ca96e 100644 --- a/drivers/net/slip/slip.c +++ b/drivers/net/slip/slip.c | |||
@@ -106,8 +106,8 @@ static int slip_esc6(unsigned char *p, unsigned char *d, int len); | |||
106 | static void slip_unesc6(struct slip *sl, unsigned char c); | 106 | static void slip_unesc6(struct slip *sl, unsigned char c); |
107 | #endif | 107 | #endif |
108 | #ifdef CONFIG_SLIP_SMART | 108 | #ifdef CONFIG_SLIP_SMART |
109 | static void sl_keepalive(unsigned long sls); | 109 | static void sl_keepalive(struct timer_list *t); |
110 | static void sl_outfill(unsigned long sls); | 110 | static void sl_outfill(struct timer_list *t); |
111 | static int sl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); | 111 | static int sl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
112 | #endif | 112 | #endif |
113 | 113 | ||
@@ -763,8 +763,8 @@ static struct slip *sl_alloc(dev_t line) | |||
763 | sl->mode = SL_MODE_DEFAULT; | 763 | sl->mode = SL_MODE_DEFAULT; |
764 | #ifdef CONFIG_SLIP_SMART | 764 | #ifdef CONFIG_SLIP_SMART |
765 | /* initialize timer_list struct */ | 765 | /* initialize timer_list struct */ |
766 | setup_timer(&sl->keepalive_timer, sl_keepalive, (unsigned long)sl); | 766 | timer_setup(&sl->keepalive_timer, sl_keepalive, 0); |
767 | setup_timer(&sl->outfill_timer, sl_outfill, (unsigned long)sl); | 767 | timer_setup(&sl->outfill_timer, sl_outfill, 0); |
768 | #endif | 768 | #endif |
769 | slip_devs[i] = dev; | 769 | slip_devs[i] = dev; |
770 | return sl; | 770 | return sl; |
@@ -1388,9 +1388,9 @@ module_exit(slip_exit); | |||
1388 | * added by Stanislav Voronyi. All changes before marked VSV | 1388 | * added by Stanislav Voronyi. All changes before marked VSV |
1389 | */ | 1389 | */ |
1390 | 1390 | ||
1391 | static void sl_outfill(unsigned long sls) | 1391 | static void sl_outfill(struct timer_list *t) |
1392 | { | 1392 | { |
1393 | struct slip *sl = (struct slip *)sls; | 1393 | struct slip *sl = from_timer(sl, t, outfill_timer); |
1394 | 1394 | ||
1395 | spin_lock(&sl->lock); | 1395 | spin_lock(&sl->lock); |
1396 | 1396 | ||
@@ -1419,9 +1419,9 @@ out: | |||
1419 | spin_unlock(&sl->lock); | 1419 | spin_unlock(&sl->lock); |
1420 | } | 1420 | } |
1421 | 1421 | ||
1422 | static void sl_keepalive(unsigned long sls) | 1422 | static void sl_keepalive(struct timer_list *t) |
1423 | { | 1423 | { |
1424 | struct slip *sl = (struct slip *)sls; | 1424 | struct slip *sl = from_timer(sl, t, keepalive_timer); |
1425 | 1425 | ||
1426 | spin_lock(&sl->lock); | 1426 | spin_lock(&sl->lock); |
1427 | 1427 | ||
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 5a2ea78a008f..c3af08f24679 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -444,9 +444,9 @@ static void tun_flow_delete_by_queue(struct tun_struct *tun, u16 queue_index) | |||
444 | spin_unlock_bh(&tun->lock); | 444 | spin_unlock_bh(&tun->lock); |
445 | } | 445 | } |
446 | 446 | ||
447 | static void tun_flow_cleanup(unsigned long data) | 447 | static void tun_flow_cleanup(struct timer_list *t) |
448 | { | 448 | { |
449 | struct tun_struct *tun = (struct tun_struct *)data; | 449 | struct tun_struct *tun = from_timer(tun, t, flow_gc_timer); |
450 | unsigned long delay = tun->ageing_time; | 450 | unsigned long delay = tun->ageing_time; |
451 | unsigned long next_timer = jiffies + delay; | 451 | unsigned long next_timer = jiffies + delay; |
452 | unsigned long count = 0; | 452 | unsigned long count = 0; |
@@ -1196,7 +1196,9 @@ static void tun_flow_init(struct tun_struct *tun) | |||
1196 | INIT_HLIST_HEAD(&tun->flows[i]); | 1196 | INIT_HLIST_HEAD(&tun->flows[i]); |
1197 | 1197 | ||
1198 | tun->ageing_time = TUN_FLOW_EXPIRE; | 1198 | tun->ageing_time = TUN_FLOW_EXPIRE; |
1199 | setup_timer(&tun->flow_gc_timer, tun_flow_cleanup, (unsigned long)tun); | 1199 | timer_setup(&tun->flow_gc_timer, tun_flow_cleanup, 0); |
1200 | mod_timer(&tun->flow_gc_timer, | ||
1201 | round_jiffies_up(jiffies + tun->ageing_time)); | ||
1200 | } | 1202 | } |
1201 | 1203 | ||
1202 | static void tun_flow_uninit(struct tun_struct *tun) | 1204 | static void tun_flow_uninit(struct tun_struct *tun) |
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c index c7721c729541..afeca6bcdade 100644 --- a/drivers/net/wan/hdlc_ppp.c +++ b/drivers/net/wan/hdlc_ppp.c | |||
@@ -558,9 +558,9 @@ out: | |||
558 | return NET_RX_DROP; | 558 | return NET_RX_DROP; |
559 | } | 559 | } |
560 | 560 | ||
561 | static void ppp_timer(unsigned long arg) | 561 | static void ppp_timer(struct timer_list *t) |
562 | { | 562 | { |
563 | struct proto *proto = (struct proto *)arg; | 563 | struct proto *proto = from_timer(proto, t, timer); |
564 | struct ppp *ppp = get_ppp(proto->dev); | 564 | struct ppp *ppp = get_ppp(proto->dev); |
565 | unsigned long flags; | 565 | unsigned long flags; |
566 | 566 | ||
@@ -610,7 +610,7 @@ static void ppp_start(struct net_device *dev) | |||
610 | for (i = 0; i < IDX_COUNT; i++) { | 610 | for (i = 0; i < IDX_COUNT; i++) { |
611 | struct proto *proto = &ppp->protos[i]; | 611 | struct proto *proto = &ppp->protos[i]; |
612 | proto->dev = dev; | 612 | proto->dev = dev; |
613 | setup_timer(&proto->timer, ppp_timer, (unsigned long)proto); | 613 | timer_setup(&proto->timer, ppp_timer, 0); |
614 | proto->state = CLOSED; | 614 | proto->state = CLOSED; |
615 | } | 615 | } |
616 | ppp->protos[IDX_LCP].pid = PID_LCP; | 616 | ppp->protos[IDX_LCP].pid = PID_LCP; |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c index 3559fb5b8fb0..03aae6bc1838 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | |||
@@ -280,9 +280,9 @@ static void brcmf_btcoex_restore_part1(struct brcmf_btcoex_info *btci) | |||
280 | /** | 280 | /** |
281 | * brcmf_btcoex_timerfunc() - BT coex timer callback | 281 | * brcmf_btcoex_timerfunc() - BT coex timer callback |
282 | */ | 282 | */ |
283 | static void brcmf_btcoex_timerfunc(ulong data) | 283 | static void brcmf_btcoex_timerfunc(struct timer_list *t) |
284 | { | 284 | { |
285 | struct brcmf_btcoex_info *bt_local = (struct brcmf_btcoex_info *)data; | 285 | struct brcmf_btcoex_info *bt_local = from_timer(bt_local, t, timer); |
286 | brcmf_dbg(TRACE, "enter\n"); | 286 | brcmf_dbg(TRACE, "enter\n"); |
287 | 287 | ||
288 | bt_local->timer_on = false; | 288 | bt_local->timer_on = false; |
@@ -380,7 +380,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg) | |||
380 | /* Set up timer for BT */ | 380 | /* Set up timer for BT */ |
381 | btci->timer_on = false; | 381 | btci->timer_on = false; |
382 | btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME; | 382 | btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME; |
383 | setup_timer(&btci->timer, brcmf_btcoex_timerfunc, (ulong)btci); | 383 | timer_setup(&btci->timer, brcmf_btcoex_timerfunc, 0); |
384 | btci->cfg = cfg; | 384 | btci->cfg = cfg; |
385 | btci->saved_regs_part1 = false; | 385 | btci->saved_regs_part1 = false; |
386 | btci->saved_regs_part2 = false; | 386 | btci->saved_regs_part2 = false; |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 6e70df978159..15fa00d79fc6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | |||
@@ -2983,10 +2983,10 @@ static void brcmf_cfg80211_escan_timeout_worker(struct work_struct *work) | |||
2983 | brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true); | 2983 | brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true); |
2984 | } | 2984 | } |
2985 | 2985 | ||
2986 | static void brcmf_escan_timeout(unsigned long data) | 2986 | static void brcmf_escan_timeout(struct timer_list *t) |
2987 | { | 2987 | { |
2988 | struct brcmf_cfg80211_info *cfg = | 2988 | struct brcmf_cfg80211_info *cfg = |
2989 | (struct brcmf_cfg80211_info *)data; | 2989 | from_timer(cfg, t, escan_timeout); |
2990 | 2990 | ||
2991 | if (cfg->int_escan_map || cfg->scan_request) { | 2991 | if (cfg->int_escan_map || cfg->scan_request) { |
2992 | brcmf_err("timer expired\n"); | 2992 | brcmf_err("timer expired\n"); |
@@ -3150,8 +3150,7 @@ static void brcmf_init_escan(struct brcmf_cfg80211_info *cfg) | |||
3150 | brcmf_cfg80211_escan_handler); | 3150 | brcmf_cfg80211_escan_handler); |
3151 | cfg->escan_info.escan_state = WL_ESCAN_STATE_IDLE; | 3151 | cfg->escan_info.escan_state = WL_ESCAN_STATE_IDLE; |
3152 | /* Init scan_timeout timer */ | 3152 | /* Init scan_timeout timer */ |
3153 | setup_timer(&cfg->escan_timeout, brcmf_escan_timeout, | 3153 | timer_setup(&cfg->escan_timeout, brcmf_escan_timeout, 0); |
3154 | (unsigned long)cfg); | ||
3155 | INIT_WORK(&cfg->escan_timeout_work, | 3154 | INIT_WORK(&cfg->escan_timeout_work, |
3156 | brcmf_cfg80211_escan_timeout_worker); | 3155 | brcmf_cfg80211_escan_timeout_worker); |
3157 | } | 3156 | } |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index e3495ea95553..310c4e2746aa 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | |||
@@ -3972,9 +3972,9 @@ brcmf_sdio_watchdog_thread(void *data) | |||
3972 | } | 3972 | } |
3973 | 3973 | ||
3974 | static void | 3974 | static void |
3975 | brcmf_sdio_watchdog(unsigned long data) | 3975 | brcmf_sdio_watchdog(struct timer_list *t) |
3976 | { | 3976 | { |
3977 | struct brcmf_sdio *bus = (struct brcmf_sdio *)data; | 3977 | struct brcmf_sdio *bus = from_timer(bus, t, timer); |
3978 | 3978 | ||
3979 | if (bus->watchdog_tsk) { | 3979 | if (bus->watchdog_tsk) { |
3980 | complete(&bus->watchdog_wait); | 3980 | complete(&bus->watchdog_wait); |
@@ -4169,8 +4169,7 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) | |||
4169 | init_waitqueue_head(&bus->dcmd_resp_wait); | 4169 | init_waitqueue_head(&bus->dcmd_resp_wait); |
4170 | 4170 | ||
4171 | /* Set up the watchdog timer */ | 4171 | /* Set up the watchdog timer */ |
4172 | setup_timer(&bus->timer, brcmf_sdio_watchdog, | 4172 | timer_setup(&bus->timer, brcmf_sdio_watchdog, 0); |
4173 | (unsigned long)bus); | ||
4174 | /* Initialize watchdog thread */ | 4173 | /* Initialize watchdog thread */ |
4175 | init_completion(&bus->watchdog_wait); | 4174 | init_completion(&bus->watchdog_wait); |
4176 | bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread, | 4175 | bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread, |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c index 2acd94da9efe..d11d72615de2 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c | |||
@@ -399,9 +399,9 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear) | |||
399 | * was received. We need to ensure we receive the statistics in order | 399 | * was received. We need to ensure we receive the statistics in order |
400 | * to update the temperature used for calibrating the TXPOWER. | 400 | * to update the temperature used for calibrating the TXPOWER. |
401 | */ | 401 | */ |
402 | static void iwl_bg_statistics_periodic(unsigned long data) | 402 | static void iwl_bg_statistics_periodic(struct timer_list *t) |
403 | { | 403 | { |
404 | struct iwl_priv *priv = (struct iwl_priv *)data; | 404 | struct iwl_priv *priv = from_timer(priv, t, statistics_periodic); |
405 | 405 | ||
406 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 406 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
407 | return; | 407 | return; |
@@ -556,9 +556,9 @@ static void iwl_continuous_event_trace(struct iwl_priv *priv) | |||
556 | * this function is to perform continuous uCode event logging operation | 556 | * this function is to perform continuous uCode event logging operation |
557 | * if enabled | 557 | * if enabled |
558 | */ | 558 | */ |
559 | static void iwl_bg_ucode_trace(unsigned long data) | 559 | static void iwl_bg_ucode_trace(struct timer_list *t) |
560 | { | 560 | { |
561 | struct iwl_priv *priv = (struct iwl_priv *)data; | 561 | struct iwl_priv *priv = from_timer(priv, t, ucode_trace); |
562 | 562 | ||
563 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 563 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
564 | return; | 564 | return; |
@@ -1085,11 +1085,9 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
1085 | if (priv->lib->bt_params) | 1085 | if (priv->lib->bt_params) |
1086 | iwlagn_bt_setup_deferred_work(priv); | 1086 | iwlagn_bt_setup_deferred_work(priv); |
1087 | 1087 | ||
1088 | setup_timer(&priv->statistics_periodic, iwl_bg_statistics_periodic, | 1088 | timer_setup(&priv->statistics_periodic, iwl_bg_statistics_periodic, 0); |
1089 | (unsigned long)priv); | ||
1090 | 1089 | ||
1091 | setup_timer(&priv->ucode_trace, iwl_bg_ucode_trace, | 1090 | timer_setup(&priv->ucode_trace, iwl_bg_ucode_trace, 0); |
1092 | (unsigned long)priv); | ||
1093 | } | 1091 | } |
1094 | 1092 | ||
1095 | void iwl_cancel_deferred_work(struct iwl_priv *priv) | 1093 | void iwl_cancel_deferred_work(struct iwl_priv *priv) |
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c index b5c459cd70ce..fed6d842a5e1 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c | |||
@@ -147,9 +147,9 @@ void iwl_pcie_free_dma_ptr(struct iwl_trans *trans, struct iwl_dma_ptr *ptr) | |||
147 | memset(ptr, 0, sizeof(*ptr)); | 147 | memset(ptr, 0, sizeof(*ptr)); |
148 | } | 148 | } |
149 | 149 | ||
150 | static void iwl_pcie_txq_stuck_timer(unsigned long data) | 150 | static void iwl_pcie_txq_stuck_timer(struct timer_list *t) |
151 | { | 151 | { |
152 | struct iwl_txq *txq = (void *)data; | 152 | struct iwl_txq *txq = from_timer(txq, t, stuck_timer); |
153 | struct iwl_trans_pcie *trans_pcie = txq->trans_pcie; | 153 | struct iwl_trans_pcie *trans_pcie = txq->trans_pcie; |
154 | struct iwl_trans *trans = iwl_trans_pcie_get_trans(trans_pcie); | 154 | struct iwl_trans *trans = iwl_trans_pcie_get_trans(trans_pcie); |
155 | 155 | ||
@@ -495,8 +495,7 @@ int iwl_pcie_txq_alloc(struct iwl_trans *trans, struct iwl_txq *txq, | |||
495 | if (WARN_ON(txq->entries || txq->tfds)) | 495 | if (WARN_ON(txq->entries || txq->tfds)) |
496 | return -EINVAL; | 496 | return -EINVAL; |
497 | 497 | ||
498 | setup_timer(&txq->stuck_timer, iwl_pcie_txq_stuck_timer, | 498 | timer_setup(&txq->stuck_timer, iwl_pcie_txq_stuck_timer, 0); |
499 | (unsigned long)txq); | ||
500 | txq->trans_pcie = trans_pcie; | 499 | txq->trans_pcie = trans_pcie; |
501 | 500 | ||
502 | txq->n_window = slots_num; | 501 | txq->n_window = slots_num; |
diff --git a/drivers/net/wireless/intersil/hostap/hostap_ap.c b/drivers/net/wireless/intersil/hostap/hostap_ap.c index f9d047314692..b4dfe1893d18 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_ap.c +++ b/drivers/net/wireless/intersil/hostap/hostap_ap.c | |||
@@ -185,9 +185,9 @@ static void hostap_event_expired_sta(struct net_device *dev, | |||
185 | 185 | ||
186 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | 186 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT |
187 | 187 | ||
188 | static void ap_handle_timer(unsigned long data) | 188 | static void ap_handle_timer(struct timer_list *t) |
189 | { | 189 | { |
190 | struct sta_info *sta = (struct sta_info *) data; | 190 | struct sta_info *sta = from_timer(sta, t, timer); |
191 | local_info_t *local; | 191 | local_info_t *local; |
192 | struct ap_data *ap; | 192 | struct ap_data *ap; |
193 | unsigned long next_time = 0; | 193 | unsigned long next_time = 0; |
@@ -1189,7 +1189,7 @@ static struct sta_info * ap_add_sta(struct ap_data *ap, u8 *addr) | |||
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT | 1191 | #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT |
1192 | setup_timer(&sta->timer, ap_handle_timer, (unsigned long)sta); | 1192 | timer_setup(&sta->timer, ap_handle_timer, 0); |
1193 | sta->timer.expires = jiffies + ap->max_inactivity; | 1193 | sta->timer.expires = jiffies + ap->max_inactivity; |
1194 | if (!ap->local->hostapd) | 1194 | if (!ap->local->hostapd) |
1195 | add_timer(&sta->timer); | 1195 | add_timer(&sta->timer); |
diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index 8177fd6f65c1..5c4a17a18968 100644 --- a/drivers/net/wireless/intersil/hostap/hostap_hw.c +++ b/drivers/net/wireless/intersil/hostap/hostap_hw.c | |||
@@ -2794,9 +2794,9 @@ static void prism2_check_sta_fw_version(local_info_t *local) | |||
2794 | } | 2794 | } |
2795 | 2795 | ||
2796 | 2796 | ||
2797 | static void hostap_passive_scan(unsigned long data) | 2797 | static void hostap_passive_scan(struct timer_list *t) |
2798 | { | 2798 | { |
2799 | local_info_t *local = (local_info_t *) data; | 2799 | local_info_t *local = from_timer(local, t, passive_scan_timer); |
2800 | struct net_device *dev = local->dev; | 2800 | struct net_device *dev = local->dev; |
2801 | u16 chan; | 2801 | u16 chan; |
2802 | 2802 | ||
@@ -2869,10 +2869,10 @@ static void handle_comms_qual_update(struct work_struct *work) | |||
2869 | * used to monitor that local->last_tick_timer is being updated. If not, | 2869 | * used to monitor that local->last_tick_timer is being updated. If not, |
2870 | * interrupt busy-loop is assumed and driver tries to recover by masking out | 2870 | * interrupt busy-loop is assumed and driver tries to recover by masking out |
2871 | * some events. */ | 2871 | * some events. */ |
2872 | static void hostap_tick_timer(unsigned long data) | 2872 | static void hostap_tick_timer(struct timer_list *t) |
2873 | { | 2873 | { |
2874 | static unsigned long last_inquire = 0; | 2874 | static unsigned long last_inquire = 0; |
2875 | local_info_t *local = (local_info_t *) data; | 2875 | local_info_t *local = from_timer(local, t, tick_timer); |
2876 | local->last_tick_timer = jiffies; | 2876 | local->last_tick_timer = jiffies; |
2877 | 2877 | ||
2878 | /* Inquire CommTallies every 10 seconds to keep the statistics updated | 2878 | /* Inquire CommTallies every 10 seconds to keep the statistics updated |
@@ -3225,10 +3225,8 @@ while (0) | |||
3225 | 3225 | ||
3226 | lib80211_crypt_info_init(&local->crypt_info, dev->name, &local->lock); | 3226 | lib80211_crypt_info_init(&local->crypt_info, dev->name, &local->lock); |
3227 | 3227 | ||
3228 | setup_timer(&local->passive_scan_timer, hostap_passive_scan, | 3228 | timer_setup(&local->passive_scan_timer, hostap_passive_scan, 0); |
3229 | (unsigned long)local); | 3229 | timer_setup(&local->tick_timer, hostap_tick_timer, 0); |
3230 | setup_timer(&local->tick_timer, hostap_tick_timer, | ||
3231 | (unsigned long)local); | ||
3232 | local->tick_timer.expires = jiffies + 2 * HZ; | 3230 | local->tick_timer.expires = jiffies + 2 * HZ; |
3233 | add_timer(&local->tick_timer); | 3231 | add_timer(&local->tick_timer); |
3234 | 3232 | ||
diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c index 501180584b4b..94ad6fe29e69 100644 --- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c | |||
@@ -319,9 +319,9 @@ static inline void ezusb_mod_timer(struct ezusb_priv *upriv, | |||
319 | mod_timer(timer, expire); | 319 | mod_timer(timer, expire); |
320 | } | 320 | } |
321 | 321 | ||
322 | static void ezusb_request_timerfn(u_long _ctx) | 322 | static void ezusb_request_timerfn(struct timer_list *t) |
323 | { | 323 | { |
324 | struct request_context *ctx = (void *) _ctx; | 324 | struct request_context *ctx = from_timer(ctx, t, timer); |
325 | 325 | ||
326 | ctx->outurb->transfer_flags |= URB_ASYNC_UNLINK; | 326 | ctx->outurb->transfer_flags |= URB_ASYNC_UNLINK; |
327 | if (usb_unlink_urb(ctx->outurb) == -EINPROGRESS) { | 327 | if (usb_unlink_urb(ctx->outurb) == -EINPROGRESS) { |
@@ -365,7 +365,7 @@ static struct request_context *ezusb_alloc_ctx(struct ezusb_priv *upriv, | |||
365 | refcount_set(&ctx->refcount, 1); | 365 | refcount_set(&ctx->refcount, 1); |
366 | init_completion(&ctx->done); | 366 | init_completion(&ctx->done); |
367 | 367 | ||
368 | setup_timer(&ctx->timer, ezusb_request_timerfn, (u_long)ctx); | 368 | timer_setup(&ctx->timer, ezusb_request_timerfn, 0); |
369 | return ctx; | 369 | return ctx; |
370 | } | 370 | } |
371 | 371 | ||
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 2d2c1ea65cb2..3423dc51198b 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c | |||
@@ -288,7 +288,7 @@ static struct qtnf_wmac *qtnf_core_mac_alloc(struct qtnf_bus *bus, | |||
288 | mac->iflist[i].vifid = i; | 288 | mac->iflist[i].vifid = i; |
289 | qtnf_sta_list_init(&mac->iflist[i].sta_list); | 289 | qtnf_sta_list_init(&mac->iflist[i].sta_list); |
290 | mutex_init(&mac->mac_lock); | 290 | mutex_init(&mac->mac_lock); |
291 | setup_timer(&mac->scan_timeout, NULL, 0); | 291 | timer_setup(&mac->scan_timeout, NULL, 0); |
292 | } | 292 | } |
293 | 293 | ||
294 | qtnf_mac_init_primary_intf(mac); | 294 | qtnf_mac_init_primary_intf(mac); |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index c346c021b999..d47921a84509 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -196,9 +196,9 @@ out: | |||
196 | mutex_unlock(&wl->mutex); | 196 | mutex_unlock(&wl->mutex); |
197 | } | 197 | } |
198 | 198 | ||
199 | static void wl1271_rx_streaming_timer(unsigned long data) | 199 | static void wl1271_rx_streaming_timer(struct timer_list *t) |
200 | { | 200 | { |
201 | struct wl12xx_vif *wlvif = (struct wl12xx_vif *)data; | 201 | struct wl12xx_vif *wlvif = from_timer(wlvif, t, rx_streaming_timer); |
202 | struct wl1271 *wl = wlvif->wl; | 202 | struct wl1271 *wl = wlvif->wl; |
203 | ieee80211_queue_work(wl->hw, &wlvif->rx_streaming_disable_work); | 203 | ieee80211_queue_work(wl->hw, &wlvif->rx_streaming_disable_work); |
204 | } | 204 | } |
@@ -2279,8 +2279,7 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif) | |||
2279 | wlcore_pending_auth_complete_work); | 2279 | wlcore_pending_auth_complete_work); |
2280 | INIT_LIST_HEAD(&wlvif->list); | 2280 | INIT_LIST_HEAD(&wlvif->list); |
2281 | 2281 | ||
2282 | setup_timer(&wlvif->rx_streaming_timer, wl1271_rx_streaming_timer, | 2282 | timer_setup(&wlvif->rx_streaming_timer, wl1271_rx_streaming_timer, 0); |
2283 | (unsigned long) wlvif); | ||
2284 | return 0; | 2283 | return 0; |
2285 | } | 2284 | } |
2286 | 2285 | ||
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 8b8689c6d887..18c85e55e76a 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -228,9 +228,9 @@ static bool xennet_can_sg(struct net_device *dev) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | 230 | ||
231 | static void rx_refill_timeout(unsigned long data) | 231 | static void rx_refill_timeout(struct timer_list *t) |
232 | { | 232 | { |
233 | struct netfront_queue *queue = (struct netfront_queue *)data; | 233 | struct netfront_queue *queue = from_timer(queue, t, rx_refill_timer); |
234 | napi_schedule(&queue->napi); | 234 | napi_schedule(&queue->napi); |
235 | } | 235 | } |
236 | 236 | ||
@@ -1605,8 +1605,7 @@ static int xennet_init_queue(struct netfront_queue *queue) | |||
1605 | spin_lock_init(&queue->tx_lock); | 1605 | spin_lock_init(&queue->tx_lock); |
1606 | spin_lock_init(&queue->rx_lock); | 1606 | spin_lock_init(&queue->rx_lock); |
1607 | 1607 | ||
1608 | setup_timer(&queue->rx_refill_timer, rx_refill_timeout, | 1608 | timer_setup(&queue->rx_refill_timer, rx_refill_timeout, 0); |
1609 | (unsigned long)queue); | ||
1610 | 1609 | ||
1611 | snprintf(queue->name, sizeof(queue->name), "%s-q%u", | 1610 | snprintf(queue->name, sizeof(queue->name), "%s-q%u", |
1612 | queue->info->netdev->name, queue->id); | 1611 | queue->info->netdev->name, queue->id); |
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index 2effa5ff7082..a0cc1cc45292 100644 --- a/drivers/nfc/pn533/pn533.c +++ b/drivers/nfc/pn533/pn533.c | |||
@@ -1232,9 +1232,9 @@ static int pn533_init_target_complete(struct pn533 *dev, struct sk_buff *resp) | |||
1232 | return 0; | 1232 | return 0; |
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | static void pn533_listen_mode_timer(unsigned long data) | 1235 | static void pn533_listen_mode_timer(struct timer_list *t) |
1236 | { | 1236 | { |
1237 | struct pn533 *dev = (struct pn533 *)data; | 1237 | struct pn533 *dev = from_timer(dev, t, listen_timer); |
1238 | 1238 | ||
1239 | dev_dbg(dev->dev, "Listen mode timeout\n"); | 1239 | dev_dbg(dev->dev, "Listen mode timeout\n"); |
1240 | 1240 | ||
@@ -2632,8 +2632,7 @@ struct pn533 *pn533_register_device(u32 device_type, | |||
2632 | if (priv->wq == NULL) | 2632 | if (priv->wq == NULL) |
2633 | goto error; | 2633 | goto error; |
2634 | 2634 | ||
2635 | setup_timer(&priv->listen_timer, pn533_listen_mode_timer, | 2635 | timer_setup(&priv->listen_timer, pn533_listen_mode_timer, 0); |
2636 | (unsigned long)priv); | ||
2637 | 2636 | ||
2638 | skb_queue_head_init(&priv->resp_q); | 2637 | skb_queue_head_init(&priv->resp_q); |
2639 | skb_queue_head_init(&priv->fragment_skb); | 2638 | skb_queue_head_init(&priv->fragment_skb); |
diff --git a/drivers/nfc/st-nci/ndlc.c b/drivers/nfc/st-nci/ndlc.c index 93a7536a9af9..f26d938d240f 100644 --- a/drivers/nfc/st-nci/ndlc.c +++ b/drivers/nfc/st-nci/ndlc.c | |||
@@ -246,18 +246,18 @@ void ndlc_recv(struct llt_ndlc *ndlc, struct sk_buff *skb) | |||
246 | } | 246 | } |
247 | EXPORT_SYMBOL(ndlc_recv); | 247 | EXPORT_SYMBOL(ndlc_recv); |
248 | 248 | ||
249 | static void ndlc_t1_timeout(unsigned long data) | 249 | static void ndlc_t1_timeout(struct timer_list *t) |
250 | { | 250 | { |
251 | struct llt_ndlc *ndlc = (struct llt_ndlc *)data; | 251 | struct llt_ndlc *ndlc = from_timer(ndlc, t, t1_timer); |
252 | 252 | ||
253 | pr_debug("\n"); | 253 | pr_debug("\n"); |
254 | 254 | ||
255 | schedule_work(&ndlc->sm_work); | 255 | schedule_work(&ndlc->sm_work); |
256 | } | 256 | } |
257 | 257 | ||
258 | static void ndlc_t2_timeout(unsigned long data) | 258 | static void ndlc_t2_timeout(struct timer_list *t) |
259 | { | 259 | { |
260 | struct llt_ndlc *ndlc = (struct llt_ndlc *)data; | 260 | struct llt_ndlc *ndlc = from_timer(ndlc, t, t2_timer); |
261 | 261 | ||
262 | pr_debug("\n"); | 262 | pr_debug("\n"); |
263 | 263 | ||
@@ -282,8 +282,8 @@ int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev, | |||
282 | *ndlc_id = ndlc; | 282 | *ndlc_id = ndlc; |
283 | 283 | ||
284 | /* initialize timers */ | 284 | /* initialize timers */ |
285 | setup_timer(&ndlc->t1_timer, ndlc_t1_timeout, (unsigned long)ndlc); | 285 | timer_setup(&ndlc->t1_timer, ndlc_t1_timeout, 0); |
286 | setup_timer(&ndlc->t2_timer, ndlc_t2_timeout, (unsigned long)ndlc); | 286 | timer_setup(&ndlc->t2_timer, ndlc_t2_timeout, 0); |
287 | 287 | ||
288 | skb_queue_head_init(&ndlc->rcv_q); | 288 | skb_queue_head_init(&ndlc->rcv_q); |
289 | skb_queue_head_init(&ndlc->send_q); | 289 | skb_queue_head_init(&ndlc->send_q); |
diff --git a/drivers/ntb/test/ntb_pingpong.c b/drivers/ntb/test/ntb_pingpong.c index 938a18bcfc3f..3f5a92bae6f8 100644 --- a/drivers/ntb/test/ntb_pingpong.c +++ b/drivers/ntb/test/ntb_pingpong.c | |||
@@ -107,9 +107,9 @@ struct pp_ctx { | |||
107 | 107 | ||
108 | static struct dentry *pp_debugfs_dir; | 108 | static struct dentry *pp_debugfs_dir; |
109 | 109 | ||
110 | static void pp_ping(unsigned long ctx) | 110 | static void pp_ping(struct timer_list *t) |
111 | { | 111 | { |
112 | struct pp_ctx *pp = (void *)ctx; | 112 | struct pp_ctx *pp = from_timer(pp, t, db_timer); |
113 | unsigned long irqflags; | 113 | unsigned long irqflags; |
114 | u64 db_bits, db_mask; | 114 | u64 db_bits, db_mask; |
115 | u32 spad_rd, spad_wr; | 115 | u32 spad_rd, spad_wr; |
@@ -153,7 +153,7 @@ static void pp_link_event(void *ctx) | |||
153 | 153 | ||
154 | if (ntb_link_is_up(pp->ntb, NULL, NULL) == 1) { | 154 | if (ntb_link_is_up(pp->ntb, NULL, NULL) == 1) { |
155 | dev_dbg(&pp->ntb->dev, "link is up\n"); | 155 | dev_dbg(&pp->ntb->dev, "link is up\n"); |
156 | pp_ping((unsigned long)pp); | 156 | pp_ping(&pp->db_timer); |
157 | } else { | 157 | } else { |
158 | dev_dbg(&pp->ntb->dev, "link is down\n"); | 158 | dev_dbg(&pp->ntb->dev, "link is down\n"); |
159 | del_timer(&pp->db_timer); | 159 | del_timer(&pp->db_timer); |
@@ -252,7 +252,7 @@ static int pp_probe(struct ntb_client *client, | |||
252 | pp->db_bits = 0; | 252 | pp->db_bits = 0; |
253 | atomic_set(&pp->count, 0); | 253 | atomic_set(&pp->count, 0); |
254 | spin_lock_init(&pp->db_lock); | 254 | spin_lock_init(&pp->db_lock); |
255 | setup_timer(&pp->db_timer, pp_ping, (unsigned long)pp); | 255 | timer_setup(&pp->db_timer, pp_ping, 0); |
256 | pp->db_delay = msecs_to_jiffies(delay_ms); | 256 | pp->db_delay = msecs_to_jiffies(delay_ms); |
257 | 257 | ||
258 | rc = ntb_set_ctx(ntb, pp, &pp_ops); | 258 | rc = ntb_set_ctx(ntb, pp, &pp_ops); |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 62aa2c37b8d2..935121814c97 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -363,7 +363,7 @@ static int sony_laptop_input_keycode_map[] = { | |||
363 | }; | 363 | }; |
364 | 364 | ||
365 | /* release buttons after a short delay if pressed */ | 365 | /* release buttons after a short delay if pressed */ |
366 | static void do_sony_laptop_release_key(unsigned long unused) | 366 | static void do_sony_laptop_release_key(struct timer_list *unused) |
367 | { | 367 | { |
368 | struct sony_laptop_keypress kp; | 368 | struct sony_laptop_keypress kp; |
369 | unsigned long flags; | 369 | unsigned long flags; |
@@ -470,7 +470,7 @@ static int sony_laptop_setup_input(struct acpi_device *acpi_device) | |||
470 | goto err_dec_users; | 470 | goto err_dec_users; |
471 | } | 471 | } |
472 | 472 | ||
473 | setup_timer(&sony_laptop_input.release_key_timer, | 473 | timer_setup(&sony_laptop_input.release_key_timer, |
474 | do_sony_laptop_release_key, 0); | 474 | do_sony_laptop_release_key, 0); |
475 | 475 | ||
476 | /* input keys */ | 476 | /* input keys */ |
diff --git a/drivers/pps/clients/pps-ktimer.c b/drivers/pps/clients/pps-ktimer.c index 436b4e4e71a1..04735649052a 100644 --- a/drivers/pps/clients/pps-ktimer.c +++ b/drivers/pps/clients/pps-ktimer.c | |||
@@ -39,7 +39,7 @@ static struct timer_list ktimer; | |||
39 | * The kernel timer | 39 | * The kernel timer |
40 | */ | 40 | */ |
41 | 41 | ||
42 | static void pps_ktimer_event(unsigned long ptr) | 42 | static void pps_ktimer_event(struct timer_list *unused) |
43 | { | 43 | { |
44 | struct pps_event_time ts; | 44 | struct pps_event_time ts; |
45 | 45 | ||
@@ -85,7 +85,7 @@ static int __init pps_ktimer_init(void) | |||
85 | return -ENOMEM; | 85 | return -ENOMEM; |
86 | } | 86 | } |
87 | 87 | ||
88 | setup_timer(&ktimer, pps_ktimer_event, 0); | 88 | timer_setup(&ktimer, pps_ktimer_event, 0); |
89 | mod_timer(&ktimer, jiffies + HZ); | 89 | mod_timer(&ktimer, jiffies + HZ); |
90 | 90 | ||
91 | dev_info(pps->dev, "ktimer PPS source registered\n"); | 91 | dev_info(pps->dev, "ktimer PPS source registered\n"); |
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 00efe24a6063..215eac68ae2d 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -71,9 +71,9 @@ static void rtc_uie_task(struct work_struct *work) | |||
71 | if (num) | 71 | if (num) |
72 | rtc_handle_legacy_irq(rtc, num, RTC_UF); | 72 | rtc_handle_legacy_irq(rtc, num, RTC_UF); |
73 | } | 73 | } |
74 | static void rtc_uie_timer(unsigned long data) | 74 | static void rtc_uie_timer(struct timer_list *t) |
75 | { | 75 | { |
76 | struct rtc_device *rtc = (struct rtc_device *)data; | 76 | struct rtc_device *rtc = from_timer(rtc, t, uie_timer); |
77 | unsigned long flags; | 77 | unsigned long flags; |
78 | 78 | ||
79 | spin_lock_irqsave(&rtc->irq_lock, flags); | 79 | spin_lock_irqsave(&rtc->irq_lock, flags); |
@@ -460,7 +460,7 @@ void rtc_dev_prepare(struct rtc_device *rtc) | |||
460 | 460 | ||
461 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL | 461 | #ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL |
462 | INIT_WORK(&rtc->uie_task, rtc_uie_task); | 462 | INIT_WORK(&rtc->uie_task, rtc_uie_task); |
463 | setup_timer(&rtc->uie_timer, rtc_uie_timer, (unsigned long)rtc); | 463 | timer_setup(&rtc->uie_timer, rtc_uie_timer, 0); |
464 | #endif | 464 | #endif |
465 | 465 | ||
466 | cdev_init(&rtc->char_dev, &rtc_dev_fops); | 466 | cdev_init(&rtc->char_dev, &rtc_dev_fops); |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index adba91318768..0f1ff0813493 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -70,8 +70,8 @@ static void do_restore_device(struct work_struct *); | |||
70 | static void do_reload_device(struct work_struct *); | 70 | static void do_reload_device(struct work_struct *); |
71 | static void do_requeue_requests(struct work_struct *); | 71 | static void do_requeue_requests(struct work_struct *); |
72 | static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); | 72 | static void dasd_return_cqr_cb(struct dasd_ccw_req *, void *); |
73 | static void dasd_device_timeout(unsigned long); | 73 | static void dasd_device_timeout(struct timer_list *); |
74 | static void dasd_block_timeout(unsigned long); | 74 | static void dasd_block_timeout(struct timer_list *); |
75 | static void __dasd_process_erp(struct dasd_device *, struct dasd_ccw_req *); | 75 | static void __dasd_process_erp(struct dasd_device *, struct dasd_ccw_req *); |
76 | static void dasd_profile_init(struct dasd_profile *, struct dentry *); | 76 | static void dasd_profile_init(struct dasd_profile *, struct dentry *); |
77 | static void dasd_profile_exit(struct dasd_profile *); | 77 | static void dasd_profile_exit(struct dasd_profile *); |
@@ -119,8 +119,7 @@ struct dasd_device *dasd_alloc_device(void) | |||
119 | (void (*)(unsigned long)) dasd_device_tasklet, | 119 | (void (*)(unsigned long)) dasd_device_tasklet, |
120 | (unsigned long) device); | 120 | (unsigned long) device); |
121 | INIT_LIST_HEAD(&device->ccw_queue); | 121 | INIT_LIST_HEAD(&device->ccw_queue); |
122 | setup_timer(&device->timer, dasd_device_timeout, | 122 | timer_setup(&device->timer, dasd_device_timeout, 0); |
123 | (unsigned long)device); | ||
124 | INIT_WORK(&device->kick_work, do_kick_device); | 123 | INIT_WORK(&device->kick_work, do_kick_device); |
125 | INIT_WORK(&device->restore_device, do_restore_device); | 124 | INIT_WORK(&device->restore_device, do_restore_device); |
126 | INIT_WORK(&device->reload_device, do_reload_device); | 125 | INIT_WORK(&device->reload_device, do_reload_device); |
@@ -162,7 +161,7 @@ struct dasd_block *dasd_alloc_block(void) | |||
162 | (unsigned long) block); | 161 | (unsigned long) block); |
163 | INIT_LIST_HEAD(&block->ccw_queue); | 162 | INIT_LIST_HEAD(&block->ccw_queue); |
164 | spin_lock_init(&block->queue_lock); | 163 | spin_lock_init(&block->queue_lock); |
165 | setup_timer(&block->timer, dasd_block_timeout, (unsigned long)block); | 164 | timer_setup(&block->timer, dasd_block_timeout, 0); |
166 | spin_lock_init(&block->profile.lock); | 165 | spin_lock_init(&block->profile.lock); |
167 | 166 | ||
168 | return block; | 167 | return block; |
@@ -1557,12 +1556,12 @@ EXPORT_SYMBOL(dasd_start_IO); | |||
1557 | * The head of the ccw queue will have status DASD_CQR_IN_IO for 1), | 1556 | * The head of the ccw queue will have status DASD_CQR_IN_IO for 1), |
1558 | * DASD_CQR_QUEUED for 2) and 3). | 1557 | * DASD_CQR_QUEUED for 2) and 3). |
1559 | */ | 1558 | */ |
1560 | static void dasd_device_timeout(unsigned long ptr) | 1559 | static void dasd_device_timeout(struct timer_list *t) |
1561 | { | 1560 | { |
1562 | unsigned long flags; | 1561 | unsigned long flags; |
1563 | struct dasd_device *device; | 1562 | struct dasd_device *device; |
1564 | 1563 | ||
1565 | device = (struct dasd_device *) ptr; | 1564 | device = from_timer(device, t, timer); |
1566 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 1565 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
1567 | /* re-activate request queue */ | 1566 | /* re-activate request queue */ |
1568 | dasd_device_remove_stop_bits(device, DASD_STOPPED_PENDING); | 1567 | dasd_device_remove_stop_bits(device, DASD_STOPPED_PENDING); |
@@ -2625,12 +2624,12 @@ EXPORT_SYMBOL(dasd_cancel_req); | |||
2625 | * is waiting for something that may not come reliably, (e.g. a state | 2624 | * is waiting for something that may not come reliably, (e.g. a state |
2626 | * change interrupt) | 2625 | * change interrupt) |
2627 | */ | 2626 | */ |
2628 | static void dasd_block_timeout(unsigned long ptr) | 2627 | static void dasd_block_timeout(struct timer_list *t) |
2629 | { | 2628 | { |
2630 | unsigned long flags; | 2629 | unsigned long flags; |
2631 | struct dasd_block *block; | 2630 | struct dasd_block *block; |
2632 | 2631 | ||
2633 | block = (struct dasd_block *) ptr; | 2632 | block = from_timer(block, t, timer); |
2634 | spin_lock_irqsave(get_ccwdev_lock(block->base->cdev), flags); | 2633 | spin_lock_irqsave(get_ccwdev_lock(block->base->cdev), flags); |
2635 | /* re-activate request queue */ | 2634 | /* re-activate request queue */ |
2636 | dasd_device_remove_stop_bits(block->base, DASD_STOPPED_PENDING); | 2635 | dasd_device_remove_stop_bits(block->base, DASD_STOPPED_PENDING); |
diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c index 16b81be1f07a..c81adf8042d7 100644 --- a/drivers/s390/net/fsm.c +++ b/drivers/s390/net/fsm.c | |||
@@ -129,8 +129,9 @@ fsm_getstate_str(fsm_instance *fi) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | static void | 131 | static void |
132 | fsm_expire_timer(fsm_timer *this) | 132 | fsm_expire_timer(struct timer_list *t) |
133 | { | 133 | { |
134 | fsm_timer *this = from_timer(this, t, tl); | ||
134 | #if FSM_TIMER_DEBUG | 135 | #if FSM_TIMER_DEBUG |
135 | printk(KERN_DEBUG "fsm(%s): Timer %p expired\n", | 136 | printk(KERN_DEBUG "fsm(%s): Timer %p expired\n", |
136 | this->fi->name, this); | 137 | this->fi->name, this); |
@@ -146,7 +147,7 @@ fsm_settimer(fsm_instance *fi, fsm_timer *this) | |||
146 | printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name, | 147 | printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name, |
147 | this); | 148 | this); |
148 | #endif | 149 | #endif |
149 | setup_timer(&this->tl, (void *)fsm_expire_timer, (long)this); | 150 | timer_setup(&this->tl, fsm_expire_timer, 0); |
150 | } | 151 | } |
151 | 152 | ||
152 | void | 153 | void |
@@ -168,7 +169,7 @@ fsm_addtimer(fsm_timer *this, int millisec, int event, void *arg) | |||
168 | this->fi->name, this, millisec); | 169 | this->fi->name, this, millisec); |
169 | #endif | 170 | #endif |
170 | 171 | ||
171 | setup_timer(&this->tl, (void *)fsm_expire_timer, (long)this); | 172 | timer_setup(&this->tl, fsm_expire_timer, 0); |
172 | this->expire_event = event; | 173 | this->expire_event = event; |
173 | this->event_arg = arg; | 174 | this->event_arg = arg; |
174 | this->tl.expires = jiffies + (millisec * HZ) / 1000; | 175 | this->tl.expires = jiffies + (millisec * HZ) / 1000; |
@@ -187,7 +188,7 @@ fsm_modtimer(fsm_timer *this, int millisec, int event, void *arg) | |||
187 | #endif | 188 | #endif |
188 | 189 | ||
189 | del_timer(&this->tl); | 190 | del_timer(&this->tl); |
190 | setup_timer(&this->tl, (void *)fsm_expire_timer, (long)this); | 191 | timer_setup(&this->tl, fsm_expire_timer, 0); |
191 | this->expire_event = event; | 192 | this->expire_event = event; |
192 | this->event_arg = arg; | 193 | this->event_arg = arg; |
193 | this->tl.expires = jiffies + (millisec * HZ) / 1000; | 194 | this->tl.expires = jiffies + (millisec * HZ) / 1000; |
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index a54b6c11b505..21f6421536a0 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c | |||
@@ -101,7 +101,7 @@ static void arcmsr_enable_outbound_ints(struct AdapterControlBlock *acb, | |||
101 | static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb); | 101 | static void arcmsr_stop_adapter_bgrb(struct AdapterControlBlock *acb); |
102 | static void arcmsr_hbaA_flush_cache(struct AdapterControlBlock *acb); | 102 | static void arcmsr_hbaA_flush_cache(struct AdapterControlBlock *acb); |
103 | static void arcmsr_hbaB_flush_cache(struct AdapterControlBlock *acb); | 103 | static void arcmsr_hbaB_flush_cache(struct AdapterControlBlock *acb); |
104 | static void arcmsr_request_device_map(unsigned long pacb); | 104 | static void arcmsr_request_device_map(struct timer_list *t); |
105 | static void arcmsr_hbaA_request_device_map(struct AdapterControlBlock *acb); | 105 | static void arcmsr_hbaA_request_device_map(struct AdapterControlBlock *acb); |
106 | static void arcmsr_hbaB_request_device_map(struct AdapterControlBlock *acb); | 106 | static void arcmsr_hbaB_request_device_map(struct AdapterControlBlock *acb); |
107 | static void arcmsr_hbaC_request_device_map(struct AdapterControlBlock *acb); | 107 | static void arcmsr_hbaC_request_device_map(struct AdapterControlBlock *acb); |
@@ -837,8 +837,7 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
837 | atomic_set(&acb->rq_map_token, 16); | 837 | atomic_set(&acb->rq_map_token, 16); |
838 | atomic_set(&acb->ante_token_value, 16); | 838 | atomic_set(&acb->ante_token_value, 16); |
839 | acb->fw_flag = FW_NORMAL; | 839 | acb->fw_flag = FW_NORMAL; |
840 | setup_timer(&acb->eternal_timer, &arcmsr_request_device_map, | 840 | timer_setup(&acb->eternal_timer, arcmsr_request_device_map, 0); |
841 | (unsigned long)acb); | ||
842 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); | 841 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); |
843 | add_timer(&acb->eternal_timer); | 842 | add_timer(&acb->eternal_timer); |
844 | if(arcmsr_alloc_sysfs_attr(acb)) | 843 | if(arcmsr_alloc_sysfs_attr(acb)) |
@@ -929,8 +928,7 @@ static int arcmsr_resume(struct pci_dev *pdev) | |||
929 | atomic_set(&acb->rq_map_token, 16); | 928 | atomic_set(&acb->rq_map_token, 16); |
930 | atomic_set(&acb->ante_token_value, 16); | 929 | atomic_set(&acb->ante_token_value, 16); |
931 | acb->fw_flag = FW_NORMAL; | 930 | acb->fw_flag = FW_NORMAL; |
932 | setup_timer(&acb->eternal_timer, &arcmsr_request_device_map, | 931 | timer_setup(&acb->eternal_timer, arcmsr_request_device_map, 0); |
933 | (unsigned long)acb); | ||
934 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); | 932 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); |
935 | add_timer(&acb->eternal_timer); | 933 | add_timer(&acb->eternal_timer); |
936 | return 0; | 934 | return 0; |
@@ -3457,9 +3455,9 @@ static void arcmsr_hbaD_request_device_map(struct AdapterControlBlock *acb) | |||
3457 | } | 3455 | } |
3458 | } | 3456 | } |
3459 | 3457 | ||
3460 | static void arcmsr_request_device_map(unsigned long pacb) | 3458 | static void arcmsr_request_device_map(struct timer_list *t) |
3461 | { | 3459 | { |
3462 | struct AdapterControlBlock *acb = (struct AdapterControlBlock *)pacb; | 3460 | struct AdapterControlBlock *acb = from_timer(acb, t, eternal_timer); |
3463 | switch (acb->adapter_type) { | 3461 | switch (acb->adapter_type) { |
3464 | case ACB_ADAPTER_TYPE_A: { | 3462 | case ACB_ADAPTER_TYPE_A: { |
3465 | arcmsr_hbaA_request_device_map(acb); | 3463 | arcmsr_hbaA_request_device_map(acb); |
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c index 7304d5a4fc4f..f4775ca70bab 100644 --- a/drivers/scsi/arm/fas216.c +++ b/drivers/scsi/arm/fas216.c | |||
@@ -2318,9 +2318,9 @@ DEF_SCSI_QCMD(fas216_noqueue_command) | |||
2318 | * Error handler timeout function. Indicate that we timed out, | 2318 | * Error handler timeout function. Indicate that we timed out, |
2319 | * and wake up any error handler process so it can continue. | 2319 | * and wake up any error handler process so it can continue. |
2320 | */ | 2320 | */ |
2321 | static void fas216_eh_timer(unsigned long data) | 2321 | static void fas216_eh_timer(struct timer_list *t) |
2322 | { | 2322 | { |
2323 | FAS216_Info *info = (FAS216_Info *)data; | 2323 | FAS216_Info *info = from_timer(info, t, eh_timer); |
2324 | 2324 | ||
2325 | fas216_log(info, LOG_ERROR, "error handling timed out\n"); | 2325 | fas216_log(info, LOG_ERROR, "error handling timed out\n"); |
2326 | 2326 | ||
@@ -2849,7 +2849,7 @@ int fas216_init(struct Scsi_Host *host) | |||
2849 | info->rst_dev_status = -1; | 2849 | info->rst_dev_status = -1; |
2850 | info->rst_bus_status = -1; | 2850 | info->rst_bus_status = -1; |
2851 | init_waitqueue_head(&info->eh_wait); | 2851 | init_waitqueue_head(&info->eh_wait); |
2852 | setup_timer(&info->eh_timer, fas216_eh_timer, (unsigned long)info); | 2852 | timer_setup(&info->eh_timer, fas216_eh_timer, 0); |
2853 | 2853 | ||
2854 | spin_lock_init(&info->host_lock); | 2854 | spin_lock_init(&info->host_lock); |
2855 | 2855 | ||
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index d10826a69725..cf0466686804 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bfa/bfad.c | |||
@@ -692,9 +692,9 @@ ext: | |||
692 | } | 692 | } |
693 | 693 | ||
694 | void | 694 | void |
695 | bfad_bfa_tmo(unsigned long data) | 695 | bfad_bfa_tmo(struct timer_list *t) |
696 | { | 696 | { |
697 | struct bfad_s *bfad = (struct bfad_s *) data; | 697 | struct bfad_s *bfad = from_timer(bfad, t, hal_tmo); |
698 | unsigned long flags; | 698 | unsigned long flags; |
699 | struct list_head doneq; | 699 | struct list_head doneq; |
700 | 700 | ||
@@ -719,7 +719,7 @@ bfad_bfa_tmo(unsigned long data) | |||
719 | void | 719 | void |
720 | bfad_init_timer(struct bfad_s *bfad) | 720 | bfad_init_timer(struct bfad_s *bfad) |
721 | { | 721 | { |
722 | setup_timer(&bfad->hal_tmo, bfad_bfa_tmo, (unsigned long)bfad); | 722 | timer_setup(&bfad->hal_tmo, bfad_bfa_tmo, 0); |
723 | 723 | ||
724 | mod_timer(&bfad->hal_tmo, | 724 | mod_timer(&bfad->hal_tmo, |
725 | jiffies + msecs_to_jiffies(BFA_TIMER_FREQ)); | 725 | jiffies + msecs_to_jiffies(BFA_TIMER_FREQ)); |
diff --git a/drivers/scsi/bfa/bfad_drv.h b/drivers/scsi/bfa/bfad_drv.h index cfcfff48e8e1..4fe980a6441f 100644 --- a/drivers/scsi/bfa/bfad_drv.h +++ b/drivers/scsi/bfa/bfad_drv.h | |||
@@ -314,7 +314,7 @@ int bfad_setup_intr(struct bfad_s *bfad); | |||
314 | void bfad_remove_intr(struct bfad_s *bfad); | 314 | void bfad_remove_intr(struct bfad_s *bfad); |
315 | void bfad_update_hal_cfg(struct bfa_iocfc_cfg_s *bfa_cfg); | 315 | void bfad_update_hal_cfg(struct bfa_iocfc_cfg_s *bfa_cfg); |
316 | bfa_status_t bfad_hal_mem_alloc(struct bfad_s *bfad); | 316 | bfa_status_t bfad_hal_mem_alloc(struct bfad_s *bfad); |
317 | void bfad_bfa_tmo(unsigned long data); | 317 | void bfad_bfa_tmo(struct timer_list *t); |
318 | void bfad_init_timer(struct bfad_s *bfad); | 318 | void bfad_init_timer(struct bfad_s *bfad); |
319 | int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad); | 319 | int bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad); |
320 | void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad); | 320 | void bfad_pci_uninit(struct pci_dev *pdev, struct bfad_s *bfad); |
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c index 59a2dfbcbc69..a8ae1a019eea 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c +++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c | |||
@@ -14,8 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "bnx2fc.h" | 16 | #include "bnx2fc.h" |
17 | static void bnx2fc_upld_timer(unsigned long data); | 17 | static void bnx2fc_upld_timer(struct timer_list *t); |
18 | static void bnx2fc_ofld_timer(unsigned long data); | 18 | static void bnx2fc_ofld_timer(struct timer_list *t); |
19 | static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt, | 19 | static int bnx2fc_init_tgt(struct bnx2fc_rport *tgt, |
20 | struct fcoe_port *port, | 20 | struct fcoe_port *port, |
21 | struct fc_rport_priv *rdata); | 21 | struct fc_rport_priv *rdata); |
@@ -27,10 +27,10 @@ static void bnx2fc_free_session_resc(struct bnx2fc_hba *hba, | |||
27 | struct bnx2fc_rport *tgt); | 27 | struct bnx2fc_rport *tgt); |
28 | static void bnx2fc_free_conn_id(struct bnx2fc_hba *hba, u32 conn_id); | 28 | static void bnx2fc_free_conn_id(struct bnx2fc_hba *hba, u32 conn_id); |
29 | 29 | ||
30 | static void bnx2fc_upld_timer(unsigned long data) | 30 | static void bnx2fc_upld_timer(struct timer_list *t) |
31 | { | 31 | { |
32 | 32 | ||
33 | struct bnx2fc_rport *tgt = (struct bnx2fc_rport *)data; | 33 | struct bnx2fc_rport *tgt = from_timer(tgt, t, upld_timer); |
34 | 34 | ||
35 | BNX2FC_TGT_DBG(tgt, "upld_timer - Upload compl not received!!\n"); | 35 | BNX2FC_TGT_DBG(tgt, "upld_timer - Upload compl not received!!\n"); |
36 | /* fake upload completion */ | 36 | /* fake upload completion */ |
@@ -40,10 +40,10 @@ static void bnx2fc_upld_timer(unsigned long data) | |||
40 | wake_up_interruptible(&tgt->upld_wait); | 40 | wake_up_interruptible(&tgt->upld_wait); |
41 | } | 41 | } |
42 | 42 | ||
43 | static void bnx2fc_ofld_timer(unsigned long data) | 43 | static void bnx2fc_ofld_timer(struct timer_list *t) |
44 | { | 44 | { |
45 | 45 | ||
46 | struct bnx2fc_rport *tgt = (struct bnx2fc_rport *)data; | 46 | struct bnx2fc_rport *tgt = from_timer(tgt, t, ofld_timer); |
47 | 47 | ||
48 | BNX2FC_TGT_DBG(tgt, "entered bnx2fc_ofld_timer\n"); | 48 | BNX2FC_TGT_DBG(tgt, "entered bnx2fc_ofld_timer\n"); |
49 | /* NOTE: This function should never be called, as | 49 | /* NOTE: This function should never be called, as |
@@ -65,7 +65,7 @@ static void bnx2fc_ofld_timer(unsigned long data) | |||
65 | 65 | ||
66 | static void bnx2fc_ofld_wait(struct bnx2fc_rport *tgt) | 66 | static void bnx2fc_ofld_wait(struct bnx2fc_rport *tgt) |
67 | { | 67 | { |
68 | setup_timer(&tgt->ofld_timer, bnx2fc_ofld_timer, (unsigned long)tgt); | 68 | timer_setup(&tgt->ofld_timer, bnx2fc_ofld_timer, 0); |
69 | mod_timer(&tgt->ofld_timer, jiffies + BNX2FC_FW_TIMEOUT); | 69 | mod_timer(&tgt->ofld_timer, jiffies + BNX2FC_FW_TIMEOUT); |
70 | 70 | ||
71 | wait_event_interruptible(tgt->ofld_wait, | 71 | wait_event_interruptible(tgt->ofld_wait, |
@@ -277,7 +277,7 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt) | |||
277 | 277 | ||
278 | static void bnx2fc_upld_wait(struct bnx2fc_rport *tgt) | 278 | static void bnx2fc_upld_wait(struct bnx2fc_rport *tgt) |
279 | { | 279 | { |
280 | setup_timer(&tgt->upld_timer, bnx2fc_upld_timer, (unsigned long)tgt); | 280 | timer_setup(&tgt->upld_timer, bnx2fc_upld_timer, 0); |
281 | mod_timer(&tgt->upld_timer, jiffies + BNX2FC_FW_TIMEOUT); | 281 | mod_timer(&tgt->upld_timer, jiffies + BNX2FC_FW_TIMEOUT); |
282 | wait_event_interruptible(tgt->upld_wait, | 282 | wait_event_interruptible(tgt->upld_wait, |
283 | (test_bit( | 283 | (test_bit( |
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index af4af504a97f..4eb14301a497 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c | |||
@@ -1631,11 +1631,11 @@ void esas2r_adapter_tasklet(unsigned long context) | |||
1631 | } | 1631 | } |
1632 | } | 1632 | } |
1633 | 1633 | ||
1634 | static void esas2r_timer_callback(unsigned long context); | 1634 | static void esas2r_timer_callback(struct timer_list *t); |
1635 | 1635 | ||
1636 | void esas2r_kickoff_timer(struct esas2r_adapter *a) | 1636 | void esas2r_kickoff_timer(struct esas2r_adapter *a) |
1637 | { | 1637 | { |
1638 | setup_timer(&a->timer, esas2r_timer_callback, (unsigned long)a); | 1638 | timer_setup(&a->timer, esas2r_timer_callback, 0); |
1639 | 1639 | ||
1640 | a->timer.expires = jiffies + | 1640 | a->timer.expires = jiffies + |
1641 | msecs_to_jiffies(100); | 1641 | msecs_to_jiffies(100); |
@@ -1643,9 +1643,9 @@ void esas2r_kickoff_timer(struct esas2r_adapter *a) | |||
1643 | add_timer(&a->timer); | 1643 | add_timer(&a->timer); |
1644 | } | 1644 | } |
1645 | 1645 | ||
1646 | static void esas2r_timer_callback(unsigned long context) | 1646 | static void esas2r_timer_callback(struct timer_list *t) |
1647 | { | 1647 | { |
1648 | struct esas2r_adapter *a = (struct esas2r_adapter *)context; | 1648 | struct esas2r_adapter *a = from_timer(a, t, timer); |
1649 | 1649 | ||
1650 | set_bit(AF2_TIMER_TICK, &a->flags2); | 1650 | set_bit(AF2_TIMER_TICK, &a->flags2); |
1651 | 1651 | ||
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index fff6f1851dc1..097f37de6ce9 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #define FCOE_CTLR_MIN_FKA 500 /* min keep alive (mS) */ | 49 | #define FCOE_CTLR_MIN_FKA 500 /* min keep alive (mS) */ |
50 | #define FCOE_CTLR_DEF_FKA FIP_DEF_FKA /* default keep alive (mS) */ | 50 | #define FCOE_CTLR_DEF_FKA FIP_DEF_FKA /* default keep alive (mS) */ |
51 | 51 | ||
52 | static void fcoe_ctlr_timeout(unsigned long); | 52 | static void fcoe_ctlr_timeout(struct timer_list *); |
53 | static void fcoe_ctlr_timer_work(struct work_struct *); | 53 | static void fcoe_ctlr_timer_work(struct work_struct *); |
54 | static void fcoe_ctlr_recv_work(struct work_struct *); | 54 | static void fcoe_ctlr_recv_work(struct work_struct *); |
55 | static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *); | 55 | static int fcoe_ctlr_flogi_retry(struct fcoe_ctlr *); |
@@ -156,7 +156,7 @@ void fcoe_ctlr_init(struct fcoe_ctlr *fip, enum fip_state mode) | |||
156 | mutex_init(&fip->ctlr_mutex); | 156 | mutex_init(&fip->ctlr_mutex); |
157 | spin_lock_init(&fip->ctlr_lock); | 157 | spin_lock_init(&fip->ctlr_lock); |
158 | fip->flogi_oxid = FC_XID_UNKNOWN; | 158 | fip->flogi_oxid = FC_XID_UNKNOWN; |
159 | setup_timer(&fip->timer, fcoe_ctlr_timeout, (unsigned long)fip); | 159 | timer_setup(&fip->timer, fcoe_ctlr_timeout, 0); |
160 | INIT_WORK(&fip->timer_work, fcoe_ctlr_timer_work); | 160 | INIT_WORK(&fip->timer_work, fcoe_ctlr_timer_work); |
161 | INIT_WORK(&fip->recv_work, fcoe_ctlr_recv_work); | 161 | INIT_WORK(&fip->recv_work, fcoe_ctlr_recv_work); |
162 | skb_queue_head_init(&fip->fip_recv_list); | 162 | skb_queue_head_init(&fip->fip_recv_list); |
@@ -1786,9 +1786,9 @@ unlock: | |||
1786 | * fcoe_ctlr_timeout() - FIP timeout handler | 1786 | * fcoe_ctlr_timeout() - FIP timeout handler |
1787 | * @arg: The FCoE controller that timed out | 1787 | * @arg: The FCoE controller that timed out |
1788 | */ | 1788 | */ |
1789 | static void fcoe_ctlr_timeout(unsigned long arg) | 1789 | static void fcoe_ctlr_timeout(struct timer_list *t) |
1790 | { | 1790 | { |
1791 | struct fcoe_ctlr *fip = (struct fcoe_ctlr *)arg; | 1791 | struct fcoe_ctlr *fip = from_timer(fip, t, timer); |
1792 | 1792 | ||
1793 | schedule_work(&fip->timer_work); | 1793 | schedule_work(&fip->timer_work); |
1794 | } | 1794 | } |
diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index aacadbf20b69..e52599f44170 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c | |||
@@ -407,18 +407,18 @@ static int fnic_notify_set(struct fnic *fnic) | |||
407 | return err; | 407 | return err; |
408 | } | 408 | } |
409 | 409 | ||
410 | static void fnic_notify_timer(unsigned long data) | 410 | static void fnic_notify_timer(struct timer_list *t) |
411 | { | 411 | { |
412 | struct fnic *fnic = (struct fnic *)data; | 412 | struct fnic *fnic = from_timer(fnic, t, notify_timer); |
413 | 413 | ||
414 | fnic_handle_link_event(fnic); | 414 | fnic_handle_link_event(fnic); |
415 | mod_timer(&fnic->notify_timer, | 415 | mod_timer(&fnic->notify_timer, |
416 | round_jiffies(jiffies + FNIC_NOTIFY_TIMER_PERIOD)); | 416 | round_jiffies(jiffies + FNIC_NOTIFY_TIMER_PERIOD)); |
417 | } | 417 | } |
418 | 418 | ||
419 | static void fnic_fip_notify_timer(unsigned long data) | 419 | static void fnic_fip_notify_timer(struct timer_list *t) |
420 | { | 420 | { |
421 | struct fnic *fnic = (struct fnic *)data; | 421 | struct fnic *fnic = from_timer(fnic, t, fip_timer); |
422 | 422 | ||
423 | fnic_handle_fip_timer(fnic); | 423 | fnic_handle_fip_timer(fnic); |
424 | } | 424 | } |
@@ -777,8 +777,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
777 | vnic_dev_add_addr(fnic->vdev, fnic->ctlr.ctl_src_addr); | 777 | vnic_dev_add_addr(fnic->vdev, fnic->ctlr.ctl_src_addr); |
778 | fnic->set_vlan = fnic_set_vlan; | 778 | fnic->set_vlan = fnic_set_vlan; |
779 | fcoe_ctlr_init(&fnic->ctlr, FIP_MODE_AUTO); | 779 | fcoe_ctlr_init(&fnic->ctlr, FIP_MODE_AUTO); |
780 | setup_timer(&fnic->fip_timer, fnic_fip_notify_timer, | 780 | timer_setup(&fnic->fip_timer, fnic_fip_notify_timer, 0); |
781 | (unsigned long)fnic); | ||
782 | spin_lock_init(&fnic->vlans_lock); | 781 | spin_lock_init(&fnic->vlans_lock); |
783 | INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame); | 782 | INIT_WORK(&fnic->fip_frame_work, fnic_handle_fip_frame); |
784 | INIT_WORK(&fnic->event_work, fnic_handle_event); | 783 | INIT_WORK(&fnic->event_work, fnic_handle_event); |
@@ -809,8 +808,7 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
809 | 808 | ||
810 | /* Setup notify timer when using MSI interrupts */ | 809 | /* Setup notify timer when using MSI interrupts */ |
811 | if (vnic_dev_get_intr_mode(fnic->vdev) == VNIC_DEV_INTR_MODE_MSI) | 810 | if (vnic_dev_get_intr_mode(fnic->vdev) == VNIC_DEV_INTR_MODE_MSI) |
812 | setup_timer(&fnic->notify_timer, | 811 | timer_setup(&fnic->notify_timer, fnic_notify_timer, 0); |
813 | fnic_notify_timer, (unsigned long)fnic); | ||
814 | 812 | ||
815 | /* allocate RQ buffers and post them to RQ*/ | 813 | /* allocate RQ buffers and post them to RQ*/ |
816 | for (i = 0; i < fnic->rq_count; i++) { | 814 | for (i = 0; i < fnic->rq_count; i++) { |
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 017216f5e919..dc4e801b2cef 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
@@ -8093,9 +8093,9 @@ irqreturn_t ncr53c8xx_intr(int irq, void *dev_id) | |||
8093 | return IRQ_HANDLED; | 8093 | return IRQ_HANDLED; |
8094 | } | 8094 | } |
8095 | 8095 | ||
8096 | static void ncr53c8xx_timeout(unsigned long npref) | 8096 | static void ncr53c8xx_timeout(struct timer_list *t) |
8097 | { | 8097 | { |
8098 | struct ncb *np = (struct ncb *) npref; | 8098 | struct ncb *np = from_timer(np, t, timer); |
8099 | unsigned long flags; | 8099 | unsigned long flags; |
8100 | struct scsi_cmnd *done_list; | 8100 | struct scsi_cmnd *done_list; |
8101 | 8101 | ||
@@ -8357,7 +8357,7 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt, | |||
8357 | if (!np->scripth0) | 8357 | if (!np->scripth0) |
8358 | goto attach_error; | 8358 | goto attach_error; |
8359 | 8359 | ||
8360 | setup_timer(&np->timer, ncr53c8xx_timeout, (unsigned long)np); | 8360 | timer_setup(&np->timer, ncr53c8xx_timeout, 0); |
8361 | 8361 | ||
8362 | /* Try to map the controller chip to virtual and physical memory. */ | 8362 | /* Try to map the controller chip to virtual and physical memory. */ |
8363 | 8363 | ||
diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index 609332b3e15b..c462b1c046cd 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c | |||
@@ -293,9 +293,9 @@ static void gb_operation_work(struct work_struct *work) | |||
293 | gb_operation_put(operation); | 293 | gb_operation_put(operation); |
294 | } | 294 | } |
295 | 295 | ||
296 | static void gb_operation_timeout(unsigned long arg) | 296 | static void gb_operation_timeout(struct timer_list *t) |
297 | { | 297 | { |
298 | struct gb_operation *operation = (void *)arg; | 298 | struct gb_operation *operation = from_timer(operation, t, timer); |
299 | 299 | ||
300 | if (gb_operation_result_set(operation, -ETIMEDOUT)) { | 300 | if (gb_operation_result_set(operation, -ETIMEDOUT)) { |
301 | /* | 301 | /* |
@@ -540,8 +540,7 @@ gb_operation_create_common(struct gb_connection *connection, u8 type, | |||
540 | goto err_request; | 540 | goto err_request; |
541 | } | 541 | } |
542 | 542 | ||
543 | setup_timer(&operation->timer, gb_operation_timeout, | 543 | timer_setup(&operation->timer, gb_operation_timeout, 0); |
544 | (unsigned long)operation); | ||
545 | } | 544 | } |
546 | 545 | ||
547 | operation->flags = op_flags; | 546 | operation->flags = op_flags; |
diff --git a/drivers/staging/lustre/lnet/lnet/net_fault.c b/drivers/staging/lustre/lnet/lnet/net_fault.c index 3c83aa31e2c2..5a5d1811ffbe 100644 --- a/drivers/staging/lustre/lnet/lnet/net_fault.c +++ b/drivers/staging/lustre/lnet/lnet/net_fault.c | |||
@@ -700,9 +700,9 @@ lnet_delay_rule_daemon(void *arg) | |||
700 | } | 700 | } |
701 | 701 | ||
702 | static void | 702 | static void |
703 | delay_timer_cb(unsigned long arg) | 703 | delay_timer_cb(struct timer_list *t) |
704 | { | 704 | { |
705 | struct lnet_delay_rule *rule = (struct lnet_delay_rule *)arg; | 705 | struct lnet_delay_rule *rule = from_timer(rule, t, dl_timer); |
706 | 706 | ||
707 | spin_lock_bh(&delay_dd.dd_lock); | 707 | spin_lock_bh(&delay_dd.dd_lock); |
708 | if (list_empty(&rule->dl_sched_link) && delay_dd.dd_running) { | 708 | if (list_empty(&rule->dl_sched_link) && delay_dd.dd_running) { |
@@ -762,7 +762,7 @@ lnet_delay_rule_add(struct lnet_fault_attr *attr) | |||
762 | wait_event(delay_dd.dd_ctl_waitq, delay_dd.dd_running); | 762 | wait_event(delay_dd.dd_ctl_waitq, delay_dd.dd_running); |
763 | } | 763 | } |
764 | 764 | ||
765 | setup_timer(&rule->dl_timer, delay_timer_cb, (unsigned long)rule); | 765 | timer_setup(&rule->dl_timer, delay_timer_cb, 0); |
766 | 766 | ||
767 | spin_lock_init(&rule->dl_lock); | 767 | spin_lock_init(&rule->dl_lock); |
768 | INIT_LIST_HEAD(&rule->dl_msg_list); | 768 | INIT_LIST_HEAD(&rule->dl_msg_list); |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 23cdb7c4476c..63be6e7273f3 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c | |||
@@ -329,11 +329,11 @@ ptlrpc_server_post_idle_rqbds(struct ptlrpc_service_part *svcpt) | |||
329 | return -1; | 329 | return -1; |
330 | } | 330 | } |
331 | 331 | ||
332 | static void ptlrpc_at_timer(unsigned long castmeharder) | 332 | static void ptlrpc_at_timer(struct timer_list *t) |
333 | { | 333 | { |
334 | struct ptlrpc_service_part *svcpt; | 334 | struct ptlrpc_service_part *svcpt; |
335 | 335 | ||
336 | svcpt = (struct ptlrpc_service_part *)castmeharder; | 336 | svcpt = from_timer(svcpt, t, scp_at_timer); |
337 | 337 | ||
338 | svcpt->scp_at_check = 1; | 338 | svcpt->scp_at_check = 1; |
339 | svcpt->scp_at_checktime = cfs_time_current(); | 339 | svcpt->scp_at_checktime = cfs_time_current(); |
@@ -506,8 +506,7 @@ ptlrpc_service_part_init(struct ptlrpc_service *svc, | |||
506 | if (!array->paa_reqs_count) | 506 | if (!array->paa_reqs_count) |
507 | goto free_reqs_array; | 507 | goto free_reqs_array; |
508 | 508 | ||
509 | setup_timer(&svcpt->scp_at_timer, ptlrpc_at_timer, | 509 | timer_setup(&svcpt->scp_at_timer, ptlrpc_at_timer, 0); |
510 | (unsigned long)svcpt); | ||
511 | 510 | ||
512 | /* At SOW, service time should be quick; 10s seems generous. If client | 511 | /* At SOW, service time should be quick; 10s seems generous. If client |
513 | * timeout is less than this, we'll be sending an early reply. | 512 | * timeout is less than this, we'll be sending an early reply. |
@@ -926,7 +925,7 @@ static void ptlrpc_at_set_timer(struct ptlrpc_service_part *svcpt) | |||
926 | next = (__s32)(array->paa_deadline - ktime_get_real_seconds() - | 925 | next = (__s32)(array->paa_deadline - ktime_get_real_seconds() - |
927 | at_early_margin); | 926 | at_early_margin); |
928 | if (next <= 0) { | 927 | if (next <= 0) { |
929 | ptlrpc_at_timer((unsigned long)svcpt); | 928 | ptlrpc_at_timer(&svcpt->scp_at_timer); |
930 | } else { | 929 | } else { |
931 | mod_timer(&svcpt->scp_at_timer, cfs_time_shift(next)); | 930 | mod_timer(&svcpt->scp_at_timer, cfs_time_shift(next)); |
932 | CDEBUG(D_INFO, "armed %s at %+ds\n", | 931 | CDEBUG(D_INFO, "armed %s at %+ds\n", |
diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c b/drivers/staging/media/imx/imx-ic-prpencvf.c index 0790b3d9e255..143038c6c403 100644 --- a/drivers/staging/media/imx/imx-ic-prpencvf.c +++ b/drivers/staging/media/imx/imx-ic-prpencvf.c | |||
@@ -293,9 +293,9 @@ static irqreturn_t prp_nfb4eof_interrupt(int irq, void *dev_id) | |||
293 | * EOF timeout timer function. This is an unrecoverable condition | 293 | * EOF timeout timer function. This is an unrecoverable condition |
294 | * without a stream restart. | 294 | * without a stream restart. |
295 | */ | 295 | */ |
296 | static void prp_eof_timeout(unsigned long data) | 296 | static void prp_eof_timeout(struct timer_list *t) |
297 | { | 297 | { |
298 | struct prp_priv *priv = (struct prp_priv *)data; | 298 | struct prp_priv *priv = from_timer(priv, t, eof_timeout_timer); |
299 | struct imx_media_video_dev *vdev = priv->vdev; | 299 | struct imx_media_video_dev *vdev = priv->vdev; |
300 | struct imx_ic_priv *ic_priv = priv->ic_priv; | 300 | struct imx_ic_priv *ic_priv = priv->ic_priv; |
301 | 301 | ||
@@ -1292,8 +1292,7 @@ static int prp_init(struct imx_ic_priv *ic_priv) | |||
1292 | priv->ic_priv = ic_priv; | 1292 | priv->ic_priv = ic_priv; |
1293 | 1293 | ||
1294 | spin_lock_init(&priv->irqlock); | 1294 | spin_lock_init(&priv->irqlock); |
1295 | setup_timer(&priv->eof_timeout_timer, prp_eof_timeout, | 1295 | timer_setup(&priv->eof_timeout_timer, prp_eof_timeout, 0); |
1296 | (unsigned long)priv); | ||
1297 | 1296 | ||
1298 | priv->vdev = imx_media_capture_device_init(&ic_priv->sd, | 1297 | priv->vdev = imx_media_capture_device_init(&ic_priv->sd, |
1299 | PRPENCVF_SRC_PAD); | 1298 | PRPENCVF_SRC_PAD); |
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 6d856118c223..bb1d6dafca83 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c | |||
@@ -254,9 +254,9 @@ static irqreturn_t csi_idmac_nfb4eof_interrupt(int irq, void *dev_id) | |||
254 | * EOF timeout timer function. This is an unrecoverable condition | 254 | * EOF timeout timer function. This is an unrecoverable condition |
255 | * without a stream restart. | 255 | * without a stream restart. |
256 | */ | 256 | */ |
257 | static void csi_idmac_eof_timeout(unsigned long data) | 257 | static void csi_idmac_eof_timeout(struct timer_list *t) |
258 | { | 258 | { |
259 | struct csi_priv *priv = (struct csi_priv *)data; | 259 | struct csi_priv *priv = from_timer(priv, t, eof_timeout_timer); |
260 | struct imx_media_video_dev *vdev = priv->vdev; | 260 | struct imx_media_video_dev *vdev = priv->vdev; |
261 | 261 | ||
262 | v4l2_err(&priv->sd, "EOF timeout\n"); | 262 | v4l2_err(&priv->sd, "EOF timeout\n"); |
@@ -1739,8 +1739,7 @@ static int imx_csi_probe(struct platform_device *pdev) | |||
1739 | priv->csi_id = pdata->csi; | 1739 | priv->csi_id = pdata->csi; |
1740 | priv->smfc_id = (priv->csi_id == 0) ? 0 : 2; | 1740 | priv->smfc_id = (priv->csi_id == 0) ? 0 : 2; |
1741 | 1741 | ||
1742 | setup_timer(&priv->eof_timeout_timer, csi_idmac_eof_timeout, | 1742 | timer_setup(&priv->eof_timeout_timer, csi_idmac_eof_timeout, 0); |
1743 | (unsigned long)priv); | ||
1744 | spin_lock_init(&priv->irqlock); | 1743 | spin_lock_init(&priv->irqlock); |
1745 | 1744 | ||
1746 | v4l2_subdev_init(&priv->sd, &csi_subdev_ops); | 1745 | v4l2_subdev_init(&priv->sd, &csi_subdev_ops); |
diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index 85775da293fb..667dacac81f0 100644 --- a/drivers/staging/most/hdm-usb/hdm_usb.c +++ b/drivers/staging/most/hdm-usb/hdm_usb.c | |||
@@ -744,9 +744,9 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel, | |||
744 | * The handler runs in interrupt context. That's why we need to defer the | 744 | * The handler runs in interrupt context. That's why we need to defer the |
745 | * tasks to a work queue. | 745 | * tasks to a work queue. |
746 | */ | 746 | */ |
747 | static void link_stat_timer_handler(unsigned long data) | 747 | static void link_stat_timer_handler(struct timer_list *t) |
748 | { | 748 | { |
749 | struct most_dev *mdev = (struct most_dev *)data; | 749 | struct most_dev *mdev = from_timer(mdev, t, link_stat_timer); |
750 | 750 | ||
751 | schedule_work(&mdev->poll_work_obj); | 751 | schedule_work(&mdev->poll_work_obj); |
752 | mdev->link_stat_timer.expires = jiffies + (2 * HZ); | 752 | mdev->link_stat_timer.expires = jiffies + (2 * HZ); |
@@ -1138,8 +1138,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) | |||
1138 | num_endpoints = usb_iface_desc->desc.bNumEndpoints; | 1138 | num_endpoints = usb_iface_desc->desc.bNumEndpoints; |
1139 | mutex_init(&mdev->io_mutex); | 1139 | mutex_init(&mdev->io_mutex); |
1140 | INIT_WORK(&mdev->poll_work_obj, wq_netinfo); | 1140 | INIT_WORK(&mdev->poll_work_obj, wq_netinfo); |
1141 | setup_timer(&mdev->link_stat_timer, link_stat_timer_handler, | 1141 | timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0); |
1142 | (unsigned long)mdev); | ||
1143 | 1142 | ||
1144 | mdev->usb_device = usb_dev; | 1143 | mdev->usb_device = usb_dev; |
1145 | mdev->link_stat_timer.expires = jiffies + (2 * HZ); | 1144 | mdev->link_stat_timer.expires = jiffies + (2 * HZ); |
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 4e7908322d77..f56fdc7a4b61 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | |||
@@ -391,10 +391,10 @@ static void ieee80211_send_beacon(struct ieee80211_device *ieee) | |||
391 | } | 391 | } |
392 | 392 | ||
393 | 393 | ||
394 | static void ieee80211_send_beacon_cb(unsigned long _ieee) | 394 | static void ieee80211_send_beacon_cb(struct timer_list *t) |
395 | { | 395 | { |
396 | struct ieee80211_device *ieee = | 396 | struct ieee80211_device *ieee = |
397 | (struct ieee80211_device *) _ieee; | 397 | from_timer(ieee, t, beacon_timer); |
398 | unsigned long flags; | 398 | unsigned long flags; |
399 | 399 | ||
400 | spin_lock_irqsave(&ieee->beacon_lock, flags); | 400 | spin_lock_irqsave(&ieee->beacon_lock, flags); |
@@ -1251,9 +1251,11 @@ void ieee80211_associate_abort(struct ieee80211_device *ieee) | |||
1251 | spin_unlock_irqrestore(&ieee->lock, flags); | 1251 | spin_unlock_irqrestore(&ieee->lock, flags); |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | static void ieee80211_associate_abort_cb(unsigned long dev) | 1254 | static void ieee80211_associate_abort_cb(struct timer_list *t) |
1255 | { | 1255 | { |
1256 | ieee80211_associate_abort((struct ieee80211_device *) dev); | 1256 | struct ieee80211_device *dev = from_timer(dev, t, associate_timer); |
1257 | |||
1258 | ieee80211_associate_abort(dev); | ||
1257 | } | 1259 | } |
1258 | 1260 | ||
1259 | 1261 | ||
@@ -2718,11 +2720,9 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee) | |||
2718 | ieee->enable_rx_imm_BA = true; | 2720 | ieee->enable_rx_imm_BA = true; |
2719 | ieee->tx_pending.txb = NULL; | 2721 | ieee->tx_pending.txb = NULL; |
2720 | 2722 | ||
2721 | setup_timer(&ieee->associate_timer, ieee80211_associate_abort_cb, | 2723 | timer_setup(&ieee->associate_timer, ieee80211_associate_abort_cb, 0); |
2722 | (unsigned long)ieee); | ||
2723 | 2724 | ||
2724 | setup_timer(&ieee->beacon_timer, ieee80211_send_beacon_cb, | 2725 | timer_setup(&ieee->beacon_timer, ieee80211_send_beacon_cb, 0); |
2725 | (unsigned long)ieee); | ||
2726 | 2726 | ||
2727 | 2727 | ||
2728 | INIT_DELAYED_WORK(&ieee->start_ibss_wq, ieee80211_start_ibss_wq); | 2728 | INIT_DELAYED_WORK(&ieee->start_ibss_wq, ieee80211_start_ibss_wq); |
diff --git a/drivers/staging/rtl8712/recv_linux.c b/drivers/staging/rtl8712/recv_linux.c index 576c15d25a0f..986a55bb9877 100644 --- a/drivers/staging/rtl8712/recv_linux.c +++ b/drivers/staging/rtl8712/recv_linux.c | |||
@@ -138,17 +138,16 @@ _recv_indicatepkt_drop: | |||
138 | precvpriv->rx_drop++; | 138 | precvpriv->rx_drop++; |
139 | } | 139 | } |
140 | 140 | ||
141 | static void _r8712_reordering_ctrl_timeout_handler (unsigned long data) | 141 | static void _r8712_reordering_ctrl_timeout_handler (struct timer_list *t) |
142 | { | 142 | { |
143 | struct recv_reorder_ctrl *preorder_ctrl = | 143 | struct recv_reorder_ctrl *preorder_ctrl = |
144 | (struct recv_reorder_ctrl *)data; | 144 | from_timer(preorder_ctrl, t, reordering_ctrl_timer); |
145 | 145 | ||
146 | r8712_reordering_ctrl_timeout_handler(preorder_ctrl); | 146 | r8712_reordering_ctrl_timeout_handler(preorder_ctrl); |
147 | } | 147 | } |
148 | 148 | ||
149 | void r8712_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl) | 149 | void r8712_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl) |
150 | { | 150 | { |
151 | setup_timer(&preorder_ctrl->reordering_ctrl_timer, | 151 | timer_setup(&preorder_ctrl->reordering_ctrl_timer, |
152 | _r8712_reordering_ctrl_timeout_handler, | 152 | _r8712_reordering_ctrl_timeout_handler, 0); |
153 | (unsigned long)preorder_ctrl); | ||
154 | } | 153 | } |
diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c index da1d4a641dcd..455fba721135 100644 --- a/drivers/staging/rtl8712/rtl8712_led.c +++ b/drivers/staging/rtl8712/rtl8712_led.c | |||
@@ -74,7 +74,7 @@ enum _LED_STATE_871x { | |||
74 | * Prototype of protected function. | 74 | * Prototype of protected function. |
75 | *=========================================================================== | 75 | *=========================================================================== |
76 | */ | 76 | */ |
77 | static void BlinkTimerCallback(unsigned long data); | 77 | static void BlinkTimerCallback(struct timer_list *t); |
78 | 78 | ||
79 | static void BlinkWorkItemCallback(struct work_struct *work); | 79 | static void BlinkWorkItemCallback(struct work_struct *work); |
80 | /*=========================================================================== | 80 | /*=========================================================================== |
@@ -99,8 +99,7 @@ static void InitLed871x(struct _adapter *padapter, struct LED_871x *pLed, | |||
99 | pLed->bLedBlinkInProgress = false; | 99 | pLed->bLedBlinkInProgress = false; |
100 | pLed->BlinkTimes = 0; | 100 | pLed->BlinkTimes = 0; |
101 | pLed->BlinkingLedState = LED_UNKNOWN; | 101 | pLed->BlinkingLedState = LED_UNKNOWN; |
102 | setup_timer(&pLed->BlinkTimer, BlinkTimerCallback, | 102 | timer_setup(&pLed->BlinkTimer, BlinkTimerCallback, 0); |
103 | (unsigned long)pLed); | ||
104 | INIT_WORK(&pLed->BlinkWorkItem, BlinkWorkItemCallback); | 103 | INIT_WORK(&pLed->BlinkWorkItem, BlinkWorkItemCallback); |
105 | } | 104 | } |
106 | 105 | ||
@@ -825,9 +824,9 @@ static void SwLedBlink6(struct LED_871x *pLed) | |||
825 | * Callback function of LED BlinkTimer, | 824 | * Callback function of LED BlinkTimer, |
826 | * it just schedules to corresponding BlinkWorkItem. | 825 | * it just schedules to corresponding BlinkWorkItem. |
827 | */ | 826 | */ |
828 | static void BlinkTimerCallback(unsigned long data) | 827 | static void BlinkTimerCallback(struct timer_list *t) |
829 | { | 828 | { |
830 | struct LED_871x *pLed = (struct LED_871x *)data; | 829 | struct LED_871x *pLed = from_timer(pLed, t, BlinkTimer); |
831 | 830 | ||
832 | /* This fixed the crash problem on Fedora 12 when trying to do the | 831 | /* This fixed the crash problem on Fedora 12 when trying to do the |
833 | * insmod;ifconfig up;rmmod commands. | 832 | * insmod;ifconfig up;rmmod commands. |
diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index b604d0cccef1..6cb6eb0673c6 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c | |||
@@ -493,9 +493,9 @@ static const struct file_operations bus_info_debugfs_fops = { | |||
493 | .release = single_release, | 493 | .release = single_release, |
494 | }; | 494 | }; |
495 | 495 | ||
496 | static void dev_periodic_work(unsigned long __opaque) | 496 | static void dev_periodic_work(struct timer_list *t) |
497 | { | 497 | { |
498 | struct visor_device *dev = (struct visor_device *)__opaque; | 498 | struct visor_device *dev = from_timer(dev, t, timer); |
499 | struct visor_driver *drv = to_visor_driver(dev->device.driver); | 499 | struct visor_driver *drv = to_visor_driver(dev->device.driver); |
500 | 500 | ||
501 | drv->channel_interrupt(dev); | 501 | drv->channel_interrupt(dev); |
@@ -667,7 +667,7 @@ int create_visor_device(struct visor_device *dev) | |||
667 | dev->device.release = visorbus_release_device; | 667 | dev->device.release = visorbus_release_device; |
668 | /* keep a reference just for us (now 2) */ | 668 | /* keep a reference just for us (now 2) */ |
669 | get_device(&dev->device); | 669 | get_device(&dev->device); |
670 | setup_timer(&dev->timer, dev_periodic_work, (unsigned long)dev); | 670 | timer_setup(&dev->timer, dev_periodic_work, 0); |
671 | /* | 671 | /* |
672 | * bus_id must be a unique name with respect to this bus TYPE (NOT bus | 672 | * bus_id must be a unique name with respect to this bus TYPE (NOT bus |
673 | * instance). That's why we need to include the bus number within the | 673 | * instance). That's why we need to include the bus number within the |
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 735d7e5fa86b..6d8239163ba5 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c | |||
@@ -1766,9 +1766,10 @@ static int visornic_poll(struct napi_struct *napi, int budget) | |||
1766 | * Main function of the vnic_incoming thread. Periodically check the response | 1766 | * Main function of the vnic_incoming thread. Periodically check the response |
1767 | * queue and drain it if needed. | 1767 | * queue and drain it if needed. |
1768 | */ | 1768 | */ |
1769 | static void poll_for_irq(unsigned long v) | 1769 | static void poll_for_irq(struct timer_list *t) |
1770 | { | 1770 | { |
1771 | struct visornic_devdata *devdata = (struct visornic_devdata *)v; | 1771 | struct visornic_devdata *devdata = from_timer(devdata, t, |
1772 | irq_poll_timer); | ||
1772 | 1773 | ||
1773 | if (!visorchannel_signalempty( | 1774 | if (!visorchannel_signalempty( |
1774 | devdata->dev->visorchannel, | 1775 | devdata->dev->visorchannel, |
@@ -1899,8 +1900,7 @@ static int visornic_probe(struct visor_device *dev) | |||
1899 | /* Let's start our threads to get responses */ | 1900 | /* Let's start our threads to get responses */ |
1900 | netif_napi_add(netdev, &devdata->napi, visornic_poll, NAPI_WEIGHT); | 1901 | netif_napi_add(netdev, &devdata->napi, visornic_poll, NAPI_WEIGHT); |
1901 | 1902 | ||
1902 | setup_timer(&devdata->irq_poll_timer, poll_for_irq, | 1903 | timer_setup(&devdata->irq_poll_timer, poll_for_irq, 0); |
1903 | (unsigned long)devdata); | ||
1904 | /* Note: This time has to start running before the while | 1904 | /* Note: This time has to start running before the while |
1905 | * loop below because the napi routine is responsible for | 1905 | * loop below because the napi routine is responsible for |
1906 | * setting enab_dis_acked | 1906 | * setting enab_dis_acked |
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 8a275996d4e6..028da1dc1b81 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |||
@@ -267,7 +267,7 @@ static void update_scan_time(void) | |||
267 | last_scanned_shadow[i].time_scan = jiffies; | 267 | last_scanned_shadow[i].time_scan = jiffies; |
268 | } | 268 | } |
269 | 269 | ||
270 | static void remove_network_from_shadow(unsigned long unused) | 270 | static void remove_network_from_shadow(struct timer_list *unused) |
271 | { | 271 | { |
272 | unsigned long now = jiffies; | 272 | unsigned long now = jiffies; |
273 | int i, j; | 273 | int i, j; |
@@ -292,7 +292,7 @@ static void remove_network_from_shadow(unsigned long unused) | |||
292 | } | 292 | } |
293 | } | 293 | } |
294 | 294 | ||
295 | static void clear_duringIP(unsigned long arg) | 295 | static void clear_duringIP(struct timer_list *unused) |
296 | { | 296 | { |
297 | wilc_optaining_ip = false; | 297 | wilc_optaining_ip = false; |
298 | } | 298 | } |
@@ -2278,8 +2278,8 @@ int wilc_init_host_int(struct net_device *net) | |||
2278 | 2278 | ||
2279 | priv = wdev_priv(net->ieee80211_ptr); | 2279 | priv = wdev_priv(net->ieee80211_ptr); |
2280 | if (op_ifcs == 0) { | 2280 | if (op_ifcs == 0) { |
2281 | setup_timer(&hAgingTimer, remove_network_from_shadow, 0); | 2281 | timer_setup(&hAgingTimer, remove_network_from_shadow, 0); |
2282 | setup_timer(&wilc_during_ip_timer, clear_duringIP, 0); | 2282 | timer_setup(&wilc_during_ip_timer, clear_duringIP, 0); |
2283 | } | 2283 | } |
2284 | op_ifcs++; | 2284 | op_ifcs++; |
2285 | 2285 | ||
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 9469695f5871..a8eaed2c211a 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c | |||
@@ -1044,9 +1044,9 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data) | |||
1044 | return 0; | 1044 | return 0; |
1045 | } | 1045 | } |
1046 | 1046 | ||
1047 | static void tcmu_device_timedout(unsigned long data) | 1047 | static void tcmu_device_timedout(struct timer_list *t) |
1048 | { | 1048 | { |
1049 | struct tcmu_dev *udev = (struct tcmu_dev *)data; | 1049 | struct tcmu_dev *udev = from_timer(udev, t, timeout); |
1050 | unsigned long flags; | 1050 | unsigned long flags; |
1051 | 1051 | ||
1052 | spin_lock_irqsave(&udev->commands_lock, flags); | 1052 | spin_lock_irqsave(&udev->commands_lock, flags); |
@@ -1106,8 +1106,7 @@ static struct se_device *tcmu_alloc_device(struct se_hba *hba, const char *name) | |||
1106 | idr_init(&udev->commands); | 1106 | idr_init(&udev->commands); |
1107 | spin_lock_init(&udev->commands_lock); | 1107 | spin_lock_init(&udev->commands_lock); |
1108 | 1108 | ||
1109 | setup_timer(&udev->timeout, tcmu_device_timedout, | 1109 | timer_setup(&udev->timeout, tcmu_device_timedout, 0); |
1110 | (unsigned long)udev); | ||
1111 | 1110 | ||
1112 | init_waitqueue_head(&udev->nl_cmd_wq); | 1111 | init_waitqueue_head(&udev->nl_cmd_wq); |
1113 | spin_lock_init(&udev->nl_cmd_lock); | 1112 | spin_lock_init(&udev->nl_cmd_lock); |
diff --git a/drivers/tty/ipwireless/hardware.c b/drivers/tty/ipwireless/hardware.c index a6b8240af6cd..b0baa4ce10f9 100644 --- a/drivers/tty/ipwireless/hardware.c +++ b/drivers/tty/ipwireless/hardware.c | |||
@@ -33,7 +33,7 @@ static void handle_received_SETUP_packet(struct ipw_hardware *ipw, | |||
33 | unsigned int address, | 33 | unsigned int address, |
34 | const unsigned char *data, int len, | 34 | const unsigned char *data, int len, |
35 | int is_last); | 35 | int is_last); |
36 | static void ipwireless_setup_timer(unsigned long data); | 36 | static void ipwireless_setup_timer(struct timer_list *t); |
37 | static void handle_received_CTRL_packet(struct ipw_hardware *hw, | 37 | static void handle_received_CTRL_packet(struct ipw_hardware *hw, |
38 | unsigned int channel_idx, const unsigned char *data, int len); | 38 | unsigned int channel_idx, const unsigned char *data, int len); |
39 | 39 | ||
@@ -1635,8 +1635,7 @@ struct ipw_hardware *ipwireless_hardware_create(void) | |||
1635 | spin_lock_init(&hw->lock); | 1635 | spin_lock_init(&hw->lock); |
1636 | tasklet_init(&hw->tasklet, ipwireless_do_tasklet, (unsigned long) hw); | 1636 | tasklet_init(&hw->tasklet, ipwireless_do_tasklet, (unsigned long) hw); |
1637 | INIT_WORK(&hw->work_rx, ipw_receive_data_work); | 1637 | INIT_WORK(&hw->work_rx, ipw_receive_data_work); |
1638 | setup_timer(&hw->setup_timer, ipwireless_setup_timer, | 1638 | timer_setup(&hw->setup_timer, ipwireless_setup_timer, 0); |
1639 | (unsigned long) hw); | ||
1640 | 1639 | ||
1641 | return hw; | 1640 | return hw; |
1642 | } | 1641 | } |
@@ -1670,12 +1669,12 @@ void ipwireless_init_hardware_v2_v3(struct ipw_hardware *hw) | |||
1670 | hw->init_loops = 0; | 1669 | hw->init_loops = 0; |
1671 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME | 1670 | printk(KERN_INFO IPWIRELESS_PCCARD_NAME |
1672 | ": waiting for card to start up...\n"); | 1671 | ": waiting for card to start up...\n"); |
1673 | ipwireless_setup_timer((unsigned long) hw); | 1672 | ipwireless_setup_timer(&hw->setup_timer); |
1674 | } | 1673 | } |
1675 | 1674 | ||
1676 | static void ipwireless_setup_timer(unsigned long data) | 1675 | static void ipwireless_setup_timer(struct timer_list *t) |
1677 | { | 1676 | { |
1678 | struct ipw_hardware *hw = (struct ipw_hardware *) data; | 1677 | struct ipw_hardware *hw = from_timer(hw, t, setup_timer); |
1679 | 1678 | ||
1680 | hw->init_loops++; | 1679 | hw->init_loops++; |
1681 | 1680 | ||
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 3a39eb685c69..5131bdc9e765 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -1310,9 +1310,9 @@ static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl) | |||
1310 | * gsm->pending_cmd will be NULL and we just let the timer expire. | 1310 | * gsm->pending_cmd will be NULL and we just let the timer expire. |
1311 | */ | 1311 | */ |
1312 | 1312 | ||
1313 | static void gsm_control_retransmit(unsigned long data) | 1313 | static void gsm_control_retransmit(struct timer_list *t) |
1314 | { | 1314 | { |
1315 | struct gsm_mux *gsm = (struct gsm_mux *)data; | 1315 | struct gsm_mux *gsm = from_timer(gsm, t, t2_timer); |
1316 | struct gsm_control *ctrl; | 1316 | struct gsm_control *ctrl; |
1317 | unsigned long flags; | 1317 | unsigned long flags; |
1318 | spin_lock_irqsave(&gsm->control_lock, flags); | 1318 | spin_lock_irqsave(&gsm->control_lock, flags); |
@@ -1453,9 +1453,9 @@ static void gsm_dlci_open(struct gsm_dlci *dlci) | |||
1453 | * end will get a DM response) | 1453 | * end will get a DM response) |
1454 | */ | 1454 | */ |
1455 | 1455 | ||
1456 | static void gsm_dlci_t1(unsigned long data) | 1456 | static void gsm_dlci_t1(struct timer_list *t) |
1457 | { | 1457 | { |
1458 | struct gsm_dlci *dlci = (struct gsm_dlci *)data; | 1458 | struct gsm_dlci *dlci = from_timer(dlci, t, t1); |
1459 | struct gsm_mux *gsm = dlci->gsm; | 1459 | struct gsm_mux *gsm = dlci->gsm; |
1460 | 1460 | ||
1461 | switch (dlci->state) { | 1461 | switch (dlci->state) { |
@@ -1634,7 +1634,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr) | |||
1634 | } | 1634 | } |
1635 | 1635 | ||
1636 | skb_queue_head_init(&dlci->skb_list); | 1636 | skb_queue_head_init(&dlci->skb_list); |
1637 | setup_timer(&dlci->t1, gsm_dlci_t1, (unsigned long)dlci); | 1637 | timer_setup(&dlci->t1, gsm_dlci_t1, 0); |
1638 | tty_port_init(&dlci->port); | 1638 | tty_port_init(&dlci->port); |
1639 | dlci->port.ops = &gsm_port_ops; | 1639 | dlci->port.ops = &gsm_port_ops; |
1640 | dlci->gsm = gsm; | 1640 | dlci->gsm = gsm; |
@@ -2088,7 +2088,7 @@ static int gsm_activate_mux(struct gsm_mux *gsm) | |||
2088 | struct gsm_dlci *dlci; | 2088 | struct gsm_dlci *dlci; |
2089 | int i = 0; | 2089 | int i = 0; |
2090 | 2090 | ||
2091 | setup_timer(&gsm->t2_timer, gsm_control_retransmit, (unsigned long)gsm); | 2091 | timer_setup(&gsm->t2_timer, gsm_control_retransmit, 0); |
2092 | init_waitqueue_head(&gsm->event); | 2092 | init_waitqueue_head(&gsm->event); |
2093 | spin_lock_init(&gsm->control_lock); | 2093 | spin_lock_init(&gsm->control_lock); |
2094 | spin_lock_init(&gsm->tx_lock); | 2094 | spin_lock_init(&gsm->tx_lock); |
diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c index 9f246d4db3ca..30bb0900cd2f 100644 --- a/drivers/tty/n_r3964.c +++ b/drivers/tty/n_r3964.c | |||
@@ -115,7 +115,7 @@ static void retry_transmit(struct r3964_info *pInfo); | |||
115 | static void transmit_block(struct r3964_info *pInfo); | 115 | static void transmit_block(struct r3964_info *pInfo); |
116 | static void receive_char(struct r3964_info *pInfo, const unsigned char c); | 116 | static void receive_char(struct r3964_info *pInfo, const unsigned char c); |
117 | static void receive_error(struct r3964_info *pInfo, const char flag); | 117 | static void receive_error(struct r3964_info *pInfo, const char flag); |
118 | static void on_timeout(unsigned long priv); | 118 | static void on_timeout(struct timer_list *t); |
119 | static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg); | 119 | static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg); |
120 | static int read_telegram(struct r3964_info *pInfo, struct pid *pid, | 120 | static int read_telegram(struct r3964_info *pInfo, struct pid *pid, |
121 | unsigned char __user * buf); | 121 | unsigned char __user * buf); |
@@ -688,9 +688,9 @@ static void receive_error(struct r3964_info *pInfo, const char flag) | |||
688 | } | 688 | } |
689 | } | 689 | } |
690 | 690 | ||
691 | static void on_timeout(unsigned long priv) | 691 | static void on_timeout(struct timer_list *t) |
692 | { | 692 | { |
693 | struct r3964_info *pInfo = (void *)priv; | 693 | struct r3964_info *pInfo = from_timer(pInfo, t, tmr); |
694 | 694 | ||
695 | switch (pInfo->state) { | 695 | switch (pInfo->state) { |
696 | case R3964_TX_REQUEST: | 696 | case R3964_TX_REQUEST: |
@@ -993,7 +993,7 @@ static int r3964_open(struct tty_struct *tty) | |||
993 | tty->disc_data = pInfo; | 993 | tty->disc_data = pInfo; |
994 | tty->receive_room = 65536; | 994 | tty->receive_room = 65536; |
995 | 995 | ||
996 | setup_timer(&pInfo->tmr, on_timeout, (unsigned long)pInfo); | 996 | timer_setup(&pInfo->tmr, on_timeout, 0); |
997 | 997 | ||
998 | return 0; | 998 | return 0; |
999 | } | 999 | } |
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c index 1421804975e0..c9458a033e3c 100644 --- a/drivers/tty/serial/crisv10.c +++ b/drivers/tty/serial/crisv10.c | |||
@@ -2059,7 +2059,7 @@ static void flush_timeout_function(unsigned long data) | |||
2059 | static struct timer_list flush_timer; | 2059 | static struct timer_list flush_timer; |
2060 | 2060 | ||
2061 | static void | 2061 | static void |
2062 | timed_flush_handler(unsigned long ptr) | 2062 | timed_flush_handler(struct timer_list *unused) |
2063 | { | 2063 | { |
2064 | struct e100_serial *info; | 2064 | struct e100_serial *info; |
2065 | int i; | 2065 | int i; |
@@ -4137,7 +4137,7 @@ static int __init rs_init(void) | |||
4137 | /* Setup the timed flush handler system */ | 4137 | /* Setup the timed flush handler system */ |
4138 | 4138 | ||
4139 | #if !defined(CONFIG_ETRAX_SERIAL_FAST_TIMER) | 4139 | #if !defined(CONFIG_ETRAX_SERIAL_FAST_TIMER) |
4140 | setup_timer(&flush_timer, timed_flush_handler, 0); | 4140 | timer_setup(&flush_timer, timed_flush_handler, 0); |
4141 | mod_timer(&flush_timer, jiffies + 5); | 4141 | mod_timer(&flush_timer, jiffies + 5); |
4142 | #endif | 4142 | #endif |
4143 | 4143 | ||
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index c84e6f0db54e..1c4d3f387138 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c | |||
@@ -966,9 +966,9 @@ static void lpuart_dma_rx_complete(void *arg) | |||
966 | lpuart_copy_rx_to_tty(sport); | 966 | lpuart_copy_rx_to_tty(sport); |
967 | } | 967 | } |
968 | 968 | ||
969 | static void lpuart_timer_func(unsigned long data) | 969 | static void lpuart_timer_func(struct timer_list *t) |
970 | { | 970 | { |
971 | struct lpuart_port *sport = (struct lpuart_port *)data; | 971 | struct lpuart_port *sport = from_timer(sport, t, lpuart_timer); |
972 | 972 | ||
973 | lpuart_copy_rx_to_tty(sport); | 973 | lpuart_copy_rx_to_tty(sport); |
974 | } | 974 | } |
@@ -1263,8 +1263,7 @@ static void lpuart32_setup_watermark(struct lpuart_port *sport) | |||
1263 | 1263 | ||
1264 | static void rx_dma_timer_init(struct lpuart_port *sport) | 1264 | static void rx_dma_timer_init(struct lpuart_port *sport) |
1265 | { | 1265 | { |
1266 | setup_timer(&sport->lpuart_timer, lpuart_timer_func, | 1266 | timer_setup(&sport->lpuart_timer, lpuart_timer_func, 0); |
1267 | (unsigned long)sport); | ||
1268 | sport->lpuart_timer.expires = jiffies + sport->dma_rx_timeout; | 1267 | sport->lpuart_timer.expires = jiffies + sport->dma_rx_timeout; |
1269 | add_timer(&sport->lpuart_timer); | 1268 | add_timer(&sport->lpuart_timer); |
1270 | } | 1269 | } |
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c index 473f4f81d690..ffefd218761e 100644 --- a/drivers/tty/serial/ifx6x60.c +++ b/drivers/tty/serial/ifx6x60.c | |||
@@ -263,9 +263,9 @@ static void mrdy_assert(struct ifx_spi_device *ifx_dev) | |||
263 | * The SPI has timed out: hang up the tty. Users will then see a hangup | 263 | * The SPI has timed out: hang up the tty. Users will then see a hangup |
264 | * and error events. | 264 | * and error events. |
265 | */ | 265 | */ |
266 | static void ifx_spi_timeout(unsigned long arg) | 266 | static void ifx_spi_timeout(struct timer_list *t) |
267 | { | 267 | { |
268 | struct ifx_spi_device *ifx_dev = (struct ifx_spi_device *)arg; | 268 | struct ifx_spi_device *ifx_dev = from_timer(ifx_dev, t, spi_timer); |
269 | 269 | ||
270 | dev_warn(&ifx_dev->spi_dev->dev, "*** SPI Timeout ***"); | 270 | dev_warn(&ifx_dev->spi_dev->dev, "*** SPI Timeout ***"); |
271 | tty_port_tty_hangup(&ifx_dev->tty_port, false); | 271 | tty_port_tty_hangup(&ifx_dev->tty_port, false); |
@@ -1016,8 +1016,7 @@ static int ifx_spi_spi_probe(struct spi_device *spi) | |||
1016 | spin_lock_init(&ifx_dev->write_lock); | 1016 | spin_lock_init(&ifx_dev->write_lock); |
1017 | spin_lock_init(&ifx_dev->power_lock); | 1017 | spin_lock_init(&ifx_dev->power_lock); |
1018 | ifx_dev->power_status = 0; | 1018 | ifx_dev->power_status = 0; |
1019 | setup_timer(&ifx_dev->spi_timer, ifx_spi_timeout, | 1019 | timer_setup(&ifx_dev->spi_timer, ifx_spi_timeout, 0); |
1020 | (unsigned long)ifx_dev); | ||
1021 | ifx_dev->modem = pl_data->modem_type; | 1020 | ifx_dev->modem = pl_data->modem_type; |
1022 | ifx_dev->use_dma = pl_data->use_dma; | 1021 | ifx_dev->use_dma = pl_data->use_dma; |
1023 | ifx_dev->max_hz = pl_data->max_hz; | 1022 | ifx_dev->max_hz = pl_data->max_hz; |
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index a67a606c38eb..e4b3d9123a03 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -906,9 +906,9 @@ static void imx_break_ctl(struct uart_port *port, int break_state) | |||
906 | * This is our per-port timeout handler, for checking the | 906 | * This is our per-port timeout handler, for checking the |
907 | * modem status signals. | 907 | * modem status signals. |
908 | */ | 908 | */ |
909 | static void imx_timeout(unsigned long data) | 909 | static void imx_timeout(struct timer_list *t) |
910 | { | 910 | { |
911 | struct imx_port *sport = (struct imx_port *)data; | 911 | struct imx_port *sport = from_timer(sport, t, timer); |
912 | unsigned long flags; | 912 | unsigned long flags; |
913 | 913 | ||
914 | if (sport->port.state) { | 914 | if (sport->port.state) { |
@@ -2082,7 +2082,7 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
2082 | sport->port.rs485_config = imx_rs485_config; | 2082 | sport->port.rs485_config = imx_rs485_config; |
2083 | sport->port.rs485.flags |= SER_RS485_RTS_ON_SEND; | 2083 | sport->port.rs485.flags |= SER_RS485_RTS_ON_SEND; |
2084 | sport->port.flags = UPF_BOOT_AUTOCONF; | 2084 | sport->port.flags = UPF_BOOT_AUTOCONF; |
2085 | setup_timer(&sport->timer, imx_timeout, (unsigned long)sport); | 2085 | timer_setup(&sport->timer, imx_timeout, 0); |
2086 | 2086 | ||
2087 | sport->gpios = mctrl_gpio_init(&sport->port, 0); | 2087 | sport->gpios = mctrl_gpio_init(&sport->port, 0); |
2088 | if (IS_ERR(sport->gpios)) | 2088 | if (IS_ERR(sport->gpios)) |
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c index ed2b03058627..4029272891f9 100644 --- a/drivers/tty/serial/kgdb_nmi.c +++ b/drivers/tty/serial/kgdb_nmi.c | |||
@@ -188,9 +188,9 @@ bool kgdb_nmi_poll_knock(void) | |||
188 | * The tasklet is cheap, it does not cause wakeups when reschedules itself, | 188 | * The tasklet is cheap, it does not cause wakeups when reschedules itself, |
189 | * instead it waits for the next tick. | 189 | * instead it waits for the next tick. |
190 | */ | 190 | */ |
191 | static void kgdb_nmi_tty_receiver(unsigned long data) | 191 | static void kgdb_nmi_tty_receiver(struct timer_list *t) |
192 | { | 192 | { |
193 | struct kgdb_nmi_tty_priv *priv = (void *)data; | 193 | struct kgdb_nmi_tty_priv *priv = from_timer(priv, t, timer); |
194 | char ch; | 194 | char ch; |
195 | 195 | ||
196 | priv->timer.expires = jiffies + (HZ/100); | 196 | priv->timer.expires = jiffies + (HZ/100); |
@@ -241,7 +241,7 @@ static int kgdb_nmi_tty_install(struct tty_driver *drv, struct tty_struct *tty) | |||
241 | return -ENOMEM; | 241 | return -ENOMEM; |
242 | 242 | ||
243 | INIT_KFIFO(priv->fifo); | 243 | INIT_KFIFO(priv->fifo); |
244 | setup_timer(&priv->timer, kgdb_nmi_tty_receiver, (unsigned long)priv); | 244 | timer_setup(&priv->timer, kgdb_nmi_tty_receiver, 0); |
245 | tty_port_init(&priv->port); | 245 | tty_port_init(&priv->port); |
246 | priv->port.ops = &kgdb_nmi_tty_port_ops; | 246 | priv->port.ops = &kgdb_nmi_tty_port_ops; |
247 | tty->driver_data = priv; | 247 | tty->driver_data = priv; |
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index 27d6049eb6a9..371569a0fd00 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c | |||
@@ -178,9 +178,9 @@ static void max3100_dowork(struct max3100_port *s) | |||
178 | queue_work(s->workqueue, &s->work); | 178 | queue_work(s->workqueue, &s->work); |
179 | } | 179 | } |
180 | 180 | ||
181 | static void max3100_timeout(unsigned long data) | 181 | static void max3100_timeout(struct timer_list *t) |
182 | { | 182 | { |
183 | struct max3100_port *s = (struct max3100_port *)data; | 183 | struct max3100_port *s = from_timer(s, t, timer); |
184 | 184 | ||
185 | if (s->port.state) { | 185 | if (s->port.state) { |
186 | max3100_dowork(s); | 186 | max3100_dowork(s); |
@@ -780,8 +780,7 @@ static int max3100_probe(struct spi_device *spi) | |||
780 | max3100s[i]->poll_time = 1; | 780 | max3100s[i]->poll_time = 1; |
781 | max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; | 781 | max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend; |
782 | max3100s[i]->minor = i; | 782 | max3100s[i]->minor = i; |
783 | setup_timer(&max3100s[i]->timer, max3100_timeout, | 783 | timer_setup(&max3100s[i]->timer, max3100_timeout, 0); |
784 | (unsigned long)max3100s[i]); | ||
785 | 784 | ||
786 | dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i); | 785 | dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i); |
787 | max3100s[i]->port.irq = max3100s[i]->irq; | 786 | max3100s[i]->port.irq = max3100s[i]->irq; |
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c index 3b74369c262f..00ce31e8d19a 100644 --- a/drivers/tty/serial/mux.c +++ b/drivers/tty/serial/mux.c | |||
@@ -371,7 +371,7 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser) | |||
371 | * | 371 | * |
372 | * This function periodically polls the Serial MUX to check for new data. | 372 | * This function periodically polls the Serial MUX to check for new data. |
373 | */ | 373 | */ |
374 | static void mux_poll(unsigned long unused) | 374 | static void mux_poll(struct timer_list *unused) |
375 | { | 375 | { |
376 | int i; | 376 | int i; |
377 | 377 | ||
@@ -572,7 +572,7 @@ static int __init mux_init(void) | |||
572 | 572 | ||
573 | if(port_cnt > 0) { | 573 | if(port_cnt > 0) { |
574 | /* Start the Mux timer */ | 574 | /* Start the Mux timer */ |
575 | setup_timer(&mux_timer, mux_poll, 0UL); | 575 | timer_setup(&mux_timer, mux_poll, 0); |
576 | mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY); | 576 | mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY); |
577 | 577 | ||
578 | #ifdef CONFIG_SERIAL_MUX_CONSOLE | 578 | #ifdef CONFIG_SERIAL_MUX_CONSOLE |
diff --git a/drivers/tty/serial/pnx8xxx_uart.c b/drivers/tty/serial/pnx8xxx_uart.c index f8812389b8a8..223a9499104e 100644 --- a/drivers/tty/serial/pnx8xxx_uart.c +++ b/drivers/tty/serial/pnx8xxx_uart.c | |||
@@ -103,9 +103,9 @@ static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport) | |||
103 | * This is our per-port timeout handler, for checking the | 103 | * This is our per-port timeout handler, for checking the |
104 | * modem status signals. | 104 | * modem status signals. |
105 | */ | 105 | */ |
106 | static void pnx8xxx_timeout(unsigned long data) | 106 | static void pnx8xxx_timeout(struct timer_list *t) |
107 | { | 107 | { |
108 | struct pnx8xxx_port *sport = (struct pnx8xxx_port *)data; | 108 | struct pnx8xxx_port *sport = from_timer(sport, t, timer); |
109 | unsigned long flags; | 109 | unsigned long flags; |
110 | 110 | ||
111 | if (sport->port.state) { | 111 | if (sport->port.state) { |
@@ -662,8 +662,7 @@ static void __init pnx8xxx_init_ports(void) | |||
662 | first = 0; | 662 | first = 0; |
663 | 663 | ||
664 | for (i = 0; i < NR_PORTS; i++) { | 664 | for (i = 0; i < NR_PORTS; i++) { |
665 | setup_timer(&pnx8xxx_ports[i].timer, pnx8xxx_timeout, | 665 | timer_setup(&pnx8xxx_ports[i].timer, pnx8xxx_timeout, 0); |
666 | (unsigned long)&pnx8xxx_ports[i]); | ||
667 | pnx8xxx_ports[i].port.ops = &pnx8xxx_pops; | 666 | pnx8xxx_ports[i].port.ops = &pnx8xxx_pops; |
668 | } | 667 | } |
669 | } | 668 | } |
diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c index 4e3f169b30cf..a399772be3fc 100644 --- a/drivers/tty/serial/sa1100.c +++ b/drivers/tty/serial/sa1100.c | |||
@@ -110,9 +110,9 @@ static void sa1100_mctrl_check(struct sa1100_port *sport) | |||
110 | * This is our per-port timeout handler, for checking the | 110 | * This is our per-port timeout handler, for checking the |
111 | * modem status signals. | 111 | * modem status signals. |
112 | */ | 112 | */ |
113 | static void sa1100_timeout(unsigned long data) | 113 | static void sa1100_timeout(struct timer_list *t) |
114 | { | 114 | { |
115 | struct sa1100_port *sport = (struct sa1100_port *)data; | 115 | struct sa1100_port *sport = from_timer(sport, t, timer); |
116 | unsigned long flags; | 116 | unsigned long flags; |
117 | 117 | ||
118 | if (sport->port.state) { | 118 | if (sport->port.state) { |
@@ -627,8 +627,7 @@ static void __init sa1100_init_ports(void) | |||
627 | sa1100_ports[i].port.fifosize = 8; | 627 | sa1100_ports[i].port.fifosize = 8; |
628 | sa1100_ports[i].port.line = i; | 628 | sa1100_ports[i].port.line = i; |
629 | sa1100_ports[i].port.iotype = UPIO_MEM; | 629 | sa1100_ports[i].port.iotype = UPIO_MEM; |
630 | setup_timer(&sa1100_ports[i].timer, sa1100_timeout, | 630 | timer_setup(&sa1100_ports[i].timer, sa1100_timeout, 0); |
631 | (unsigned long)&sa1100_ports[i]); | ||
632 | } | 631 | } |
633 | 632 | ||
634 | /* | 633 | /* |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 31fcc7072a90..d9f399c4e90c 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -1058,9 +1058,9 @@ static int scif_rtrg_enabled(struct uart_port *port) | |||
1058 | (SCFCR_RTRG0 | SCFCR_RTRG1)) != 0; | 1058 | (SCFCR_RTRG0 | SCFCR_RTRG1)) != 0; |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | static void rx_fifo_timer_fn(unsigned long arg) | 1061 | static void rx_fifo_timer_fn(struct timer_list *t) |
1062 | { | 1062 | { |
1063 | struct sci_port *s = (struct sci_port *)arg; | 1063 | struct sci_port *s = from_timer(s, t, rx_fifo_timer); |
1064 | struct uart_port *port = &s->port; | 1064 | struct uart_port *port = &s->port; |
1065 | 1065 | ||
1066 | dev_dbg(port->dev, "Rx timed out\n"); | 1066 | dev_dbg(port->dev, "Rx timed out\n"); |
@@ -1138,8 +1138,7 @@ static ssize_t rx_fifo_timeout_store(struct device *dev, | |||
1138 | sci->rx_fifo_timeout = r; | 1138 | sci->rx_fifo_timeout = r; |
1139 | scif_set_rtrg(port, 1); | 1139 | scif_set_rtrg(port, 1); |
1140 | if (r > 0) | 1140 | if (r > 0) |
1141 | setup_timer(&sci->rx_fifo_timer, rx_fifo_timer_fn, | 1141 | timer_setup(&sci->rx_fifo_timer, rx_fifo_timer_fn, 0); |
1142 | (unsigned long)sci); | ||
1143 | } | 1142 | } |
1144 | 1143 | ||
1145 | return count; | 1144 | return count; |
@@ -1392,9 +1391,9 @@ static void work_fn_tx(struct work_struct *work) | |||
1392 | dma_async_issue_pending(chan); | 1391 | dma_async_issue_pending(chan); |
1393 | } | 1392 | } |
1394 | 1393 | ||
1395 | static void rx_timer_fn(unsigned long arg) | 1394 | static void rx_timer_fn(struct timer_list *t) |
1396 | { | 1395 | { |
1397 | struct sci_port *s = (struct sci_port *)arg; | 1396 | struct sci_port *s = from_timer(s, t, rx_timer); |
1398 | struct dma_chan *chan = s->chan_rx; | 1397 | struct dma_chan *chan = s->chan_rx; |
1399 | struct uart_port *port = &s->port; | 1398 | struct uart_port *port = &s->port; |
1400 | struct dma_tx_state state; | 1399 | struct dma_tx_state state; |
@@ -1572,7 +1571,7 @@ static void sci_request_dma(struct uart_port *port) | |||
1572 | dma += s->buf_len_rx; | 1571 | dma += s->buf_len_rx; |
1573 | } | 1572 | } |
1574 | 1573 | ||
1575 | setup_timer(&s->rx_timer, rx_timer_fn, (unsigned long)s); | 1574 | timer_setup(&s->rx_timer, rx_timer_fn, 0); |
1576 | 1575 | ||
1577 | if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) | 1576 | if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) |
1578 | sci_submit_rx(s); | 1577 | sci_submit_rx(s); |
@@ -2238,8 +2237,7 @@ static void sci_reset(struct uart_port *port) | |||
2238 | if (s->rx_trigger > 1) { | 2237 | if (s->rx_trigger > 1) { |
2239 | if (s->rx_fifo_timeout) { | 2238 | if (s->rx_fifo_timeout) { |
2240 | scif_set_rtrg(port, 1); | 2239 | scif_set_rtrg(port, 1); |
2241 | setup_timer(&s->rx_fifo_timer, rx_fifo_timer_fn, | 2240 | timer_setup(&s->rx_fifo_timer, rx_fifo_timer_fn, 0); |
2242 | (unsigned long)s); | ||
2243 | } else { | 2241 | } else { |
2244 | if (port->type == PORT_SCIFA || | 2242 | if (port->type == PORT_SCIFA || |
2245 | port->type == PORT_SCIFB) | 2243 | port->type == PORT_SCIFB) |
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c index ed78542c4c37..42b9aded4eb1 100644 --- a/drivers/tty/serial/sn_console.c +++ b/drivers/tty/serial/sn_console.c | |||
@@ -612,9 +612,9 @@ static irqreturn_t sn_sal_interrupt(int irq, void *dev_id) | |||
612 | * Obviously not used in interrupt mode | 612 | * Obviously not used in interrupt mode |
613 | * | 613 | * |
614 | */ | 614 | */ |
615 | static void sn_sal_timer_poll(unsigned long data) | 615 | static void sn_sal_timer_poll(struct timer_list *t) |
616 | { | 616 | { |
617 | struct sn_cons_port *port = (struct sn_cons_port *)data; | 617 | struct sn_cons_port *port = from_timer(port, t, sc_timer); |
618 | unsigned long flags; | 618 | unsigned long flags; |
619 | 619 | ||
620 | if (!port) | 620 | if (!port) |
@@ -668,7 +668,7 @@ static void __init sn_sal_switch_to_asynch(struct sn_cons_port *port) | |||
668 | * timer to poll for input and push data from the console | 668 | * timer to poll for input and push data from the console |
669 | * buffer. | 669 | * buffer. |
670 | */ | 670 | */ |
671 | setup_timer(&port->sc_timer, sn_sal_timer_poll, (unsigned long)port); | 671 | timer_setup(&port->sc_timer, sn_sal_timer_poll, 0); |
672 | 672 | ||
673 | if (IS_RUNNING_ON_SIMULATOR()) | 673 | if (IS_RUNNING_ON_SIMULATOR()) |
674 | port->sc_interrupt_timeout = 6; | 674 | port->sc_interrupt_timeout = 6; |
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c index f2c34d656144..3c4ad71f261d 100644 --- a/drivers/tty/synclink.c +++ b/drivers/tty/synclink.c | |||
@@ -700,7 +700,7 @@ static void usc_enable_async_clock( struct mgsl_struct *info, u32 DataRate ); | |||
700 | 700 | ||
701 | static void usc_loopback_frame( struct mgsl_struct *info ); | 701 | static void usc_loopback_frame( struct mgsl_struct *info ); |
702 | 702 | ||
703 | static void mgsl_tx_timeout(unsigned long context); | 703 | static void mgsl_tx_timeout(struct timer_list *t); |
704 | 704 | ||
705 | 705 | ||
706 | static void usc_loopmode_cancel_transmit( struct mgsl_struct * info ); | 706 | static void usc_loopmode_cancel_transmit( struct mgsl_struct * info ); |
@@ -1768,7 +1768,7 @@ static int startup(struct mgsl_struct * info) | |||
1768 | 1768 | ||
1769 | memset(&info->icount, 0, sizeof(info->icount)); | 1769 | memset(&info->icount, 0, sizeof(info->icount)); |
1770 | 1770 | ||
1771 | setup_timer(&info->tx_timer, mgsl_tx_timeout, (unsigned long)info); | 1771 | timer_setup(&info->tx_timer, mgsl_tx_timeout, 0); |
1772 | 1772 | ||
1773 | /* Allocate and claim adapter resources */ | 1773 | /* Allocate and claim adapter resources */ |
1774 | retval = mgsl_claim_resources(info); | 1774 | retval = mgsl_claim_resources(info); |
@@ -7517,9 +7517,9 @@ static void mgsl_trace_block(struct mgsl_struct *info,const char* data, int coun | |||
7517 | * Arguments: context pointer to device instance data | 7517 | * Arguments: context pointer to device instance data |
7518 | * Return Value: None | 7518 | * Return Value: None |
7519 | */ | 7519 | */ |
7520 | static void mgsl_tx_timeout(unsigned long context) | 7520 | static void mgsl_tx_timeout(struct timer_list *t) |
7521 | { | 7521 | { |
7522 | struct mgsl_struct *info = (struct mgsl_struct*)context; | 7522 | struct mgsl_struct *info = from_timer(info, t, tx_timer); |
7523 | unsigned long flags; | 7523 | unsigned long flags; |
7524 | 7524 | ||
7525 | if ( debug_level >= DEBUG_LEVEL_INFO ) | 7525 | if ( debug_level >= DEBUG_LEVEL_INFO ) |
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 06a03731bba7..255c49687877 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
@@ -493,8 +493,8 @@ static void free_bufs(struct slgt_info *info, struct slgt_desc *bufs, int count) | |||
493 | static int alloc_tmp_rbuf(struct slgt_info *info); | 493 | static int alloc_tmp_rbuf(struct slgt_info *info); |
494 | static void free_tmp_rbuf(struct slgt_info *info); | 494 | static void free_tmp_rbuf(struct slgt_info *info); |
495 | 495 | ||
496 | static void tx_timeout(unsigned long context); | 496 | static void tx_timeout(struct timer_list *t); |
497 | static void rx_timeout(unsigned long context); | 497 | static void rx_timeout(struct timer_list *t); |
498 | 498 | ||
499 | /* | 499 | /* |
500 | * ioctl handlers | 500 | * ioctl handlers |
@@ -3597,8 +3597,8 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev | |||
3597 | info->adapter_num = adapter_num; | 3597 | info->adapter_num = adapter_num; |
3598 | info->port_num = port_num; | 3598 | info->port_num = port_num; |
3599 | 3599 | ||
3600 | setup_timer(&info->tx_timer, tx_timeout, (unsigned long)info); | 3600 | timer_setup(&info->tx_timer, tx_timeout, 0); |
3601 | setup_timer(&info->rx_timer, rx_timeout, (unsigned long)info); | 3601 | timer_setup(&info->rx_timer, rx_timeout, 0); |
3602 | 3602 | ||
3603 | /* Copy configuration info to device instance data */ | 3603 | /* Copy configuration info to device instance data */ |
3604 | info->pdev = pdev; | 3604 | info->pdev = pdev; |
@@ -5112,9 +5112,9 @@ static int adapter_test(struct slgt_info *info) | |||
5112 | /* | 5112 | /* |
5113 | * transmit timeout handler | 5113 | * transmit timeout handler |
5114 | */ | 5114 | */ |
5115 | static void tx_timeout(unsigned long context) | 5115 | static void tx_timeout(struct timer_list *t) |
5116 | { | 5116 | { |
5117 | struct slgt_info *info = (struct slgt_info*)context; | 5117 | struct slgt_info *info = from_timer(info, t, tx_timer); |
5118 | unsigned long flags; | 5118 | unsigned long flags; |
5119 | 5119 | ||
5120 | DBGINFO(("%s tx_timeout\n", info->device_name)); | 5120 | DBGINFO(("%s tx_timeout\n", info->device_name)); |
@@ -5136,9 +5136,9 @@ static void tx_timeout(unsigned long context) | |||
5136 | /* | 5136 | /* |
5137 | * receive buffer polling timer | 5137 | * receive buffer polling timer |
5138 | */ | 5138 | */ |
5139 | static void rx_timeout(unsigned long context) | 5139 | static void rx_timeout(struct timer_list *t) |
5140 | { | 5140 | { |
5141 | struct slgt_info *info = (struct slgt_info*)context; | 5141 | struct slgt_info *info = from_timer(info, t, rx_timer); |
5142 | unsigned long flags; | 5142 | unsigned long flags; |
5143 | 5143 | ||
5144 | DBGINFO(("%s rx_timeout\n", info->device_name)); | 5144 | DBGINFO(("%s rx_timeout\n", info->device_name)); |
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index d45f234e1914..75f11ce1f0a1 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c | |||
@@ -615,8 +615,8 @@ static void free_tmp_rx_buf(SLMP_INFO *info); | |||
615 | 615 | ||
616 | static void load_pci_memory(SLMP_INFO *info, char* dest, const char* src, unsigned short count); | 616 | static void load_pci_memory(SLMP_INFO *info, char* dest, const char* src, unsigned short count); |
617 | static void trace_block(SLMP_INFO *info, const char* data, int count, int xmit); | 617 | static void trace_block(SLMP_INFO *info, const char* data, int count, int xmit); |
618 | static void tx_timeout(unsigned long context); | 618 | static void tx_timeout(struct timer_list *t); |
619 | static void status_timeout(unsigned long context); | 619 | static void status_timeout(struct timer_list *t); |
620 | 620 | ||
621 | static unsigned char read_reg(SLMP_INFO *info, unsigned char addr); | 621 | static unsigned char read_reg(SLMP_INFO *info, unsigned char addr); |
622 | static void write_reg(SLMP_INFO *info, unsigned char addr, unsigned char val); | 622 | static void write_reg(SLMP_INFO *info, unsigned char addr, unsigned char val); |
@@ -3782,9 +3782,8 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev) | |||
3782 | info->bus_type = MGSL_BUS_TYPE_PCI; | 3782 | info->bus_type = MGSL_BUS_TYPE_PCI; |
3783 | info->irq_flags = IRQF_SHARED; | 3783 | info->irq_flags = IRQF_SHARED; |
3784 | 3784 | ||
3785 | setup_timer(&info->tx_timer, tx_timeout, (unsigned long)info); | 3785 | timer_setup(&info->tx_timer, tx_timeout, 0); |
3786 | setup_timer(&info->status_timer, status_timeout, | 3786 | timer_setup(&info->status_timer, status_timeout, 0); |
3787 | (unsigned long)info); | ||
3788 | 3787 | ||
3789 | /* Store the PCI9050 misc control register value because a flaw | 3788 | /* Store the PCI9050 misc control register value because a flaw |
3790 | * in the PCI9050 prevents LCR registers from being read if | 3789 | * in the PCI9050 prevents LCR registers from being read if |
@@ -5468,9 +5467,9 @@ static void trace_block(SLMP_INFO *info,const char* data, int count, int xmit) | |||
5468 | /* called when HDLC frame times out | 5467 | /* called when HDLC frame times out |
5469 | * update stats and do tx completion processing | 5468 | * update stats and do tx completion processing |
5470 | */ | 5469 | */ |
5471 | static void tx_timeout(unsigned long context) | 5470 | static void tx_timeout(struct timer_list *t) |
5472 | { | 5471 | { |
5473 | SLMP_INFO *info = (SLMP_INFO*)context; | 5472 | SLMP_INFO *info = from_timer(info, t, tx_timer); |
5474 | unsigned long flags; | 5473 | unsigned long flags; |
5475 | 5474 | ||
5476 | if ( debug_level >= DEBUG_LEVEL_INFO ) | 5475 | if ( debug_level >= DEBUG_LEVEL_INFO ) |
@@ -5495,10 +5494,10 @@ static void tx_timeout(unsigned long context) | |||
5495 | 5494 | ||
5496 | /* called to periodically check the DSR/RI modem signal input status | 5495 | /* called to periodically check the DSR/RI modem signal input status |
5497 | */ | 5496 | */ |
5498 | static void status_timeout(unsigned long context) | 5497 | static void status_timeout(struct timer_list *t) |
5499 | { | 5498 | { |
5500 | u16 status = 0; | 5499 | u16 status = 0; |
5501 | SLMP_INFO *info = (SLMP_INFO*)context; | 5500 | SLMP_INFO *info = from_timer(info, t, status_timer); |
5502 | unsigned long flags; | 5501 | unsigned long flags; |
5503 | unsigned char delta; | 5502 | unsigned char delta; |
5504 | 5503 | ||
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 19b5c4afeef2..fc32391a34d5 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -788,9 +788,11 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd) | |||
788 | EXPORT_SYMBOL_GPL(usb_hcd_poll_rh_status); | 788 | EXPORT_SYMBOL_GPL(usb_hcd_poll_rh_status); |
789 | 789 | ||
790 | /* timer callback */ | 790 | /* timer callback */ |
791 | static void rh_timer_func (unsigned long _hcd) | 791 | static void rh_timer_func (struct timer_list *t) |
792 | { | 792 | { |
793 | usb_hcd_poll_rh_status((struct usb_hcd *) _hcd); | 793 | struct usb_hcd *_hcd = from_timer(_hcd, t, rh_timer); |
794 | |||
795 | usb_hcd_poll_rh_status(_hcd); | ||
794 | } | 796 | } |
795 | 797 | ||
796 | /*-------------------------------------------------------------------------*/ | 798 | /*-------------------------------------------------------------------------*/ |
@@ -2545,7 +2547,7 @@ struct usb_hcd *__usb_create_hcd(const struct hc_driver *driver, | |||
2545 | hcd->self.bus_name = bus_name; | 2547 | hcd->self.bus_name = bus_name; |
2546 | hcd->self.uses_dma = (sysdev->dma_mask != NULL); | 2548 | hcd->self.uses_dma = (sysdev->dma_mask != NULL); |
2547 | 2549 | ||
2548 | setup_timer(&hcd->rh_timer, rh_timer_func, (unsigned long)hcd); | 2550 | timer_setup(&hcd->rh_timer, rh_timer_func, 0); |
2549 | #ifdef CONFIG_PM | 2551 | #ifdef CONFIG_PM |
2550 | INIT_WORK(&hcd->wakeup_work, hcd_resume_work); | 2552 | INIT_WORK(&hcd->wakeup_work, hcd_resume_work); |
2551 | #endif | 2553 | #endif |
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 69eb40cd1b47..7b6eb0ad513b 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c | |||
@@ -3314,9 +3314,9 @@ host: | |||
3314 | } | 3314 | } |
3315 | } | 3315 | } |
3316 | 3316 | ||
3317 | static void dwc2_wakeup_detected(unsigned long data) | 3317 | static void dwc2_wakeup_detected(struct timer_list *t) |
3318 | { | 3318 | { |
3319 | struct dwc2_hsotg *hsotg = (struct dwc2_hsotg *)data; | 3319 | struct dwc2_hsotg *hsotg = from_timer(hsotg, t, wkp_timer); |
3320 | u32 hprt0; | 3320 | u32 hprt0; |
3321 | 3321 | ||
3322 | dev_dbg(hsotg->dev, "%s()\n", __func__); | 3322 | dev_dbg(hsotg->dev, "%s()\n", __func__); |
@@ -5155,8 +5155,7 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg) | |||
5155 | } | 5155 | } |
5156 | INIT_WORK(&hsotg->wf_otg, dwc2_conn_id_status_change); | 5156 | INIT_WORK(&hsotg->wf_otg, dwc2_conn_id_status_change); |
5157 | 5157 | ||
5158 | setup_timer(&hsotg->wkp_timer, dwc2_wakeup_detected, | 5158 | timer_setup(&hsotg->wkp_timer, dwc2_wakeup_detected, 0); |
5159 | (unsigned long)hsotg); | ||
5160 | 5159 | ||
5161 | /* Initialize the non-periodic schedule */ | 5160 | /* Initialize the non-periodic schedule */ |
5162 | INIT_LIST_HEAD(&hsotg->non_periodic_sched_inactive); | 5161 | INIT_LIST_HEAD(&hsotg->non_periodic_sched_inactive); |
diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c index f472de238ac2..fcd1676c7f0b 100644 --- a/drivers/usb/dwc2/hcd_queue.c +++ b/drivers/usb/dwc2/hcd_queue.c | |||
@@ -1275,9 +1275,9 @@ static void dwc2_do_unreserve(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh) | |||
1275 | * | 1275 | * |
1276 | * @work: Pointer to a qh unreserve_work. | 1276 | * @work: Pointer to a qh unreserve_work. |
1277 | */ | 1277 | */ |
1278 | static void dwc2_unreserve_timer_fn(unsigned long data) | 1278 | static void dwc2_unreserve_timer_fn(struct timer_list *t) |
1279 | { | 1279 | { |
1280 | struct dwc2_qh *qh = (struct dwc2_qh *)data; | 1280 | struct dwc2_qh *qh = from_timer(qh, t, unreserve_timer); |
1281 | struct dwc2_hsotg *hsotg = qh->hsotg; | 1281 | struct dwc2_hsotg *hsotg = qh->hsotg; |
1282 | unsigned long flags; | 1282 | unsigned long flags; |
1283 | 1283 | ||
@@ -1467,8 +1467,7 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh, | |||
1467 | 1467 | ||
1468 | /* Initialize QH */ | 1468 | /* Initialize QH */ |
1469 | qh->hsotg = hsotg; | 1469 | qh->hsotg = hsotg; |
1470 | setup_timer(&qh->unreserve_timer, dwc2_unreserve_timer_fn, | 1470 | timer_setup(&qh->unreserve_timer, dwc2_unreserve_timer_fn, 0); |
1471 | (unsigned long)qh); | ||
1472 | qh->ep_type = ep_type; | 1471 | qh->ep_type = ep_type; |
1473 | qh->ep_is_in = ep_is_in; | 1472 | qh->ep_is_in = ep_is_in; |
1474 | 1473 | ||
diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c index bfe278294e88..ad743a8493be 100644 --- a/drivers/usb/gadget/udc/at91_udc.c +++ b/drivers/usb/gadget/udc/at91_udc.c | |||
@@ -1550,9 +1550,9 @@ static void at91_vbus_timer_work(struct work_struct *work) | |||
1550 | mod_timer(&udc->vbus_timer, jiffies + VBUS_POLL_TIMEOUT); | 1550 | mod_timer(&udc->vbus_timer, jiffies + VBUS_POLL_TIMEOUT); |
1551 | } | 1551 | } |
1552 | 1552 | ||
1553 | static void at91_vbus_timer(unsigned long data) | 1553 | static void at91_vbus_timer(struct timer_list *t) |
1554 | { | 1554 | { |
1555 | struct at91_udc *udc = (struct at91_udc *)data; | 1555 | struct at91_udc *udc = from_timer(udc, t, vbus_timer); |
1556 | 1556 | ||
1557 | /* | 1557 | /* |
1558 | * If we are polling vbus it is likely that the gpio is on an | 1558 | * If we are polling vbus it is likely that the gpio is on an |
@@ -1918,8 +1918,7 @@ static int at91udc_probe(struct platform_device *pdev) | |||
1918 | 1918 | ||
1919 | if (udc->board.vbus_polled) { | 1919 | if (udc->board.vbus_polled) { |
1920 | INIT_WORK(&udc->vbus_timer_work, at91_vbus_timer_work); | 1920 | INIT_WORK(&udc->vbus_timer_work, at91_vbus_timer_work); |
1921 | setup_timer(&udc->vbus_timer, at91_vbus_timer, | 1921 | timer_setup(&udc->vbus_timer, at91_vbus_timer, 0); |
1922 | (unsigned long)udc); | ||
1923 | mod_timer(&udc->vbus_timer, | 1922 | mod_timer(&udc->vbus_timer, |
1924 | jiffies + VBUS_POLL_TIMEOUT); | 1923 | jiffies + VBUS_POLL_TIMEOUT); |
1925 | } else { | 1924 | } else { |
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 4f1b1809472c..d0128f92ec5a 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c | |||
@@ -1771,9 +1771,9 @@ static int handle_control_request(struct dummy_hcd *dum_hcd, struct urb *urb, | |||
1771 | /* drive both sides of the transfers; looks like irq handlers to | 1771 | /* drive both sides of the transfers; looks like irq handlers to |
1772 | * both drivers except the callbacks aren't in_irq(). | 1772 | * both drivers except the callbacks aren't in_irq(). |
1773 | */ | 1773 | */ |
1774 | static void dummy_timer(unsigned long _dum_hcd) | 1774 | static void dummy_timer(struct timer_list *t) |
1775 | { | 1775 | { |
1776 | struct dummy_hcd *dum_hcd = (struct dummy_hcd *) _dum_hcd; | 1776 | struct dummy_hcd *dum_hcd = from_timer(dum_hcd, t, timer); |
1777 | struct dummy *dum = dum_hcd->dum; | 1777 | struct dummy *dum = dum_hcd->dum; |
1778 | struct urbp *urbp, *tmp; | 1778 | struct urbp *urbp, *tmp; |
1779 | unsigned long flags; | 1779 | unsigned long flags; |
@@ -2445,7 +2445,7 @@ static DEVICE_ATTR_RO(urbs); | |||
2445 | 2445 | ||
2446 | static int dummy_start_ss(struct dummy_hcd *dum_hcd) | 2446 | static int dummy_start_ss(struct dummy_hcd *dum_hcd) |
2447 | { | 2447 | { |
2448 | setup_timer(&dum_hcd->timer, dummy_timer, (unsigned long)dum_hcd); | 2448 | timer_setup(&dum_hcd->timer, dummy_timer, 0); |
2449 | dum_hcd->rh_state = DUMMY_RH_RUNNING; | 2449 | dum_hcd->rh_state = DUMMY_RH_RUNNING; |
2450 | dum_hcd->stream_en_ep = 0; | 2450 | dum_hcd->stream_en_ep = 0; |
2451 | INIT_LIST_HEAD(&dum_hcd->urbp_list); | 2451 | INIT_LIST_HEAD(&dum_hcd->urbp_list); |
@@ -2474,7 +2474,7 @@ static int dummy_start(struct usb_hcd *hcd) | |||
2474 | return dummy_start_ss(dum_hcd); | 2474 | return dummy_start_ss(dum_hcd); |
2475 | 2475 | ||
2476 | spin_lock_init(&dum_hcd->dum->lock); | 2476 | spin_lock_init(&dum_hcd->dum->lock); |
2477 | setup_timer(&dum_hcd->timer, dummy_timer, (unsigned long)dum_hcd); | 2477 | timer_setup(&dum_hcd->timer, dummy_timer, 0); |
2478 | dum_hcd->rh_state = DUMMY_RH_RUNNING; | 2478 | dum_hcd->rh_state = DUMMY_RH_RUNNING; |
2479 | 2479 | ||
2480 | INIT_LIST_HEAD(&dum_hcd->urbp_list); | 2480 | INIT_LIST_HEAD(&dum_hcd->urbp_list); |
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index f19e6282a688..a8288df6aadf 100644 --- a/drivers/usb/gadget/udc/m66592-udc.c +++ b/drivers/usb/gadget/udc/m66592-udc.c | |||
@@ -1259,9 +1259,9 @@ static irqreturn_t m66592_irq(int irq, void *_m66592) | |||
1259 | return IRQ_HANDLED; | 1259 | return IRQ_HANDLED; |
1260 | } | 1260 | } |
1261 | 1261 | ||
1262 | static void m66592_timer(unsigned long _m66592) | 1262 | static void m66592_timer(struct timer_list *t) |
1263 | { | 1263 | { |
1264 | struct m66592 *m66592 = (struct m66592 *)_m66592; | 1264 | struct m66592 *m66592 = from_timer(m66592, t, timer); |
1265 | unsigned long flags; | 1265 | unsigned long flags; |
1266 | u16 tmp; | 1266 | u16 tmp; |
1267 | 1267 | ||
@@ -1589,7 +1589,7 @@ static int m66592_probe(struct platform_device *pdev) | |||
1589 | m66592->gadget.max_speed = USB_SPEED_HIGH; | 1589 | m66592->gadget.max_speed = USB_SPEED_HIGH; |
1590 | m66592->gadget.name = udc_name; | 1590 | m66592->gadget.name = udc_name; |
1591 | 1591 | ||
1592 | setup_timer(&m66592->timer, m66592_timer, (unsigned long)m66592); | 1592 | timer_setup(&m66592->timer, m66592_timer, 0); |
1593 | m66592->reg = reg; | 1593 | m66592->reg = reg; |
1594 | 1594 | ||
1595 | ret = request_irq(ires->start, m66592_irq, IRQF_SHARED, | 1595 | ret = request_irq(ires->start, m66592_irq, IRQF_SHARED, |
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index fb8c4bff584c..dc35a54bad90 100644 --- a/drivers/usb/gadget/udc/omap_udc.c +++ b/drivers/usb/gadget/udc/omap_udc.c | |||
@@ -1854,9 +1854,9 @@ static irqreturn_t omap_udc_irq(int irq, void *_udc) | |||
1854 | #define PIO_OUT_TIMEOUT (jiffies + HZ/3) | 1854 | #define PIO_OUT_TIMEOUT (jiffies + HZ/3) |
1855 | #define HALF_FULL(f) (!((f)&(UDC_NON_ISO_FIFO_FULL|UDC_NON_ISO_FIFO_EMPTY))) | 1855 | #define HALF_FULL(f) (!((f)&(UDC_NON_ISO_FIFO_FULL|UDC_NON_ISO_FIFO_EMPTY))) |
1856 | 1856 | ||
1857 | static void pio_out_timer(unsigned long _ep) | 1857 | static void pio_out_timer(struct timer_list *t) |
1858 | { | 1858 | { |
1859 | struct omap_ep *ep = (void *) _ep; | 1859 | struct omap_ep *ep = from_timer(ep, t, timer); |
1860 | unsigned long flags; | 1860 | unsigned long flags; |
1861 | u16 stat_flg; | 1861 | u16 stat_flg; |
1862 | 1862 | ||
@@ -2542,7 +2542,7 @@ omap_ep_setup(char *name, u8 addr, u8 type, | |||
2542 | } | 2542 | } |
2543 | if (dbuf && addr) | 2543 | if (dbuf && addr) |
2544 | epn_rxtx |= UDC_EPN_RX_DB; | 2544 | epn_rxtx |= UDC_EPN_RX_DB; |
2545 | setup_timer(&ep->timer, pio_out_timer, (unsigned long)ep); | 2545 | timer_setup(&ep->timer, pio_out_timer, 0); |
2546 | } | 2546 | } |
2547 | if (addr) | 2547 | if (addr) |
2548 | epn_rxtx |= UDC_EPN_RX_VALID; | 2548 | epn_rxtx |= UDC_EPN_RX_VALID; |
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index 8f135d9fa245..0e3f5faa000e 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c | |||
@@ -1624,9 +1624,9 @@ static inline void clear_ep_state (struct pxa25x_udc *dev) | |||
1624 | nuke(&dev->ep[i], -ECONNABORTED); | 1624 | nuke(&dev->ep[i], -ECONNABORTED); |
1625 | } | 1625 | } |
1626 | 1626 | ||
1627 | static void udc_watchdog(unsigned long _dev) | 1627 | static void udc_watchdog(struct timer_list *t) |
1628 | { | 1628 | { |
1629 | struct pxa25x_udc *dev = (void *)_dev; | 1629 | struct pxa25x_udc *dev = from_timer(dev, t, timer); |
1630 | 1630 | ||
1631 | local_irq_disable(); | 1631 | local_irq_disable(); |
1632 | if (dev->ep0state == EP0_STALL | 1632 | if (dev->ep0state == EP0_STALL |
@@ -2413,7 +2413,7 @@ static int pxa25x_udc_probe(struct platform_device *pdev) | |||
2413 | gpio_direction_output(dev->mach->gpio_pullup, 0); | 2413 | gpio_direction_output(dev->mach->gpio_pullup, 0); |
2414 | } | 2414 | } |
2415 | 2415 | ||
2416 | setup_timer(&dev->timer, udc_watchdog, (unsigned long)dev); | 2416 | timer_setup(&dev->timer, udc_watchdog, 0); |
2417 | 2417 | ||
2418 | the_controller = dev; | 2418 | the_controller = dev; |
2419 | platform_set_drvdata(pdev, dev); | 2419 | platform_set_drvdata(pdev, dev); |
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index 143122ed3c66..a3ecce62662b 100644 --- a/drivers/usb/gadget/udc/r8a66597-udc.c +++ b/drivers/usb/gadget/udc/r8a66597-udc.c | |||
@@ -1514,9 +1514,9 @@ static irqreturn_t r8a66597_irq(int irq, void *_r8a66597) | |||
1514 | return IRQ_HANDLED; | 1514 | return IRQ_HANDLED; |
1515 | } | 1515 | } |
1516 | 1516 | ||
1517 | static void r8a66597_timer(unsigned long _r8a66597) | 1517 | static void r8a66597_timer(struct timer_list *t) |
1518 | { | 1518 | { |
1519 | struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597; | 1519 | struct r8a66597 *r8a66597 = from_timer(r8a66597, t, timer); |
1520 | unsigned long flags; | 1520 | unsigned long flags; |
1521 | u16 tmp; | 1521 | u16 tmp; |
1522 | 1522 | ||
@@ -1874,7 +1874,7 @@ static int r8a66597_probe(struct platform_device *pdev) | |||
1874 | r8a66597->gadget.max_speed = USB_SPEED_HIGH; | 1874 | r8a66597->gadget.max_speed = USB_SPEED_HIGH; |
1875 | r8a66597->gadget.name = udc_name; | 1875 | r8a66597->gadget.name = udc_name; |
1876 | 1876 | ||
1877 | setup_timer(&r8a66597->timer, r8a66597_timer, (unsigned long)r8a66597); | 1877 | timer_setup(&r8a66597->timer, r8a66597_timer, 0); |
1878 | r8a66597->reg = reg; | 1878 | r8a66597->reg = reg; |
1879 | 1879 | ||
1880 | if (r8a66597->pdata->on_chip) { | 1880 | if (r8a66597->pdata->on_chip) { |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 10887e09e9bc..ee9676349333 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -80,7 +80,7 @@ static const char hcd_name [] = "ohci_hcd"; | |||
80 | 80 | ||
81 | static void ohci_dump(struct ohci_hcd *ohci); | 81 | static void ohci_dump(struct ohci_hcd *ohci); |
82 | static void ohci_stop(struct usb_hcd *hcd); | 82 | static void ohci_stop(struct usb_hcd *hcd); |
83 | static void io_watchdog_func(unsigned long _ohci); | 83 | static void io_watchdog_func(struct timer_list *t); |
84 | 84 | ||
85 | #include "ohci-hub.c" | 85 | #include "ohci-hub.c" |
86 | #include "ohci-dbg.c" | 86 | #include "ohci-dbg.c" |
@@ -500,8 +500,7 @@ static int ohci_init (struct ohci_hcd *ohci) | |||
500 | if (ohci->hcca) | 500 | if (ohci->hcca) |
501 | return 0; | 501 | return 0; |
502 | 502 | ||
503 | setup_timer(&ohci->io_watchdog, io_watchdog_func, | 503 | timer_setup(&ohci->io_watchdog, io_watchdog_func, 0); |
504 | (unsigned long) ohci); | ||
505 | 504 | ||
506 | ohci->hcca = dma_alloc_coherent (hcd->self.controller, | 505 | ohci->hcca = dma_alloc_coherent (hcd->self.controller, |
507 | sizeof(*ohci->hcca), &ohci->hcca_dma, GFP_KERNEL); | 506 | sizeof(*ohci->hcca), &ohci->hcca_dma, GFP_KERNEL); |
@@ -723,9 +722,9 @@ static int ohci_start(struct usb_hcd *hcd) | |||
723 | * the unlink list. As a result, URBs could never be dequeued and | 722 | * the unlink list. As a result, URBs could never be dequeued and |
724 | * endpoints could never be released. | 723 | * endpoints could never be released. |
725 | */ | 724 | */ |
726 | static void io_watchdog_func(unsigned long _ohci) | 725 | static void io_watchdog_func(struct timer_list *t) |
727 | { | 726 | { |
728 | struct ohci_hcd *ohci = (struct ohci_hcd *) _ohci; | 727 | struct ohci_hcd *ohci = from_timer(ohci, t, io_watchdog); |
729 | bool takeback_all_pending = false; | 728 | bool takeback_all_pending = false; |
730 | u32 status; | 729 | u32 status; |
731 | u32 head; | 730 | u32 head; |
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 0bf7759aae78..c5e6e8d0b5ef 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c | |||
@@ -2539,9 +2539,9 @@ static irqreturn_t oxu_irq(struct usb_hcd *hcd) | |||
2539 | return ret; | 2539 | return ret; |
2540 | } | 2540 | } |
2541 | 2541 | ||
2542 | static void oxu_watchdog(unsigned long param) | 2542 | static void oxu_watchdog(struct timer_list *t) |
2543 | { | 2543 | { |
2544 | struct oxu_hcd *oxu = (struct oxu_hcd *) param; | 2544 | struct oxu_hcd *oxu = from_timer(oxu, t, watchdog); |
2545 | unsigned long flags; | 2545 | unsigned long flags; |
2546 | 2546 | ||
2547 | spin_lock_irqsave(&oxu->lock, flags); | 2547 | spin_lock_irqsave(&oxu->lock, flags); |
@@ -2577,7 +2577,7 @@ static int oxu_hcd_init(struct usb_hcd *hcd) | |||
2577 | 2577 | ||
2578 | spin_lock_init(&oxu->lock); | 2578 | spin_lock_init(&oxu->lock); |
2579 | 2579 | ||
2580 | setup_timer(&oxu->watchdog, oxu_watchdog, (unsigned long)oxu); | 2580 | timer_setup(&oxu->watchdog, oxu_watchdog, 0); |
2581 | 2581 | ||
2582 | /* | 2582 | /* |
2583 | * hw default: 1K periodic list heads, one per frame. | 2583 | * hw default: 1K periodic list heads, one per frame. |
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index f3d9ba420a97..984892dd72f5 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c | |||
@@ -1798,9 +1798,9 @@ static void r8a66597_td_timer(struct timer_list *t) | |||
1798 | spin_unlock_irqrestore(&r8a66597->lock, flags); | 1798 | spin_unlock_irqrestore(&r8a66597->lock, flags); |
1799 | } | 1799 | } |
1800 | 1800 | ||
1801 | static void r8a66597_timer(unsigned long _r8a66597) | 1801 | static void r8a66597_timer(struct timer_list *t) |
1802 | { | 1802 | { |
1803 | struct r8a66597 *r8a66597 = (struct r8a66597 *)_r8a66597; | 1803 | struct r8a66597 *r8a66597 = from_timer(r8a66597, t, rh_timer); |
1804 | unsigned long flags; | 1804 | unsigned long flags; |
1805 | int port; | 1805 | int port; |
1806 | 1806 | ||
@@ -2472,8 +2472,7 @@ static int r8a66597_probe(struct platform_device *pdev) | |||
2472 | r8a66597->max_root_hub = 2; | 2472 | r8a66597->max_root_hub = 2; |
2473 | 2473 | ||
2474 | spin_lock_init(&r8a66597->lock); | 2474 | spin_lock_init(&r8a66597->lock); |
2475 | setup_timer(&r8a66597->rh_timer, r8a66597_timer, | 2475 | timer_setup(&r8a66597->rh_timer, r8a66597_timer, 0); |
2476 | (unsigned long)r8a66597); | ||
2477 | r8a66597->reg = reg; | 2476 | r8a66597->reg = reg; |
2478 | 2477 | ||
2479 | /* make sure no interrupts are pending */ | 2478 | /* make sure no interrupts are pending */ |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 601fb00603cc..fa88a903fa2e 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1119,9 +1119,9 @@ sl811h_hub_descriptor ( | |||
1119 | } | 1119 | } |
1120 | 1120 | ||
1121 | static void | 1121 | static void |
1122 | sl811h_timer(unsigned long _sl811) | 1122 | sl811h_timer(struct timer_list *t) |
1123 | { | 1123 | { |
1124 | struct sl811 *sl811 = (void *) _sl811; | 1124 | struct sl811 *sl811 = from_timer(sl811, t, timer); |
1125 | unsigned long flags; | 1125 | unsigned long flags; |
1126 | u8 irqstat; | 1126 | u8 irqstat; |
1127 | u8 signaling = sl811->ctrl1 & SL11H_CTL1MASK_FORCE; | 1127 | u8 signaling = sl811->ctrl1 & SL11H_CTL1MASK_FORCE; |
@@ -1692,7 +1692,7 @@ sl811h_probe(struct platform_device *dev) | |||
1692 | spin_lock_init(&sl811->lock); | 1692 | spin_lock_init(&sl811->lock); |
1693 | INIT_LIST_HEAD(&sl811->async); | 1693 | INIT_LIST_HEAD(&sl811->async); |
1694 | sl811->board = dev_get_platdata(&dev->dev); | 1694 | sl811->board = dev_get_platdata(&dev->dev); |
1695 | setup_timer(&sl811->timer, sl811h_timer, (unsigned long)sl811); | 1695 | timer_setup(&sl811->timer, sl811h_timer, 0); |
1696 | sl811->addr_reg = addr_reg; | 1696 | sl811->addr_reg = addr_reg; |
1697 | sl811->data_reg = data_reg; | 1697 | sl811->data_reg = data_reg; |
1698 | 1698 | ||
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index babeefd84ffd..f5c90217777a 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -585,8 +585,7 @@ static int uhci_start(struct usb_hcd *hcd) | |||
585 | hcd->self.sg_tablesize = ~0; | 585 | hcd->self.sg_tablesize = ~0; |
586 | 586 | ||
587 | spin_lock_init(&uhci->lock); | 587 | spin_lock_init(&uhci->lock); |
588 | setup_timer(&uhci->fsbr_timer, uhci_fsbr_timeout, | 588 | timer_setup(&uhci->fsbr_timer, uhci_fsbr_timeout, 0); |
589 | (unsigned long) uhci); | ||
590 | INIT_LIST_HEAD(&uhci->idle_qh_list); | 589 | INIT_LIST_HEAD(&uhci->idle_qh_list); |
591 | init_waitqueue_head(&uhci->waitqh); | 590 | init_waitqueue_head(&uhci->waitqh); |
592 | 591 | ||
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c index 49d4edc03cc2..d40438238938 100644 --- a/drivers/usb/host/uhci-q.c +++ b/drivers/usb/host/uhci-q.c | |||
@@ -90,9 +90,9 @@ static void uhci_urbp_wants_fsbr(struct uhci_hcd *uhci, struct urb_priv *urbp) | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | static void uhci_fsbr_timeout(unsigned long _uhci) | 93 | static void uhci_fsbr_timeout(struct timer_list *t) |
94 | { | 94 | { |
95 | struct uhci_hcd *uhci = (struct uhci_hcd *) _uhci; | 95 | struct uhci_hcd *uhci = from_timer(uhci, t, fsbr_timer); |
96 | unsigned long flags; | 96 | unsigned long flags; |
97 | 97 | ||
98 | spin_lock_irqsave(&uhci->lock, flags); | 98 | spin_lock_irqsave(&uhci->lock, flags); |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 327ba8b8a98b..2424d3020ca3 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -395,14 +395,14 @@ static inline void xhci_msix_sync_irqs(struct xhci_hcd *xhci) | |||
395 | 395 | ||
396 | #endif | 396 | #endif |
397 | 397 | ||
398 | static void compliance_mode_recovery(unsigned long arg) | 398 | static void compliance_mode_recovery(struct timer_list *t) |
399 | { | 399 | { |
400 | struct xhci_hcd *xhci; | 400 | struct xhci_hcd *xhci; |
401 | struct usb_hcd *hcd; | 401 | struct usb_hcd *hcd; |
402 | u32 temp; | 402 | u32 temp; |
403 | int i; | 403 | int i; |
404 | 404 | ||
405 | xhci = (struct xhci_hcd *)arg; | 405 | xhci = from_timer(xhci, t, comp_mode_recovery_timer); |
406 | 406 | ||
407 | for (i = 0; i < xhci->num_usb3_ports; i++) { | 407 | for (i = 0; i < xhci->num_usb3_ports; i++) { |
408 | temp = readl(xhci->usb3_ports[i]); | 408 | temp = readl(xhci->usb3_ports[i]); |
@@ -443,8 +443,8 @@ static void compliance_mode_recovery(unsigned long arg) | |||
443 | static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci) | 443 | static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci) |
444 | { | 444 | { |
445 | xhci->port_status_u0 = 0; | 445 | xhci->port_status_u0 = 0; |
446 | setup_timer(&xhci->comp_mode_recovery_timer, | 446 | timer_setup(&xhci->comp_mode_recovery_timer, compliance_mode_recovery, |
447 | compliance_mode_recovery, (unsigned long)xhci); | 447 | 0); |
448 | xhci->comp_mode_recovery_timer.expires = jiffies + | 448 | xhci->comp_mode_recovery_timer.expires = jiffies + |
449 | msecs_to_jiffies(COMP_MODE_RCVRY_MSECS); | 449 | msecs_to_jiffies(COMP_MODE_RCVRY_MSECS); |
450 | 450 | ||
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index a859c2d33c29..fdceb46d9fc6 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -555,9 +555,9 @@ static void mos7840_set_led_sync(struct usb_serial_port *port, __u16 reg, | |||
555 | val, reg, NULL, 0, MOS_WDR_TIMEOUT); | 555 | val, reg, NULL, 0, MOS_WDR_TIMEOUT); |
556 | } | 556 | } |
557 | 557 | ||
558 | static void mos7840_led_off(unsigned long arg) | 558 | static void mos7840_led_off(struct timer_list *t) |
559 | { | 559 | { |
560 | struct moschip_port *mcs = (struct moschip_port *) arg; | 560 | struct moschip_port *mcs = from_timer(mcs, t, led_timer1); |
561 | 561 | ||
562 | /* Turn off LED */ | 562 | /* Turn off LED */ |
563 | mos7840_set_led_async(mcs, 0x0300, MODEM_CONTROL_REGISTER); | 563 | mos7840_set_led_async(mcs, 0x0300, MODEM_CONTROL_REGISTER); |
@@ -565,9 +565,9 @@ static void mos7840_led_off(unsigned long arg) | |||
565 | jiffies + msecs_to_jiffies(LED_OFF_MS)); | 565 | jiffies + msecs_to_jiffies(LED_OFF_MS)); |
566 | } | 566 | } |
567 | 567 | ||
568 | static void mos7840_led_flag_off(unsigned long arg) | 568 | static void mos7840_led_flag_off(struct timer_list *t) |
569 | { | 569 | { |
570 | struct moschip_port *mcs = (struct moschip_port *) arg; | 570 | struct moschip_port *mcs = from_timer(mcs, t, led_timer2); |
571 | 571 | ||
572 | clear_bit_unlock(MOS7840_FLAG_LED_BUSY, &mcs->flags); | 572 | clear_bit_unlock(MOS7840_FLAG_LED_BUSY, &mcs->flags); |
573 | } | 573 | } |
@@ -2289,12 +2289,11 @@ static int mos7840_port_probe(struct usb_serial_port *port) | |||
2289 | goto error; | 2289 | goto error; |
2290 | } | 2290 | } |
2291 | 2291 | ||
2292 | setup_timer(&mos7840_port->led_timer1, mos7840_led_off, | 2292 | timer_setup(&mos7840_port->led_timer1, mos7840_led_off, 0); |
2293 | (unsigned long)mos7840_port); | ||
2294 | mos7840_port->led_timer1.expires = | 2293 | mos7840_port->led_timer1.expires = |
2295 | jiffies + msecs_to_jiffies(LED_ON_MS); | 2294 | jiffies + msecs_to_jiffies(LED_ON_MS); |
2296 | setup_timer(&mos7840_port->led_timer2, mos7840_led_flag_off, | 2295 | timer_setup(&mos7840_port->led_timer2, mos7840_led_flag_off, |
2297 | (unsigned long)mos7840_port); | 2296 | 0); |
2298 | mos7840_port->led_timer2.expires = | 2297 | mos7840_port->led_timer2.expires = |
2299 | jiffies + msecs_to_jiffies(LED_OFF_MS); | 2298 | jiffies + msecs_to_jiffies(LED_OFF_MS); |
2300 | 2299 | ||
diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 48e2e32c97e8..31b024441938 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c | |||
@@ -751,9 +751,9 @@ static void rts51x_modi_suspend_timer(struct rts51x_chip *chip) | |||
751 | mod_timer(&chip->rts51x_suspend_timer, chip->timer_expires); | 751 | mod_timer(&chip->rts51x_suspend_timer, chip->timer_expires); |
752 | } | 752 | } |
753 | 753 | ||
754 | static void rts51x_suspend_timer_fn(unsigned long data) | 754 | static void rts51x_suspend_timer_fn(struct timer_list *t) |
755 | { | 755 | { |
756 | struct rts51x_chip *chip = (struct rts51x_chip *)data; | 756 | struct rts51x_chip *chip = from_timer(chip, t, rts51x_suspend_timer); |
757 | struct us_data *us = chip->us; | 757 | struct us_data *us = chip->us; |
758 | 758 | ||
759 | switch (rts51x_get_stat(chip)) { | 759 | switch (rts51x_get_stat(chip)) { |
@@ -917,8 +917,7 @@ static int realtek_cr_autosuspend_setup(struct us_data *us) | |||
917 | us->proto_handler = rts51x_invoke_transport; | 917 | us->proto_handler = rts51x_invoke_transport; |
918 | 918 | ||
919 | chip->timer_expires = 0; | 919 | chip->timer_expires = 0; |
920 | setup_timer(&chip->rts51x_suspend_timer, rts51x_suspend_timer_fn, | 920 | timer_setup(&chip->rts51x_suspend_timer, rts51x_suspend_timer_fn, 0); |
921 | (unsigned long)chip); | ||
922 | fw5895_init(us); | 921 | fw5895_init(us); |
923 | 922 | ||
924 | /* enable autosuspend function of the usb device */ | 923 | /* enable autosuspend function of the usb device */ |
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index 38d0504a1bbc..625f706b8160 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
@@ -603,9 +603,9 @@ static void uwb_cnflt_update_work(struct work_struct *work) | |||
603 | mutex_unlock(&rc->rsvs_mutex); | 603 | mutex_unlock(&rc->rsvs_mutex); |
604 | } | 604 | } |
605 | 605 | ||
606 | static void uwb_cnflt_timer(unsigned long arg) | 606 | static void uwb_cnflt_timer(struct timer_list *t) |
607 | { | 607 | { |
608 | struct uwb_cnflt_alien *cnflt = (struct uwb_cnflt_alien *)arg; | 608 | struct uwb_cnflt_alien *cnflt = from_timer(cnflt, t, timer); |
609 | 609 | ||
610 | queue_work(cnflt->rc->rsv_workq, &cnflt->cnflt_update_work); | 610 | queue_work(cnflt->rc->rsv_workq, &cnflt->cnflt_update_work); |
611 | } | 611 | } |
@@ -642,7 +642,7 @@ static void uwb_drp_handle_alien_drp(struct uwb_rc *rc, struct uwb_ie_drp *drp_i | |||
642 | } | 642 | } |
643 | 643 | ||
644 | INIT_LIST_HEAD(&cnflt->rc_node); | 644 | INIT_LIST_HEAD(&cnflt->rc_node); |
645 | setup_timer(&cnflt->timer, uwb_cnflt_timer, (unsigned long)cnflt); | 645 | timer_setup(&cnflt->timer, uwb_cnflt_timer, 0); |
646 | 646 | ||
647 | cnflt->rc = rc; | 647 | cnflt->rc = rc; |
648 | INIT_WORK(&cnflt->cnflt_update_work, uwb_cnflt_update_work); | 648 | INIT_WORK(&cnflt->cnflt_update_work, uwb_cnflt_update_work); |
diff --git a/drivers/uwb/neh.c b/drivers/uwb/neh.c index 36b5cb62c15d..fbdca728bd9f 100644 --- a/drivers/uwb/neh.c +++ b/drivers/uwb/neh.c | |||
@@ -115,7 +115,7 @@ struct uwb_rc_neh { | |||
115 | struct list_head list_node; | 115 | struct list_head list_node; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static void uwb_rc_neh_timer(unsigned long arg); | 118 | static void uwb_rc_neh_timer(struct timer_list *t); |
119 | 119 | ||
120 | static void uwb_rc_neh_release(struct kref *kref) | 120 | static void uwb_rc_neh_release(struct kref *kref) |
121 | { | 121 | { |
@@ -223,7 +223,7 @@ struct uwb_rc_neh *uwb_rc_neh_add(struct uwb_rc *rc, struct uwb_rccb *cmd, | |||
223 | 223 | ||
224 | kref_init(&neh->kref); | 224 | kref_init(&neh->kref); |
225 | INIT_LIST_HEAD(&neh->list_node); | 225 | INIT_LIST_HEAD(&neh->list_node); |
226 | setup_timer(&neh->timer, uwb_rc_neh_timer, (unsigned long)neh); | 226 | timer_setup(&neh->timer, uwb_rc_neh_timer, 0); |
227 | 227 | ||
228 | neh->rc = rc; | 228 | neh->rc = rc; |
229 | neh->evt_type = expected_type; | 229 | neh->evt_type = expected_type; |
@@ -565,9 +565,9 @@ void uwb_rc_neh_error(struct uwb_rc *rc, int error) | |||
565 | EXPORT_SYMBOL_GPL(uwb_rc_neh_error); | 565 | EXPORT_SYMBOL_GPL(uwb_rc_neh_error); |
566 | 566 | ||
567 | 567 | ||
568 | static void uwb_rc_neh_timer(unsigned long arg) | 568 | static void uwb_rc_neh_timer(struct timer_list *t) |
569 | { | 569 | { |
570 | struct uwb_rc_neh *neh = (struct uwb_rc_neh *)arg; | 570 | struct uwb_rc_neh *neh = from_timer(neh, t, timer); |
571 | struct uwb_rc *rc = neh->rc; | 571 | struct uwb_rc *rc = neh->rc; |
572 | unsigned long flags; | 572 | unsigned long flags; |
573 | 573 | ||
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c index f5e27247a38f..fe25a8cc6fa1 100644 --- a/drivers/uwb/rsv.c +++ b/drivers/uwb/rsv.c | |||
@@ -23,7 +23,7 @@ | |||
23 | 23 | ||
24 | #include "uwb-internal.h" | 24 | #include "uwb-internal.h" |
25 | 25 | ||
26 | static void uwb_rsv_timer(unsigned long arg); | 26 | static void uwb_rsv_timer(struct timer_list *t); |
27 | 27 | ||
28 | static const char *rsv_states[] = { | 28 | static const char *rsv_states[] = { |
29 | [UWB_RSV_STATE_NONE] = "none ", | 29 | [UWB_RSV_STATE_NONE] = "none ", |
@@ -198,9 +198,9 @@ static void uwb_rsv_put_stream(struct uwb_rsv *rsv) | |||
198 | dev_dbg(dev, "put stream %d\n", rsv->stream); | 198 | dev_dbg(dev, "put stream %d\n", rsv->stream); |
199 | } | 199 | } |
200 | 200 | ||
201 | void uwb_rsv_backoff_win_timer(unsigned long arg) | 201 | void uwb_rsv_backoff_win_timer(struct timer_list *t) |
202 | { | 202 | { |
203 | struct uwb_drp_backoff_win *bow = (struct uwb_drp_backoff_win *)arg; | 203 | struct uwb_drp_backoff_win *bow = from_timer(bow, t, timer); |
204 | struct uwb_rc *rc = container_of(bow, struct uwb_rc, bow); | 204 | struct uwb_rc *rc = container_of(bow, struct uwb_rc, bow); |
205 | struct device *dev = &rc->uwb_dev.dev; | 205 | struct device *dev = &rc->uwb_dev.dev; |
206 | 206 | ||
@@ -470,7 +470,7 @@ static struct uwb_rsv *uwb_rsv_alloc(struct uwb_rc *rc) | |||
470 | INIT_LIST_HEAD(&rsv->rc_node); | 470 | INIT_LIST_HEAD(&rsv->rc_node); |
471 | INIT_LIST_HEAD(&rsv->pal_node); | 471 | INIT_LIST_HEAD(&rsv->pal_node); |
472 | kref_init(&rsv->kref); | 472 | kref_init(&rsv->kref); |
473 | setup_timer(&rsv->timer, uwb_rsv_timer, (unsigned long)rsv); | 473 | timer_setup(&rsv->timer, uwb_rsv_timer, 0); |
474 | 474 | ||
475 | rsv->rc = rc; | 475 | rsv->rc = rc; |
476 | INIT_WORK(&rsv->handle_timeout_work, uwb_rsv_handle_timeout_work); | 476 | INIT_WORK(&rsv->handle_timeout_work, uwb_rsv_handle_timeout_work); |
@@ -939,9 +939,9 @@ static void uwb_rsv_alien_bp_work(struct work_struct *work) | |||
939 | mutex_unlock(&rc->rsvs_mutex); | 939 | mutex_unlock(&rc->rsvs_mutex); |
940 | } | 940 | } |
941 | 941 | ||
942 | static void uwb_rsv_timer(unsigned long arg) | 942 | static void uwb_rsv_timer(struct timer_list *t) |
943 | { | 943 | { |
944 | struct uwb_rsv *rsv = (struct uwb_rsv *)arg; | 944 | struct uwb_rsv *rsv = from_timer(rsv, t, timer); |
945 | 945 | ||
946 | queue_work(rsv->rc->rsv_workq, &rsv->handle_timeout_work); | 946 | queue_work(rsv->rc->rsv_workq, &rsv->handle_timeout_work); |
947 | } | 947 | } |
@@ -987,8 +987,7 @@ void uwb_rsv_init(struct uwb_rc *rc) | |||
987 | rc->bow.can_reserve_extra_mases = true; | 987 | rc->bow.can_reserve_extra_mases = true; |
988 | rc->bow.total_expired = 0; | 988 | rc->bow.total_expired = 0; |
989 | rc->bow.window = UWB_DRP_BACKOFF_WIN_MIN >> 1; | 989 | rc->bow.window = UWB_DRP_BACKOFF_WIN_MIN >> 1; |
990 | setup_timer(&rc->bow.timer, uwb_rsv_backoff_win_timer, | 990 | timer_setup(&rc->bow.timer, uwb_rsv_backoff_win_timer, 0); |
991 | (unsigned long)&rc->bow); | ||
992 | 991 | ||
993 | bitmap_complement(rc->uwb_dev.streams, rc->uwb_dev.streams, UWB_NUM_STREAMS); | 992 | bitmap_complement(rc->uwb_dev.streams, rc->uwb_dev.streams, UWB_NUM_STREAMS); |
994 | } | 993 | } |
diff --git a/drivers/uwb/uwb-internal.h b/drivers/uwb/uwb-internal.h index 353c0555a1f5..91326ce093a7 100644 --- a/drivers/uwb/uwb-internal.h +++ b/drivers/uwb/uwb-internal.h | |||
@@ -329,7 +329,7 @@ void uwb_rsv_put(struct uwb_rsv *rsv); | |||
329 | bool uwb_rsv_has_two_drp_ies(struct uwb_rsv *rsv); | 329 | bool uwb_rsv_has_two_drp_ies(struct uwb_rsv *rsv); |
330 | void uwb_rsv_dump(char *text, struct uwb_rsv *rsv); | 330 | void uwb_rsv_dump(char *text, struct uwb_rsv *rsv); |
331 | int uwb_rsv_try_move(struct uwb_rsv *rsv, struct uwb_mas_bm *available); | 331 | int uwb_rsv_try_move(struct uwb_rsv *rsv, struct uwb_mas_bm *available); |
332 | void uwb_rsv_backoff_win_timer(unsigned long arg); | 332 | void uwb_rsv_backoff_win_timer(struct timer_list *t); |
333 | void uwb_rsv_backoff_win_increment(struct uwb_rc *rc); | 333 | void uwb_rsv_backoff_win_increment(struct uwb_rc *rc); |
334 | int uwb_rsv_status(struct uwb_rsv *rsv); | 334 | int uwb_rsv_status(struct uwb_rsv *rsv); |
335 | int uwb_rsv_companion_status(struct uwb_rsv *rsv); | 335 | int uwb_rsv_companion_status(struct uwb_rsv *rsv); |
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c index 7e6acaf3ece4..88c05d0448b2 100644 --- a/drivers/watchdog/at91sam9_wdt.c +++ b/drivers/watchdog/at91sam9_wdt.c | |||
@@ -120,9 +120,9 @@ static inline void at91_wdt_reset(struct at91wdt *wdt) | |||
120 | /* | 120 | /* |
121 | * Timer tick | 121 | * Timer tick |
122 | */ | 122 | */ |
123 | static void at91_ping(unsigned long data) | 123 | static void at91_ping(struct timer_list *t) |
124 | { | 124 | { |
125 | struct at91wdt *wdt = (struct at91wdt *)data; | 125 | struct at91wdt *wdt = from_timer(wdt, t, timer); |
126 | if (time_before(jiffies, wdt->next_heartbeat) || | 126 | if (time_before(jiffies, wdt->next_heartbeat) || |
127 | !watchdog_active(&wdt->wdd)) { | 127 | !watchdog_active(&wdt->wdd)) { |
128 | at91_wdt_reset(wdt); | 128 | at91_wdt_reset(wdt); |
@@ -222,7 +222,7 @@ static int at91_wdt_init(struct platform_device *pdev, struct at91wdt *wdt) | |||
222 | "watchdog already configured differently (mr = %x expecting %x)\n", | 222 | "watchdog already configured differently (mr = %x expecting %x)\n", |
223 | tmp & wdt->mr_mask, wdt->mr & wdt->mr_mask); | 223 | tmp & wdt->mr_mask, wdt->mr & wdt->mr_mask); |
224 | 224 | ||
225 | setup_timer(&wdt->timer, at91_ping, (unsigned long)wdt); | 225 | timer_setup(&wdt->timer, at91_ping, 0); |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * Use min_heartbeat the first time to avoid spurious watchdog reset: | 228 | * Use min_heartbeat the first time to avoid spurious watchdog reset: |
diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c index 236582809336..f41b756d6dd5 100644 --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c | |||
@@ -106,9 +106,9 @@ static const struct watchdog_ops bcm47xx_wdt_hard_ops = { | |||
106 | .restart = bcm47xx_wdt_restart, | 106 | .restart = bcm47xx_wdt_restart, |
107 | }; | 107 | }; |
108 | 108 | ||
109 | static void bcm47xx_wdt_soft_timer_tick(unsigned long data) | 109 | static void bcm47xx_wdt_soft_timer_tick(struct timer_list *t) |
110 | { | 110 | { |
111 | struct bcm47xx_wdt *wdt = (struct bcm47xx_wdt *)data; | 111 | struct bcm47xx_wdt *wdt = from_timer(wdt, t, soft_timer); |
112 | u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); | 112 | u32 next_tick = min(wdt->wdd.timeout * 1000, wdt->max_timer_ms); |
113 | 113 | ||
114 | if (!atomic_dec_and_test(&wdt->soft_ticks)) { | 114 | if (!atomic_dec_and_test(&wdt->soft_ticks)) { |
@@ -133,7 +133,7 @@ static int bcm47xx_wdt_soft_start(struct watchdog_device *wdd) | |||
133 | struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); | 133 | struct bcm47xx_wdt *wdt = bcm47xx_wdt_get(wdd); |
134 | 134 | ||
135 | bcm47xx_wdt_soft_keepalive(wdd); | 135 | bcm47xx_wdt_soft_keepalive(wdd); |
136 | bcm47xx_wdt_soft_timer_tick((unsigned long)wdt); | 136 | bcm47xx_wdt_soft_timer_tick(&wdt->soft_timer); |
137 | 137 | ||
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
@@ -190,8 +190,7 @@ static int bcm47xx_wdt_probe(struct platform_device *pdev) | |||
190 | 190 | ||
191 | if (soft) { | 191 | if (soft) { |
192 | wdt->wdd.ops = &bcm47xx_wdt_soft_ops; | 192 | wdt->wdd.ops = &bcm47xx_wdt_soft_ops; |
193 | setup_timer(&wdt->soft_timer, bcm47xx_wdt_soft_timer_tick, | 193 | timer_setup(&wdt->soft_timer, bcm47xx_wdt_soft_timer_tick, 0); |
194 | (long unsigned int)wdt); | ||
195 | } else { | 194 | } else { |
196 | wdt->wdd.ops = &bcm47xx_wdt_hard_ops; | 195 | wdt->wdd.ops = &bcm47xx_wdt_hard_ops; |
197 | } | 196 | } |
diff --git a/drivers/watchdog/bcm63xx_wdt.c b/drivers/watchdog/bcm63xx_wdt.c index ab26fd90729e..8555afc70f9b 100644 --- a/drivers/watchdog/bcm63xx_wdt.c +++ b/drivers/watchdog/bcm63xx_wdt.c | |||
@@ -77,7 +77,7 @@ static void bcm63xx_wdt_isr(void *data) | |||
77 | die(PFX " fire", regs); | 77 | die(PFX " fire", regs); |
78 | } | 78 | } |
79 | 79 | ||
80 | static void bcm63xx_timer_tick(unsigned long unused) | 80 | static void bcm63xx_timer_tick(struct timer_list *unused) |
81 | { | 81 | { |
82 | if (!atomic_dec_and_test(&bcm63xx_wdt_device.ticks)) { | 82 | if (!atomic_dec_and_test(&bcm63xx_wdt_device.ticks)) { |
83 | bcm63xx_wdt_hw_start(); | 83 | bcm63xx_wdt_hw_start(); |
@@ -240,7 +240,7 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev) | |||
240 | int ret; | 240 | int ret; |
241 | struct resource *r; | 241 | struct resource *r; |
242 | 242 | ||
243 | setup_timer(&bcm63xx_wdt_device.timer, bcm63xx_timer_tick, 0L); | 243 | timer_setup(&bcm63xx_wdt_device.timer, bcm63xx_timer_tick, 0); |
244 | 244 | ||
245 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 245 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
246 | if (!r) { | 246 | if (!r) { |
diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c index 6c3f78e45c26..6cfb102c397c 100644 --- a/drivers/watchdog/cpu5wdt.c +++ b/drivers/watchdog/cpu5wdt.c | |||
@@ -69,7 +69,7 @@ static struct { | |||
69 | 69 | ||
70 | /* generic helper functions */ | 70 | /* generic helper functions */ |
71 | 71 | ||
72 | static void cpu5wdt_trigger(unsigned long unused) | 72 | static void cpu5wdt_trigger(struct timer_list *unused) |
73 | { | 73 | { |
74 | if (verbose > 2) | 74 | if (verbose > 2) |
75 | pr_debug("trigger at %i ticks\n", ticks); | 75 | pr_debug("trigger at %i ticks\n", ticks); |
@@ -224,7 +224,7 @@ static int cpu5wdt_init(void) | |||
224 | 224 | ||
225 | init_completion(&cpu5wdt_device.stop); | 225 | init_completion(&cpu5wdt_device.stop); |
226 | cpu5wdt_device.queue = 0; | 226 | cpu5wdt_device.queue = 0; |
227 | setup_timer(&cpu5wdt_device.timer, cpu5wdt_trigger, 0); | 227 | timer_setup(&cpu5wdt_device.timer, cpu5wdt_trigger, 0); |
228 | cpu5wdt_device.default_ticks = ticks; | 228 | cpu5wdt_device.default_ticks = ticks; |
229 | 229 | ||
230 | if (!request_region(port, CPU5WDT_EXTENT, PFX)) { | 230 | if (!request_region(port, CPU5WDT_EXTENT, PFX)) { |
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 366e5c7e650b..6610e9217dbc 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
@@ -80,9 +80,9 @@ static void mpc8xxx_wdt_keepalive(struct mpc8xxx_wdt_ddata *ddata) | |||
80 | spin_unlock(&ddata->lock); | 80 | spin_unlock(&ddata->lock); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void mpc8xxx_wdt_timer_ping(unsigned long arg) | 83 | static void mpc8xxx_wdt_timer_ping(struct timer_list *t) |
84 | { | 84 | { |
85 | struct mpc8xxx_wdt_ddata *ddata = (void *)arg; | 85 | struct mpc8xxx_wdt_ddata *ddata = from_timer(ddata, t, timer); |
86 | 86 | ||
87 | mpc8xxx_wdt_keepalive(ddata); | 87 | mpc8xxx_wdt_keepalive(ddata); |
88 | /* We're pinging it twice faster than needed, just to be sure. */ | 88 | /* We're pinging it twice faster than needed, just to be sure. */ |
@@ -173,8 +173,7 @@ static int mpc8xxx_wdt_probe(struct platform_device *ofdev) | |||
173 | } | 173 | } |
174 | 174 | ||
175 | spin_lock_init(&ddata->lock); | 175 | spin_lock_init(&ddata->lock); |
176 | setup_timer(&ddata->timer, mpc8xxx_wdt_timer_ping, | 176 | timer_setup(&ddata->timer, mpc8xxx_wdt_timer_ping, 0); |
177 | (unsigned long)ddata); | ||
178 | 177 | ||
179 | ddata->wdd.info = &mpc8xxx_wdt_info, | 178 | ddata->wdd.info = &mpc8xxx_wdt_info, |
180 | ddata->wdd.ops = &mpc8xxx_wdt_ops, | 179 | ddata->wdd.ops = &mpc8xxx_wdt_ops, |
diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c index ff27c4ac96e4..ca360d204548 100644 --- a/drivers/watchdog/mtx-1_wdt.c +++ b/drivers/watchdog/mtx-1_wdt.c | |||
@@ -68,7 +68,7 @@ static struct { | |||
68 | unsigned int gstate; | 68 | unsigned int gstate; |
69 | } mtx1_wdt_device; | 69 | } mtx1_wdt_device; |
70 | 70 | ||
71 | static void mtx1_wdt_trigger(unsigned long unused) | 71 | static void mtx1_wdt_trigger(struct timer_list *unused) |
72 | { | 72 | { |
73 | spin_lock(&mtx1_wdt_device.lock); | 73 | spin_lock(&mtx1_wdt_device.lock); |
74 | if (mtx1_wdt_device.running) | 74 | if (mtx1_wdt_device.running) |
@@ -219,7 +219,7 @@ static int mtx1_wdt_probe(struct platform_device *pdev) | |||
219 | init_completion(&mtx1_wdt_device.stop); | 219 | init_completion(&mtx1_wdt_device.stop); |
220 | mtx1_wdt_device.queue = 0; | 220 | mtx1_wdt_device.queue = 0; |
221 | clear_bit(0, &mtx1_wdt_device.inuse); | 221 | clear_bit(0, &mtx1_wdt_device.inuse); |
222 | setup_timer(&mtx1_wdt_device.timer, mtx1_wdt_trigger, 0L); | 222 | timer_setup(&mtx1_wdt_device.timer, mtx1_wdt_trigger, 0); |
223 | mtx1_wdt_device.default_ticks = ticks; | 223 | mtx1_wdt_device.default_ticks = ticks; |
224 | 224 | ||
225 | ret = misc_register(&mtx1_wdt_misc); | 225 | ret = misc_register(&mtx1_wdt_misc); |
diff --git a/drivers/watchdog/nuc900_wdt.c b/drivers/watchdog/nuc900_wdt.c index d5bed78c4d9f..830bd04ff911 100644 --- a/drivers/watchdog/nuc900_wdt.c +++ b/drivers/watchdog/nuc900_wdt.c | |||
@@ -216,7 +216,7 @@ static ssize_t nuc900_wdt_write(struct file *file, const char __user *data, | |||
216 | return len; | 216 | return len; |
217 | } | 217 | } |
218 | 218 | ||
219 | static void nuc900_wdt_timer_ping(unsigned long data) | 219 | static void nuc900_wdt_timer_ping(struct timer_list *unused) |
220 | { | 220 | { |
221 | if (time_before(jiffies, nuc900_wdt->next_heartbeat)) { | 221 | if (time_before(jiffies, nuc900_wdt->next_heartbeat)) { |
222 | nuc900_wdt_keepalive(); | 222 | nuc900_wdt_keepalive(); |
@@ -267,7 +267,7 @@ static int nuc900wdt_probe(struct platform_device *pdev) | |||
267 | 267 | ||
268 | clk_enable(nuc900_wdt->wdt_clock); | 268 | clk_enable(nuc900_wdt->wdt_clock); |
269 | 269 | ||
270 | setup_timer(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); | 270 | timer_setup(&nuc900_wdt->timer, nuc900_wdt_timer_ping, 0); |
271 | 271 | ||
272 | ret = misc_register(&nuc900wdt_miscdev); | 272 | ret = misc_register(&nuc900wdt_miscdev); |
273 | if (ret) { | 273 | if (ret) { |
diff --git a/drivers/watchdog/pcwd.c b/drivers/watchdog/pcwd.c index 3ad5206d7935..b72ce68eacd3 100644 --- a/drivers/watchdog/pcwd.c +++ b/drivers/watchdog/pcwd.c | |||
@@ -367,7 +367,7 @@ static void pcwd_show_card_info(void) | |||
367 | pr_info("No previous trip detected - Cold boot or reset\n"); | 367 | pr_info("No previous trip detected - Cold boot or reset\n"); |
368 | } | 368 | } |
369 | 369 | ||
370 | static void pcwd_timer_ping(unsigned long data) | 370 | static void pcwd_timer_ping(struct timer_list *unused) |
371 | { | 371 | { |
372 | int wdrst_stat; | 372 | int wdrst_stat; |
373 | 373 | ||
@@ -893,7 +893,7 @@ static int pcwd_isa_probe(struct device *dev, unsigned int id) | |||
893 | /* clear the "card caused reboot" flag */ | 893 | /* clear the "card caused reboot" flag */ |
894 | pcwd_clear_status(); | 894 | pcwd_clear_status(); |
895 | 895 | ||
896 | setup_timer(&pcwd_private.timer, pcwd_timer_ping, 0); | 896 | timer_setup(&pcwd_private.timer, pcwd_timer_ping, 0); |
897 | 897 | ||
898 | /* Disable the board */ | 898 | /* Disable the board */ |
899 | pcwd_stop(); | 899 | pcwd_stop(); |
diff --git a/drivers/watchdog/pika_wdt.c b/drivers/watchdog/pika_wdt.c index e35cf5e87907..e0a6f8c0f03c 100644 --- a/drivers/watchdog/pika_wdt.c +++ b/drivers/watchdog/pika_wdt.c | |||
@@ -85,7 +85,7 @@ static inline void pikawdt_reset(void) | |||
85 | /* | 85 | /* |
86 | * Timer tick | 86 | * Timer tick |
87 | */ | 87 | */ |
88 | static void pikawdt_ping(unsigned long data) | 88 | static void pikawdt_ping(struct timer_list *unused) |
89 | { | 89 | { |
90 | if (time_before(jiffies, pikawdt_private.next_heartbeat) || | 90 | if (time_before(jiffies, pikawdt_private.next_heartbeat) || |
91 | (!nowayout && !pikawdt_private.open)) { | 91 | (!nowayout && !pikawdt_private.open)) { |
@@ -269,7 +269,7 @@ static int __init pikawdt_init(void) | |||
269 | 269 | ||
270 | iounmap(fpga); | 270 | iounmap(fpga); |
271 | 271 | ||
272 | setup_timer(&pikawdt_private.timer, pikawdt_ping, 0); | 272 | timer_setup(&pikawdt_private.timer, pikawdt_ping, 0); |
273 | 273 | ||
274 | ret = misc_register(&pikawdt_miscdev); | 274 | ret = misc_register(&pikawdt_miscdev); |
275 | if (ret) { | 275 | if (ret) { |
diff --git a/drivers/watchdog/rdc321x_wdt.c b/drivers/watchdog/rdc321x_wdt.c index 47a8f1b1087d..a281aa84bfb1 100644 --- a/drivers/watchdog/rdc321x_wdt.c +++ b/drivers/watchdog/rdc321x_wdt.c | |||
@@ -67,7 +67,7 @@ static struct { | |||
67 | 67 | ||
68 | /* generic helper functions */ | 68 | /* generic helper functions */ |
69 | 69 | ||
70 | static void rdc321x_wdt_trigger(unsigned long unused) | 70 | static void rdc321x_wdt_trigger(struct timer_list *unused) |
71 | { | 71 | { |
72 | unsigned long flags; | 72 | unsigned long flags; |
73 | u32 val; | 73 | u32 val; |
@@ -262,7 +262,7 @@ static int rdc321x_wdt_probe(struct platform_device *pdev) | |||
262 | 262 | ||
263 | clear_bit(0, &rdc321x_wdt_device.inuse); | 263 | clear_bit(0, &rdc321x_wdt_device.inuse); |
264 | 264 | ||
265 | setup_timer(&rdc321x_wdt_device.timer, rdc321x_wdt_trigger, 0); | 265 | timer_setup(&rdc321x_wdt_device.timer, rdc321x_wdt_trigger, 0); |
266 | 266 | ||
267 | rdc321x_wdt_device.default_ticks = ticks; | 267 | rdc321x_wdt_device.default_ticks = ticks; |
268 | 268 | ||
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 517a733175ef..a7d6425db807 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c | |||
@@ -175,9 +175,9 @@ static int sh_wdt_set_heartbeat(struct watchdog_device *wdt_dev, unsigned t) | |||
175 | return 0; | 175 | return 0; |
176 | } | 176 | } |
177 | 177 | ||
178 | static void sh_wdt_ping(unsigned long data) | 178 | static void sh_wdt_ping(struct timer_list *t) |
179 | { | 179 | { |
180 | struct sh_wdt *wdt = (struct sh_wdt *)data; | 180 | struct sh_wdt *wdt = from_timer(wdt, t, timer); |
181 | unsigned long flags; | 181 | unsigned long flags; |
182 | 182 | ||
183 | spin_lock_irqsave(&wdt->lock, flags); | 183 | spin_lock_irqsave(&wdt->lock, flags); |
@@ -275,7 +275,7 @@ static int sh_wdt_probe(struct platform_device *pdev) | |||
275 | return rc; | 275 | return rc; |
276 | } | 276 | } |
277 | 277 | ||
278 | setup_timer(&wdt->timer, sh_wdt_ping, (unsigned long)wdt); | 278 | timer_setup(&wdt->timer, sh_wdt_ping, 0); |
279 | wdt->timer.expires = next_ping_period(clock_division_ratio); | 279 | wdt->timer.expires = next_ping_period(clock_division_ratio); |
280 | 280 | ||
281 | dev_info(&pdev->dev, "initialized.\n"); | 281 | dev_info(&pdev->dev, "initialized.\n"); |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 8d779227370a..bebe59feca58 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -140,7 +140,7 @@ static void o2net_rx_until_empty(struct work_struct *work); | |||
140 | static void o2net_shutdown_sc(struct work_struct *work); | 140 | static void o2net_shutdown_sc(struct work_struct *work); |
141 | static void o2net_listen_data_ready(struct sock *sk); | 141 | static void o2net_listen_data_ready(struct sock *sk); |
142 | static void o2net_sc_send_keep_req(struct work_struct *work); | 142 | static void o2net_sc_send_keep_req(struct work_struct *work); |
143 | static void o2net_idle_timer(unsigned long data); | 143 | static void o2net_idle_timer(struct timer_list *t); |
144 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); | 144 | static void o2net_sc_postpone_idle(struct o2net_sock_container *sc); |
145 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); | 145 | static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc); |
146 | 146 | ||
@@ -450,8 +450,7 @@ static struct o2net_sock_container *sc_alloc(struct o2nm_node *node) | |||
450 | INIT_WORK(&sc->sc_shutdown_work, o2net_shutdown_sc); | 450 | INIT_WORK(&sc->sc_shutdown_work, o2net_shutdown_sc); |
451 | INIT_DELAYED_WORK(&sc->sc_keepalive_work, o2net_sc_send_keep_req); | 451 | INIT_DELAYED_WORK(&sc->sc_keepalive_work, o2net_sc_send_keep_req); |
452 | 452 | ||
453 | setup_timer(&sc->sc_idle_timeout, o2net_idle_timer, | 453 | timer_setup(&sc->sc_idle_timeout, o2net_idle_timer, 0); |
454 | (unsigned long)sc); | ||
455 | 454 | ||
456 | sclog(sc, "alloced\n"); | 455 | sclog(sc, "alloced\n"); |
457 | 456 | ||
@@ -1517,9 +1516,9 @@ static void o2net_sc_send_keep_req(struct work_struct *work) | |||
1517 | /* socket shutdown does a del_timer_sync against this as it tears down. | 1516 | /* socket shutdown does a del_timer_sync against this as it tears down. |
1518 | * we can't start this timer until we've got to the point in sc buildup | 1517 | * we can't start this timer until we've got to the point in sc buildup |
1519 | * where shutdown is going to be involved */ | 1518 | * where shutdown is going to be involved */ |
1520 | static void o2net_idle_timer(unsigned long data) | 1519 | static void o2net_idle_timer(struct timer_list *t) |
1521 | { | 1520 | { |
1522 | struct o2net_sock_container *sc = (struct o2net_sock_container *)data; | 1521 | struct o2net_sock_container *sc = from_timer(sc, t, sc_idle_timeout); |
1523 | struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num); | 1522 | struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num); |
1524 | #ifdef CONFIG_DEBUG_FS | 1523 | #ifdef CONFIG_DEBUG_FS |
1525 | unsigned long msecs = ktime_to_ms(ktime_get()) - | 1524 | unsigned long msecs = ktime_to_ms(ktime_get()) - |
diff --git a/kernel/padata.c b/kernel/padata.c index f262c9a4e70a..57c0074d50cc 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
@@ -288,9 +288,9 @@ static void invoke_padata_reorder(struct work_struct *work) | |||
288 | local_bh_enable(); | 288 | local_bh_enable(); |
289 | } | 289 | } |
290 | 290 | ||
291 | static void padata_reorder_timer(unsigned long arg) | 291 | static void padata_reorder_timer(struct timer_list *t) |
292 | { | 292 | { |
293 | struct parallel_data *pd = (struct parallel_data *)arg; | 293 | struct parallel_data *pd = from_timer(pd, t, timer); |
294 | unsigned int weight; | 294 | unsigned int weight; |
295 | int target_cpu, cpu; | 295 | int target_cpu, cpu; |
296 | 296 | ||
@@ -485,7 +485,7 @@ static struct parallel_data *padata_alloc_pd(struct padata_instance *pinst, | |||
485 | 485 | ||
486 | padata_init_pqueues(pd); | 486 | padata_init_pqueues(pd); |
487 | padata_init_squeues(pd); | 487 | padata_init_squeues(pd); |
488 | setup_timer(&pd->timer, padata_reorder_timer, (unsigned long)pd); | 488 | timer_setup(&pd->timer, padata_reorder_timer, 0); |
489 | atomic_set(&pd->seq_nr, -1); | 489 | atomic_set(&pd->seq_nr, -1); |
490 | atomic_set(&pd->reorder_objects, 0); | 490 | atomic_set(&pd->reorder_objects, 0); |
491 | atomic_set(&pd->refcnt, 0); | 491 | atomic_set(&pd->refcnt, 0); |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 5b51d5ba2a85..65f9e3f24dde 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -171,7 +171,7 @@ void clocksource_mark_unstable(struct clocksource *cs) | |||
171 | spin_unlock_irqrestore(&watchdog_lock, flags); | 171 | spin_unlock_irqrestore(&watchdog_lock, flags); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void clocksource_watchdog(unsigned long data) | 174 | static void clocksource_watchdog(struct timer_list *unused) |
175 | { | 175 | { |
176 | struct clocksource *cs; | 176 | struct clocksource *cs; |
177 | u64 csnow, wdnow, cslast, wdlast, delta; | 177 | u64 csnow, wdnow, cslast, wdlast, delta; |
@@ -290,7 +290,7 @@ static inline void clocksource_start_watchdog(void) | |||
290 | { | 290 | { |
291 | if (watchdog_running || !watchdog || list_empty(&watchdog_list)) | 291 | if (watchdog_running || !watchdog || list_empty(&watchdog_list)) |
292 | return; | 292 | return; |
293 | setup_timer(&watchdog_timer, clocksource_watchdog, 0UL); | 293 | timer_setup(&watchdog_timer, clocksource_watchdog, 0); |
294 | watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; | 294 | watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; |
295 | add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask)); | 295 | add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask)); |
296 | watchdog_running = 1; | 296 | watchdog_running = 1; |
diff --git a/net/802/garp.c b/net/802/garp.c index 2dac647ff420..7f50d47470bd 100644 --- a/net/802/garp.c +++ b/net/802/garp.c | |||
@@ -401,9 +401,9 @@ static void garp_join_timer_arm(struct garp_applicant *app) | |||
401 | mod_timer(&app->join_timer, jiffies + delay); | 401 | mod_timer(&app->join_timer, jiffies + delay); |
402 | } | 402 | } |
403 | 403 | ||
404 | static void garp_join_timer(unsigned long data) | 404 | static void garp_join_timer(struct timer_list *t) |
405 | { | 405 | { |
406 | struct garp_applicant *app = (struct garp_applicant *)data; | 406 | struct garp_applicant *app = from_timer(app, t, join_timer); |
407 | 407 | ||
408 | spin_lock(&app->lock); | 408 | spin_lock(&app->lock); |
409 | garp_gid_event(app, GARP_EVENT_TRANSMIT_PDU); | 409 | garp_gid_event(app, GARP_EVENT_TRANSMIT_PDU); |
@@ -584,7 +584,7 @@ int garp_init_applicant(struct net_device *dev, struct garp_application *appl) | |||
584 | spin_lock_init(&app->lock); | 584 | spin_lock_init(&app->lock); |
585 | skb_queue_head_init(&app->queue); | 585 | skb_queue_head_init(&app->queue); |
586 | rcu_assign_pointer(dev->garp_port->applicants[appl->type], app); | 586 | rcu_assign_pointer(dev->garp_port->applicants[appl->type], app); |
587 | setup_timer(&app->join_timer, garp_join_timer, (unsigned long)app); | 587 | timer_setup(&app->join_timer, garp_join_timer, 0); |
588 | garp_join_timer_arm(app); | 588 | garp_join_timer_arm(app); |
589 | return 0; | 589 | return 0; |
590 | 590 | ||
diff --git a/net/802/mrp.c b/net/802/mrp.c index be4dd3165347..a808dd5bbb27 100644 --- a/net/802/mrp.c +++ b/net/802/mrp.c | |||
@@ -586,9 +586,9 @@ static void mrp_join_timer_arm(struct mrp_applicant *app) | |||
586 | mod_timer(&app->join_timer, jiffies + delay); | 586 | mod_timer(&app->join_timer, jiffies + delay); |
587 | } | 587 | } |
588 | 588 | ||
589 | static void mrp_join_timer(unsigned long data) | 589 | static void mrp_join_timer(struct timer_list *t) |
590 | { | 590 | { |
591 | struct mrp_applicant *app = (struct mrp_applicant *)data; | 591 | struct mrp_applicant *app = from_timer(app, t, join_timer); |
592 | 592 | ||
593 | spin_lock(&app->lock); | 593 | spin_lock(&app->lock); |
594 | mrp_mad_event(app, MRP_EVENT_TX); | 594 | mrp_mad_event(app, MRP_EVENT_TX); |
@@ -605,9 +605,9 @@ static void mrp_periodic_timer_arm(struct mrp_applicant *app) | |||
605 | jiffies + msecs_to_jiffies(mrp_periodic_time)); | 605 | jiffies + msecs_to_jiffies(mrp_periodic_time)); |
606 | } | 606 | } |
607 | 607 | ||
608 | static void mrp_periodic_timer(unsigned long data) | 608 | static void mrp_periodic_timer(struct timer_list *t) |
609 | { | 609 | { |
610 | struct mrp_applicant *app = (struct mrp_applicant *)data; | 610 | struct mrp_applicant *app = from_timer(app, t, periodic_timer); |
611 | 611 | ||
612 | spin_lock(&app->lock); | 612 | spin_lock(&app->lock); |
613 | mrp_mad_event(app, MRP_EVENT_PERIODIC); | 613 | mrp_mad_event(app, MRP_EVENT_PERIODIC); |
@@ -865,10 +865,9 @@ int mrp_init_applicant(struct net_device *dev, struct mrp_application *appl) | |||
865 | spin_lock_init(&app->lock); | 865 | spin_lock_init(&app->lock); |
866 | skb_queue_head_init(&app->queue); | 866 | skb_queue_head_init(&app->queue); |
867 | rcu_assign_pointer(dev->mrp_port->applicants[appl->type], app); | 867 | rcu_assign_pointer(dev->mrp_port->applicants[appl->type], app); |
868 | setup_timer(&app->join_timer, mrp_join_timer, (unsigned long)app); | 868 | timer_setup(&app->join_timer, mrp_join_timer, 0); |
869 | mrp_join_timer_arm(app); | 869 | mrp_join_timer_arm(app); |
870 | setup_timer(&app->periodic_timer, mrp_periodic_timer, | 870 | timer_setup(&app->periodic_timer, mrp_periodic_timer, 0); |
871 | (unsigned long)app); | ||
872 | mrp_periodic_timer_arm(app); | 871 | mrp_periodic_timer_arm(app); |
873 | return 0; | 872 | return 0; |
874 | 873 | ||
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c index 8ad3ec2610b6..309d7dbb36e8 100644 --- a/net/appletalk/aarp.c +++ b/net/appletalk/aarp.c | |||
@@ -310,7 +310,7 @@ static void __aarp_expire_device(struct aarp_entry **n, struct net_device *dev) | |||
310 | } | 310 | } |
311 | 311 | ||
312 | /* Handle the timer event */ | 312 | /* Handle the timer event */ |
313 | static void aarp_expire_timeout(unsigned long unused) | 313 | static void aarp_expire_timeout(struct timer_list *unused) |
314 | { | 314 | { |
315 | int ct; | 315 | int ct; |
316 | 316 | ||
@@ -884,7 +884,7 @@ void __init aarp_proto_init(void) | |||
884 | aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv); | 884 | aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv); |
885 | if (!aarp_dl) | 885 | if (!aarp_dl) |
886 | printk(KERN_CRIT "Unable to register AARP with SNAP.\n"); | 886 | printk(KERN_CRIT "Unable to register AARP with SNAP.\n"); |
887 | setup_timer(&aarp_timer, aarp_expire_timeout, 0); | 887 | timer_setup(&aarp_timer, aarp_expire_timeout, 0); |
888 | aarp_timer.expires = jiffies + sysctl_aarp_expiry_time; | 888 | aarp_timer.expires = jiffies + sysctl_aarp_expiry_time; |
889 | add_timer(&aarp_timer); | 889 | add_timer(&aarp_timer); |
890 | register_netdevice_notifier(&aarp_notifier); | 890 | register_netdevice_notifier(&aarp_notifier); |
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 5d035c1f1156..03a9fc0771c0 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -158,9 +158,9 @@ found: | |||
158 | return s; | 158 | return s; |
159 | } | 159 | } |
160 | 160 | ||
161 | static void atalk_destroy_timer(unsigned long data) | 161 | static void atalk_destroy_timer(struct timer_list *t) |
162 | { | 162 | { |
163 | struct sock *sk = (struct sock *)data; | 163 | struct sock *sk = from_timer(sk, t, sk_timer); |
164 | 164 | ||
165 | if (sk_has_allocations(sk)) { | 165 | if (sk_has_allocations(sk)) { |
166 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; | 166 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; |
@@ -175,8 +175,7 @@ static inline void atalk_destroy_socket(struct sock *sk) | |||
175 | skb_queue_purge(&sk->sk_receive_queue); | 175 | skb_queue_purge(&sk->sk_receive_queue); |
176 | 176 | ||
177 | if (sk_has_allocations(sk)) { | 177 | if (sk_has_allocations(sk)) { |
178 | setup_timer(&sk->sk_timer, atalk_destroy_timer, | 178 | timer_setup(&sk->sk_timer, atalk_destroy_timer, 0); |
179 | (unsigned long)sk); | ||
180 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; | 179 | sk->sk_timer.expires = jiffies + SOCK_DESTROY_TIME; |
181 | add_timer(&sk->sk_timer); | 180 | add_timer(&sk->sk_timer); |
182 | } else | 181 | } else |
diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index 4b90033f35a8..15cd2139381e 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c | |||
@@ -488,9 +488,9 @@ static void batadv_tp_reset_sender_timer(struct batadv_tp_vars *tp_vars) | |||
488 | * Switch to Slow Start, set the ss_threshold to half of the current cwnd and | 488 | * Switch to Slow Start, set the ss_threshold to half of the current cwnd and |
489 | * reset the cwnd to 3*MSS | 489 | * reset the cwnd to 3*MSS |
490 | */ | 490 | */ |
491 | static void batadv_tp_sender_timeout(unsigned long arg) | 491 | static void batadv_tp_sender_timeout(struct timer_list *t) |
492 | { | 492 | { |
493 | struct batadv_tp_vars *tp_vars = (struct batadv_tp_vars *)arg; | 493 | struct batadv_tp_vars *tp_vars = from_timer(tp_vars, t, timer); |
494 | struct batadv_priv *bat_priv = tp_vars->bat_priv; | 494 | struct batadv_priv *bat_priv = tp_vars->bat_priv; |
495 | 495 | ||
496 | if (atomic_read(&tp_vars->sending) == 0) | 496 | if (atomic_read(&tp_vars->sending) == 0) |
@@ -1020,8 +1020,7 @@ void batadv_tp_start(struct batadv_priv *bat_priv, const u8 *dst, | |||
1020 | atomic64_set(&tp_vars->tot_sent, 0); | 1020 | atomic64_set(&tp_vars->tot_sent, 0); |
1021 | 1021 | ||
1022 | kref_get(&tp_vars->refcount); | 1022 | kref_get(&tp_vars->refcount); |
1023 | setup_timer(&tp_vars->timer, batadv_tp_sender_timeout, | 1023 | timer_setup(&tp_vars->timer, batadv_tp_sender_timeout, 0); |
1024 | (unsigned long)tp_vars); | ||
1025 | 1024 | ||
1026 | tp_vars->bat_priv = bat_priv; | 1025 | tp_vars->bat_priv = bat_priv; |
1027 | tp_vars->start_time = jiffies; | 1026 | tp_vars->start_time = jiffies; |
@@ -1109,9 +1108,9 @@ static void batadv_tp_reset_receiver_timer(struct batadv_tp_vars *tp_vars) | |||
1109 | * reached without received ack | 1108 | * reached without received ack |
1110 | * @arg: address of the related tp_vars | 1109 | * @arg: address of the related tp_vars |
1111 | */ | 1110 | */ |
1112 | static void batadv_tp_receiver_shutdown(unsigned long arg) | 1111 | static void batadv_tp_receiver_shutdown(struct timer_list *t) |
1113 | { | 1112 | { |
1114 | struct batadv_tp_vars *tp_vars = (struct batadv_tp_vars *)arg; | 1113 | struct batadv_tp_vars *tp_vars = from_timer(tp_vars, t, timer); |
1115 | struct batadv_tp_unacked *un, *safe; | 1114 | struct batadv_tp_unacked *un, *safe; |
1116 | struct batadv_priv *bat_priv; | 1115 | struct batadv_priv *bat_priv; |
1117 | 1116 | ||
@@ -1373,8 +1372,7 @@ batadv_tp_init_recv(struct batadv_priv *bat_priv, | |||
1373 | hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list); | 1372 | hlist_add_head_rcu(&tp_vars->list, &bat_priv->tp_list); |
1374 | 1373 | ||
1375 | kref_get(&tp_vars->refcount); | 1374 | kref_get(&tp_vars->refcount); |
1376 | setup_timer(&tp_vars->timer, batadv_tp_receiver_shutdown, | 1375 | timer_setup(&tp_vars->timer, batadv_tp_receiver_shutdown, 0); |
1377 | (unsigned long)tp_vars); | ||
1378 | 1376 | ||
1379 | batadv_tp_reset_receiver_timer(tp_vars); | 1377 | batadv_tp_reset_receiver_timer(tp_vars); |
1380 | 1378 | ||
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 8112893037bd..f2cec70d520c 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -398,9 +398,9 @@ static int hidp_raw_request(struct hid_device *hid, unsigned char reportnum, | |||
398 | } | 398 | } |
399 | } | 399 | } |
400 | 400 | ||
401 | static void hidp_idle_timeout(unsigned long arg) | 401 | static void hidp_idle_timeout(struct timer_list *t) |
402 | { | 402 | { |
403 | struct hidp_session *session = (struct hidp_session *) arg; | 403 | struct hidp_session *session = from_timer(session, t, timer); |
404 | 404 | ||
405 | /* The HIDP user-space API only contains calls to add and remove | 405 | /* The HIDP user-space API only contains calls to add and remove |
406 | * devices. There is no way to forward events of any kind. Therefore, | 406 | * devices. There is no way to forward events of any kind. Therefore, |
@@ -944,8 +944,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr, | |||
944 | 944 | ||
945 | /* device management */ | 945 | /* device management */ |
946 | INIT_WORK(&session->dev_init, hidp_session_dev_work); | 946 | INIT_WORK(&session->dev_init, hidp_session_dev_work); |
947 | setup_timer(&session->timer, hidp_idle_timeout, | 947 | timer_setup(&session->timer, hidp_idle_timeout, 0); |
948 | (unsigned long)session); | ||
949 | 948 | ||
950 | /* session data */ | 949 | /* session data */ |
951 | mutex_init(&session->report_mutex); | 950 | mutex_init(&session->report_mutex); |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 4a0b41d75c84..b98225d65e87 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -233,9 +233,9 @@ static int rfcomm_check_security(struct rfcomm_dlc *d) | |||
233 | d->out); | 233 | d->out); |
234 | } | 234 | } |
235 | 235 | ||
236 | static void rfcomm_session_timeout(unsigned long arg) | 236 | static void rfcomm_session_timeout(struct timer_list *t) |
237 | { | 237 | { |
238 | struct rfcomm_session *s = (void *) arg; | 238 | struct rfcomm_session *s = from_timer(s, t, timer); |
239 | 239 | ||
240 | BT_DBG("session %p state %ld", s, s->state); | 240 | BT_DBG("session %p state %ld", s, s->state); |
241 | 241 | ||
@@ -258,9 +258,9 @@ static void rfcomm_session_clear_timer(struct rfcomm_session *s) | |||
258 | } | 258 | } |
259 | 259 | ||
260 | /* ---- RFCOMM DLCs ---- */ | 260 | /* ---- RFCOMM DLCs ---- */ |
261 | static void rfcomm_dlc_timeout(unsigned long arg) | 261 | static void rfcomm_dlc_timeout(struct timer_list *t) |
262 | { | 262 | { |
263 | struct rfcomm_dlc *d = (void *) arg; | 263 | struct rfcomm_dlc *d = from_timer(d, t, timer); |
264 | 264 | ||
265 | BT_DBG("dlc %p state %ld", d, d->state); | 265 | BT_DBG("dlc %p state %ld", d, d->state); |
266 | 266 | ||
@@ -307,7 +307,7 @@ struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio) | |||
307 | if (!d) | 307 | if (!d) |
308 | return NULL; | 308 | return NULL; |
309 | 309 | ||
310 | setup_timer(&d->timer, rfcomm_dlc_timeout, (unsigned long)d); | 310 | timer_setup(&d->timer, rfcomm_dlc_timeout, 0); |
311 | 311 | ||
312 | skb_queue_head_init(&d->tx_queue); | 312 | skb_queue_head_init(&d->tx_queue); |
313 | mutex_init(&d->lock); | 313 | mutex_init(&d->lock); |
@@ -650,7 +650,7 @@ static struct rfcomm_session *rfcomm_session_add(struct socket *sock, int state) | |||
650 | 650 | ||
651 | BT_DBG("session %p sock %p", s, sock); | 651 | BT_DBG("session %p sock %p", s, sock); |
652 | 652 | ||
653 | setup_timer(&s->timer, rfcomm_session_timeout, (unsigned long) s); | 653 | timer_setup(&s->timer, rfcomm_session_timeout, 0); |
654 | 654 | ||
655 | INIT_LIST_HEAD(&s->dlcs); | 655 | INIT_LIST_HEAD(&s->dlcs); |
656 | s->state = state; | 656 | s->state = state; |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 795e920a3281..08df57665e1f 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -73,9 +73,9 @@ struct sco_pinfo { | |||
73 | #define SCO_CONN_TIMEOUT (HZ * 40) | 73 | #define SCO_CONN_TIMEOUT (HZ * 40) |
74 | #define SCO_DISCONN_TIMEOUT (HZ * 2) | 74 | #define SCO_DISCONN_TIMEOUT (HZ * 2) |
75 | 75 | ||
76 | static void sco_sock_timeout(unsigned long arg) | 76 | static void sco_sock_timeout(struct timer_list *t) |
77 | { | 77 | { |
78 | struct sock *sk = (struct sock *)arg; | 78 | struct sock *sk = from_timer(sk, t, sk_timer); |
79 | 79 | ||
80 | BT_DBG("sock %p state %d", sk, sk->sk_state); | 80 | BT_DBG("sock %p state %d", sk, sk->sk_state); |
81 | 81 | ||
@@ -487,7 +487,7 @@ static struct sock *sco_sock_alloc(struct net *net, struct socket *sock, | |||
487 | 487 | ||
488 | sco_pi(sk)->setting = BT_VOICE_CVSD_16BIT; | 488 | sco_pi(sk)->setting = BT_VOICE_CVSD_16BIT; |
489 | 489 | ||
490 | setup_timer(&sk->sk_timer, sco_sock_timeout, (unsigned long)sk); | 490 | timer_setup(&sk->sk_timer, sco_sock_timeout, 0); |
491 | 491 | ||
492 | bt_sock_link(&sco_sk_list, sk); | 492 | bt_sock_link(&sco_sk_list, sk); |
493 | return sk; | 493 | return sk; |
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 70ccda233bd1..c7785efeea57 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -144,9 +144,9 @@ static void send_dm_alert(struct work_struct *work) | |||
144 | * in the event that more drops will arrive during the | 144 | * in the event that more drops will arrive during the |
145 | * hysteresis period. | 145 | * hysteresis period. |
146 | */ | 146 | */ |
147 | static void sched_send_work(unsigned long _data) | 147 | static void sched_send_work(struct timer_list *t) |
148 | { | 148 | { |
149 | struct per_cpu_dm_data *data = (struct per_cpu_dm_data *)_data; | 149 | struct per_cpu_dm_data *data = from_timer(data, t, send_timer); |
150 | 150 | ||
151 | schedule_work(&data->dm_alert_work); | 151 | schedule_work(&data->dm_alert_work); |
152 | } | 152 | } |
@@ -412,8 +412,7 @@ static int __init init_net_drop_monitor(void) | |||
412 | for_each_possible_cpu(cpu) { | 412 | for_each_possible_cpu(cpu) { |
413 | data = &per_cpu(dm_cpu_data, cpu); | 413 | data = &per_cpu(dm_cpu_data, cpu); |
414 | INIT_WORK(&data->dm_alert_work, send_dm_alert); | 414 | INIT_WORK(&data->dm_alert_work, send_dm_alert); |
415 | setup_timer(&data->send_timer, sched_send_work, | 415 | timer_setup(&data->send_timer, sched_send_work, 0); |
416 | (unsigned long)data); | ||
417 | spin_lock_init(&data->lock); | 416 | spin_lock_init(&data->lock); |
418 | reset_per_cpu_data(data); | 417 | reset_per_cpu_data(data); |
419 | } | 418 | } |
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index 7c1ffd6f9501..9834cfa21b21 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c | |||
@@ -76,9 +76,9 @@ static void est_fetch_counters(struct net_rate_estimator *e, | |||
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
79 | static void est_timer(unsigned long arg) | 79 | static void est_timer(struct timer_list *t) |
80 | { | 80 | { |
81 | struct net_rate_estimator *est = (struct net_rate_estimator *)arg; | 81 | struct net_rate_estimator *est = from_timer(est, t, timer); |
82 | struct gnet_stats_basic_packed b; | 82 | struct gnet_stats_basic_packed b; |
83 | u64 rate, brate; | 83 | u64 rate, brate; |
84 | 84 | ||
@@ -170,7 +170,7 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats, | |||
170 | } | 170 | } |
171 | 171 | ||
172 | est->next_jiffies = jiffies + ((HZ/4) << intvl_log); | 172 | est->next_jiffies = jiffies + ((HZ/4) << intvl_log); |
173 | setup_timer(&est->timer, est_timer, (unsigned long)est); | 173 | timer_setup(&est->timer, est_timer, 0); |
174 | mod_timer(&est->timer, est->next_jiffies); | 174 | mod_timer(&est->timer, est->next_jiffies); |
175 | 175 | ||
176 | rcu_assign_pointer(*rate_est, est); | 176 | rcu_assign_pointer(*rate_est, est); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 6ea3a1a7f36a..d1f5fe986edd 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -51,7 +51,7 @@ do { \ | |||
51 | 51 | ||
52 | #define PNEIGH_HASHMASK 0xF | 52 | #define PNEIGH_HASHMASK 0xF |
53 | 53 | ||
54 | static void neigh_timer_handler(unsigned long arg); | 54 | static void neigh_timer_handler(struct timer_list *t); |
55 | static void __neigh_notify(struct neighbour *n, int type, int flags, | 55 | static void __neigh_notify(struct neighbour *n, int type, int flags, |
56 | u32 pid); | 56 | u32 pid); |
57 | static void neigh_update_notify(struct neighbour *neigh, u32 nlmsg_pid); | 57 | static void neigh_update_notify(struct neighbour *neigh, u32 nlmsg_pid); |
@@ -331,7 +331,7 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl, struct net_device | |||
331 | n->output = neigh_blackhole; | 331 | n->output = neigh_blackhole; |
332 | seqlock_init(&n->hh.hh_lock); | 332 | seqlock_init(&n->hh.hh_lock); |
333 | n->parms = neigh_parms_clone(&tbl->parms); | 333 | n->parms = neigh_parms_clone(&tbl->parms); |
334 | setup_timer(&n->timer, neigh_timer_handler, (unsigned long)n); | 334 | timer_setup(&n->timer, neigh_timer_handler, 0); |
335 | 335 | ||
336 | NEIGH_CACHE_STAT_INC(tbl, allocs); | 336 | NEIGH_CACHE_STAT_INC(tbl, allocs); |
337 | n->tbl = tbl; | 337 | n->tbl = tbl; |
@@ -903,10 +903,10 @@ static void neigh_probe(struct neighbour *neigh) | |||
903 | 903 | ||
904 | /* Called when a timer expires for a neighbour entry. */ | 904 | /* Called when a timer expires for a neighbour entry. */ |
905 | 905 | ||
906 | static void neigh_timer_handler(unsigned long arg) | 906 | static void neigh_timer_handler(struct timer_list *t) |
907 | { | 907 | { |
908 | unsigned long now, next; | 908 | unsigned long now, next; |
909 | struct neighbour *neigh = (struct neighbour *)arg; | 909 | struct neighbour *neigh = from_timer(neigh, t, timer); |
910 | unsigned int state; | 910 | unsigned int state; |
911 | int notify = 0; | 911 | int notify = 0; |
912 | 912 | ||
@@ -1391,9 +1391,9 @@ int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb) | |||
1391 | } | 1391 | } |
1392 | EXPORT_SYMBOL(neigh_direct_output); | 1392 | EXPORT_SYMBOL(neigh_direct_output); |
1393 | 1393 | ||
1394 | static void neigh_proxy_process(unsigned long arg) | 1394 | static void neigh_proxy_process(struct timer_list *t) |
1395 | { | 1395 | { |
1396 | struct neigh_table *tbl = (struct neigh_table *)arg; | 1396 | struct neigh_table *tbl = from_timer(tbl, t, proxy_timer); |
1397 | long sched_next = 0; | 1397 | long sched_next = 0; |
1398 | unsigned long now = jiffies; | 1398 | unsigned long now = jiffies; |
1399 | struct sk_buff *skb, *n; | 1399 | struct sk_buff *skb, *n; |
@@ -1573,7 +1573,7 @@ void neigh_table_init(int index, struct neigh_table *tbl) | |||
1573 | INIT_DEFERRABLE_WORK(&tbl->gc_work, neigh_periodic_work); | 1573 | INIT_DEFERRABLE_WORK(&tbl->gc_work, neigh_periodic_work); |
1574 | queue_delayed_work(system_power_efficient_wq, &tbl->gc_work, | 1574 | queue_delayed_work(system_power_efficient_wq, &tbl->gc_work, |
1575 | tbl->parms.reachable_time); | 1575 | tbl->parms.reachable_time); |
1576 | setup_timer(&tbl->proxy_timer, neigh_proxy_process, (unsigned long)tbl); | 1576 | timer_setup(&tbl->proxy_timer, neigh_proxy_process, 0); |
1577 | skb_queue_head_init_class(&tbl->proxy_queue, | 1577 | skb_queue_head_init_class(&tbl->proxy_queue, |
1578 | &neigh_table_proxy_queue_class); | 1578 | &neigh_table_proxy_queue_class); |
1579 | 1579 | ||
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index de4a0cafb19f..324cb9f2f551 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -183,7 +183,7 @@ static __inline__ unsigned int dn_hash(__le16 src, __le16 dst) | |||
183 | return dn_rt_hash_mask & (unsigned int)tmp; | 183 | return dn_rt_hash_mask & (unsigned int)tmp; |
184 | } | 184 | } |
185 | 185 | ||
186 | static void dn_dst_check_expire(unsigned long dummy) | 186 | static void dn_dst_check_expire(struct timer_list *unused) |
187 | { | 187 | { |
188 | int i; | 188 | int i; |
189 | struct dn_route *rt; | 189 | struct dn_route *rt; |
@@ -1875,7 +1875,7 @@ void __init dn_route_init(void) | |||
1875 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, | 1875 | kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0, |
1876 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | 1876 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); |
1877 | dst_entries_init(&dn_dst_ops); | 1877 | dst_entries_init(&dn_dst_ops); |
1878 | setup_timer(&dn_route_timer, dn_dst_check_expire, 0); | 1878 | timer_setup(&dn_route_timer, dn_dst_check_expire, 0); |
1879 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; | 1879 | dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; |
1880 | add_timer(&dn_route_timer); | 1880 | add_timer(&dn_route_timer); |
1881 | 1881 | ||
diff --git a/net/decnet/dn_timer.c b/net/decnet/dn_timer.c index f430daed24a0..aa4155875ca8 100644 --- a/net/decnet/dn_timer.c +++ b/net/decnet/dn_timer.c | |||
@@ -34,11 +34,11 @@ | |||
34 | 34 | ||
35 | #define SLOW_INTERVAL (HZ/2) | 35 | #define SLOW_INTERVAL (HZ/2) |
36 | 36 | ||
37 | static void dn_slow_timer(unsigned long arg); | 37 | static void dn_slow_timer(struct timer_list *t); |
38 | 38 | ||
39 | void dn_start_slow_timer(struct sock *sk) | 39 | void dn_start_slow_timer(struct sock *sk) |
40 | { | 40 | { |
41 | setup_timer(&sk->sk_timer, dn_slow_timer, (unsigned long)sk); | 41 | timer_setup(&sk->sk_timer, dn_slow_timer, 0); |
42 | sk_reset_timer(sk, &sk->sk_timer, jiffies + SLOW_INTERVAL); | 42 | sk_reset_timer(sk, &sk->sk_timer, jiffies + SLOW_INTERVAL); |
43 | } | 43 | } |
44 | 44 | ||
@@ -47,9 +47,9 @@ void dn_stop_slow_timer(struct sock *sk) | |||
47 | sk_stop_timer(sk, &sk->sk_timer); | 47 | sk_stop_timer(sk, &sk->sk_timer); |
48 | } | 48 | } |
49 | 49 | ||
50 | static void dn_slow_timer(unsigned long arg) | 50 | static void dn_slow_timer(struct timer_list *t) |
51 | { | 51 | { |
52 | struct sock *sk = (struct sock *)arg; | 52 | struct sock *sk = from_timer(sk, t, sk_timer); |
53 | struct dn_scp *scp = DN_SK(sk); | 53 | struct dn_scp *scp = DN_SK(sk); |
54 | 54 | ||
55 | bh_lock_sock(sk); | 55 | bh_lock_sock(sk); |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index ab183af0b5b6..d1f8f302dbf3 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -752,18 +752,18 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc, | |||
752 | return ip_local_out(net, skb->sk, skb); | 752 | return ip_local_out(net, skb->sk, skb); |
753 | } | 753 | } |
754 | 754 | ||
755 | static void igmp_gq_timer_expire(unsigned long data) | 755 | static void igmp_gq_timer_expire(struct timer_list *t) |
756 | { | 756 | { |
757 | struct in_device *in_dev = (struct in_device *)data; | 757 | struct in_device *in_dev = from_timer(in_dev, t, mr_gq_timer); |
758 | 758 | ||
759 | in_dev->mr_gq_running = 0; | 759 | in_dev->mr_gq_running = 0; |
760 | igmpv3_send_report(in_dev, NULL); | 760 | igmpv3_send_report(in_dev, NULL); |
761 | in_dev_put(in_dev); | 761 | in_dev_put(in_dev); |
762 | } | 762 | } |
763 | 763 | ||
764 | static void igmp_ifc_timer_expire(unsigned long data) | 764 | static void igmp_ifc_timer_expire(struct timer_list *t) |
765 | { | 765 | { |
766 | struct in_device *in_dev = (struct in_device *)data; | 766 | struct in_device *in_dev = from_timer(in_dev, t, mr_ifc_timer); |
767 | 767 | ||
768 | igmpv3_send_cr(in_dev); | 768 | igmpv3_send_cr(in_dev); |
769 | if (in_dev->mr_ifc_count) { | 769 | if (in_dev->mr_ifc_count) { |
@@ -784,9 +784,9 @@ static void igmp_ifc_event(struct in_device *in_dev) | |||
784 | } | 784 | } |
785 | 785 | ||
786 | 786 | ||
787 | static void igmp_timer_expire(unsigned long data) | 787 | static void igmp_timer_expire(struct timer_list *t) |
788 | { | 788 | { |
789 | struct ip_mc_list *im = (struct ip_mc_list *)data; | 789 | struct ip_mc_list *im = from_timer(im, t, timer); |
790 | struct in_device *in_dev = im->interface; | 790 | struct in_device *in_dev = im->interface; |
791 | 791 | ||
792 | spin_lock(&im->lock); | 792 | spin_lock(&im->lock); |
@@ -1385,7 +1385,7 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr) | |||
1385 | refcount_set(&im->refcnt, 1); | 1385 | refcount_set(&im->refcnt, 1); |
1386 | spin_lock_init(&im->lock); | 1386 | spin_lock_init(&im->lock); |
1387 | #ifdef CONFIG_IP_MULTICAST | 1387 | #ifdef CONFIG_IP_MULTICAST |
1388 | setup_timer(&im->timer, igmp_timer_expire, (unsigned long)im); | 1388 | timer_setup(&im->timer, igmp_timer_expire, 0); |
1389 | im->unsolicit_count = net->ipv4.sysctl_igmp_qrv; | 1389 | im->unsolicit_count = net->ipv4.sysctl_igmp_qrv; |
1390 | #endif | 1390 | #endif |
1391 | 1391 | ||
@@ -1695,10 +1695,8 @@ void ip_mc_init_dev(struct in_device *in_dev) | |||
1695 | ASSERT_RTNL(); | 1695 | ASSERT_RTNL(); |
1696 | 1696 | ||
1697 | #ifdef CONFIG_IP_MULTICAST | 1697 | #ifdef CONFIG_IP_MULTICAST |
1698 | setup_timer(&in_dev->mr_gq_timer, igmp_gq_timer_expire, | 1698 | timer_setup(&in_dev->mr_gq_timer, igmp_gq_timer_expire, 0); |
1699 | (unsigned long)in_dev); | 1699 | timer_setup(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire, 0); |
1700 | setup_timer(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire, | ||
1701 | (unsigned long)in_dev); | ||
1702 | in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv; | 1700 | in_dev->mr_qrv = net->ipv4.sysctl_igmp_qrv; |
1703 | #endif | 1701 | #endif |
1704 | 1702 | ||
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 40a43ad294cb..fd5f19c988e4 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -112,7 +112,7 @@ static void mroute_netlink_event(struct mr_table *mrt, struct mfc_cache *mfc, | |||
112 | int cmd); | 112 | int cmd); |
113 | static void igmpmsg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt); | 113 | static void igmpmsg_netlink_event(struct mr_table *mrt, struct sk_buff *pkt); |
114 | static void mroute_clean_tables(struct mr_table *mrt, bool all); | 114 | static void mroute_clean_tables(struct mr_table *mrt, bool all); |
115 | static void ipmr_expire_process(unsigned long arg); | 115 | static void ipmr_expire_process(struct timer_list *t); |
116 | 116 | ||
117 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 117 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
118 | #define ipmr_for_each_table(mrt, net) \ | 118 | #define ipmr_for_each_table(mrt, net) \ |
@@ -375,8 +375,7 @@ static struct mr_table *ipmr_new_table(struct net *net, u32 id) | |||
375 | INIT_LIST_HEAD(&mrt->mfc_cache_list); | 375 | INIT_LIST_HEAD(&mrt->mfc_cache_list); |
376 | INIT_LIST_HEAD(&mrt->mfc_unres_queue); | 376 | INIT_LIST_HEAD(&mrt->mfc_unres_queue); |
377 | 377 | ||
378 | setup_timer(&mrt->ipmr_expire_timer, ipmr_expire_process, | 378 | timer_setup(&mrt->ipmr_expire_timer, ipmr_expire_process, 0); |
379 | (unsigned long)mrt); | ||
380 | 379 | ||
381 | mrt->mroute_reg_vif_num = -1; | 380 | mrt->mroute_reg_vif_num = -1; |
382 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES | 381 | #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES |
@@ -804,9 +803,9 @@ static void ipmr_destroy_unres(struct mr_table *mrt, struct mfc_cache *c) | |||
804 | } | 803 | } |
805 | 804 | ||
806 | /* Timer process for the unresolved queue. */ | 805 | /* Timer process for the unresolved queue. */ |
807 | static void ipmr_expire_process(unsigned long arg) | 806 | static void ipmr_expire_process(struct timer_list *t) |
808 | { | 807 | { |
809 | struct mr_table *mrt = (struct mr_table *)arg; | 808 | struct mr_table *mrt = from_timer(mrt, t, ipmr_expire_timer); |
810 | unsigned long now; | 809 | unsigned long now; |
811 | unsigned long expires; | 810 | unsigned long expires; |
812 | struct mfc_cache *c, *next; | 811 | struct mfc_cache *c, *next; |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a0ae1c9d37df..f49bd7897e95 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -188,7 +188,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp); | |||
188 | static void addrconf_dad_work(struct work_struct *w); | 188 | static void addrconf_dad_work(struct work_struct *w); |
189 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id); | 189 | static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id); |
190 | static void addrconf_dad_run(struct inet6_dev *idev); | 190 | static void addrconf_dad_run(struct inet6_dev *idev); |
191 | static void addrconf_rs_timer(unsigned long data); | 191 | static void addrconf_rs_timer(struct timer_list *t); |
192 | static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); | 192 | static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); |
193 | static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); | 193 | static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifa); |
194 | 194 | ||
@@ -388,8 +388,7 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev) | |||
388 | rwlock_init(&ndev->lock); | 388 | rwlock_init(&ndev->lock); |
389 | ndev->dev = dev; | 389 | ndev->dev = dev; |
390 | INIT_LIST_HEAD(&ndev->addr_list); | 390 | INIT_LIST_HEAD(&ndev->addr_list); |
391 | setup_timer(&ndev->rs_timer, addrconf_rs_timer, | 391 | timer_setup(&ndev->rs_timer, addrconf_rs_timer, 0); |
392 | (unsigned long)ndev); | ||
393 | memcpy(&ndev->cnf, dev_net(dev)->ipv6.devconf_dflt, sizeof(ndev->cnf)); | 392 | memcpy(&ndev->cnf, dev_net(dev)->ipv6.devconf_dflt, sizeof(ndev->cnf)); |
394 | 393 | ||
395 | if (ndev->cnf.stable_secret.initialized) | 394 | if (ndev->cnf.stable_secret.initialized) |
@@ -3741,9 +3740,9 @@ restart: | |||
3741 | return 0; | 3740 | return 0; |
3742 | } | 3741 | } |
3743 | 3742 | ||
3744 | static void addrconf_rs_timer(unsigned long data) | 3743 | static void addrconf_rs_timer(struct timer_list *t) |
3745 | { | 3744 | { |
3746 | struct inet6_dev *idev = (struct inet6_dev *)data; | 3745 | struct inet6_dev *idev = from_timer(idev, t, rs_timer); |
3747 | struct net_device *dev = idev->dev; | 3746 | struct net_device *dev = idev->dev; |
3748 | struct in6_addr lladdr; | 3747 | struct in6_addr lladdr; |
3749 | 3748 | ||
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 9c24b85949c1..a2e1a864eb46 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -120,7 +120,7 @@ static void mrt6msg_netlink_event(struct mr6_table *mrt, struct sk_buff *pkt); | |||
120 | static int ip6mr_rtm_dumproute(struct sk_buff *skb, | 120 | static int ip6mr_rtm_dumproute(struct sk_buff *skb, |
121 | struct netlink_callback *cb); | 121 | struct netlink_callback *cb); |
122 | static void mroute_clean_tables(struct mr6_table *mrt, bool all); | 122 | static void mroute_clean_tables(struct mr6_table *mrt, bool all); |
123 | static void ipmr_expire_process(unsigned long arg); | 123 | static void ipmr_expire_process(struct timer_list *t); |
124 | 124 | ||
125 | #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES | 125 | #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES |
126 | #define ip6mr_for_each_table(mrt, net) \ | 126 | #define ip6mr_for_each_table(mrt, net) \ |
@@ -320,8 +320,7 @@ static struct mr6_table *ip6mr_new_table(struct net *net, u32 id) | |||
320 | 320 | ||
321 | INIT_LIST_HEAD(&mrt->mfc6_unres_queue); | 321 | INIT_LIST_HEAD(&mrt->mfc6_unres_queue); |
322 | 322 | ||
323 | setup_timer(&mrt->ipmr_expire_timer, ipmr_expire_process, | 323 | timer_setup(&mrt->ipmr_expire_timer, ipmr_expire_process, 0); |
324 | (unsigned long)mrt); | ||
325 | 324 | ||
326 | #ifdef CONFIG_IPV6_PIMSM_V2 | 325 | #ifdef CONFIG_IPV6_PIMSM_V2 |
327 | mrt->mroute_reg_vif_num = -1; | 326 | mrt->mroute_reg_vif_num = -1; |
@@ -888,9 +887,9 @@ static void ipmr_do_expire_process(struct mr6_table *mrt) | |||
888 | mod_timer(&mrt->ipmr_expire_timer, jiffies + expires); | 887 | mod_timer(&mrt->ipmr_expire_timer, jiffies + expires); |
889 | } | 888 | } |
890 | 889 | ||
891 | static void ipmr_expire_process(unsigned long arg) | 890 | static void ipmr_expire_process(struct timer_list *t) |
892 | { | 891 | { |
893 | struct mr6_table *mrt = (struct mr6_table *)arg; | 892 | struct mr6_table *mrt = from_timer(mrt, t, ipmr_expire_timer); |
894 | 893 | ||
895 | if (!spin_trylock(&mfc_unres_lock)) { | 894 | if (!spin_trylock(&mfc_unres_lock)) { |
896 | mod_timer(&mrt->ipmr_expire_timer, jiffies + 1); | 895 | mod_timer(&mrt->ipmr_expire_timer, jiffies + 1); |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 12b7c27ce5ce..fc6d7d143f2c 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -75,10 +75,10 @@ static struct in6_addr mld2_all_mcr = MLD2_ALL_MCR_INIT; | |||
75 | 75 | ||
76 | static void igmp6_join_group(struct ifmcaddr6 *ma); | 76 | static void igmp6_join_group(struct ifmcaddr6 *ma); |
77 | static void igmp6_leave_group(struct ifmcaddr6 *ma); | 77 | static void igmp6_leave_group(struct ifmcaddr6 *ma); |
78 | static void igmp6_timer_handler(unsigned long data); | 78 | static void igmp6_timer_handler(struct timer_list *t); |
79 | 79 | ||
80 | static void mld_gq_timer_expire(unsigned long data); | 80 | static void mld_gq_timer_expire(struct timer_list *t); |
81 | static void mld_ifc_timer_expire(unsigned long data); | 81 | static void mld_ifc_timer_expire(struct timer_list *t); |
82 | static void mld_ifc_event(struct inet6_dev *idev); | 82 | static void mld_ifc_event(struct inet6_dev *idev); |
83 | static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); | 83 | static void mld_add_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); |
84 | static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); | 84 | static void mld_del_delrec(struct inet6_dev *idev, struct ifmcaddr6 *pmc); |
@@ -839,7 +839,7 @@ static struct ifmcaddr6 *mca_alloc(struct inet6_dev *idev, | |||
839 | if (!mc) | 839 | if (!mc) |
840 | return NULL; | 840 | return NULL; |
841 | 841 | ||
842 | setup_timer(&mc->mca_timer, igmp6_timer_handler, (unsigned long)mc); | 842 | timer_setup(&mc->mca_timer, igmp6_timer_handler, 0); |
843 | 843 | ||
844 | mc->mca_addr = *addr; | 844 | mc->mca_addr = *addr; |
845 | mc->idev = idev; /* reference taken by caller */ | 845 | mc->idev = idev; /* reference taken by caller */ |
@@ -2083,9 +2083,9 @@ void ipv6_mc_dad_complete(struct inet6_dev *idev) | |||
2083 | } | 2083 | } |
2084 | } | 2084 | } |
2085 | 2085 | ||
2086 | static void mld_dad_timer_expire(unsigned long data) | 2086 | static void mld_dad_timer_expire(struct timer_list *t) |
2087 | { | 2087 | { |
2088 | struct inet6_dev *idev = (struct inet6_dev *)data; | 2088 | struct inet6_dev *idev = from_timer(idev, t, mc_dad_timer); |
2089 | 2089 | ||
2090 | mld_send_initial_cr(idev); | 2090 | mld_send_initial_cr(idev); |
2091 | if (idev->mc_dad_count) { | 2091 | if (idev->mc_dad_count) { |
@@ -2432,18 +2432,18 @@ static void igmp6_leave_group(struct ifmcaddr6 *ma) | |||
2432 | } | 2432 | } |
2433 | } | 2433 | } |
2434 | 2434 | ||
2435 | static void mld_gq_timer_expire(unsigned long data) | 2435 | static void mld_gq_timer_expire(struct timer_list *t) |
2436 | { | 2436 | { |
2437 | struct inet6_dev *idev = (struct inet6_dev *)data; | 2437 | struct inet6_dev *idev = from_timer(idev, t, mc_gq_timer); |
2438 | 2438 | ||
2439 | idev->mc_gq_running = 0; | 2439 | idev->mc_gq_running = 0; |
2440 | mld_send_report(idev, NULL); | 2440 | mld_send_report(idev, NULL); |
2441 | in6_dev_put(idev); | 2441 | in6_dev_put(idev); |
2442 | } | 2442 | } |
2443 | 2443 | ||
2444 | static void mld_ifc_timer_expire(unsigned long data) | 2444 | static void mld_ifc_timer_expire(struct timer_list *t) |
2445 | { | 2445 | { |
2446 | struct inet6_dev *idev = (struct inet6_dev *)data; | 2446 | struct inet6_dev *idev = from_timer(idev, t, mc_ifc_timer); |
2447 | 2447 | ||
2448 | mld_send_cr(idev); | 2448 | mld_send_cr(idev); |
2449 | if (idev->mc_ifc_count) { | 2449 | if (idev->mc_ifc_count) { |
@@ -2462,9 +2462,9 @@ static void mld_ifc_event(struct inet6_dev *idev) | |||
2462 | mld_ifc_start_timer(idev, 1); | 2462 | mld_ifc_start_timer(idev, 1); |
2463 | } | 2463 | } |
2464 | 2464 | ||
2465 | static void igmp6_timer_handler(unsigned long data) | 2465 | static void igmp6_timer_handler(struct timer_list *t) |
2466 | { | 2466 | { |
2467 | struct ifmcaddr6 *ma = (struct ifmcaddr6 *) data; | 2467 | struct ifmcaddr6 *ma = from_timer(ma, t, mca_timer); |
2468 | 2468 | ||
2469 | if (mld_in_v1_mode(ma->idev)) | 2469 | if (mld_in_v1_mode(ma->idev)) |
2470 | igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); | 2470 | igmp6_send(&ma->mca_addr, ma->idev->dev, ICMPV6_MGM_REPORT); |
@@ -2552,14 +2552,11 @@ void ipv6_mc_init_dev(struct inet6_dev *idev) | |||
2552 | write_lock_bh(&idev->lock); | 2552 | write_lock_bh(&idev->lock); |
2553 | spin_lock_init(&idev->mc_lock); | 2553 | spin_lock_init(&idev->mc_lock); |
2554 | idev->mc_gq_running = 0; | 2554 | idev->mc_gq_running = 0; |
2555 | setup_timer(&idev->mc_gq_timer, mld_gq_timer_expire, | 2555 | timer_setup(&idev->mc_gq_timer, mld_gq_timer_expire, 0); |
2556 | (unsigned long)idev); | ||
2557 | idev->mc_tomb = NULL; | 2556 | idev->mc_tomb = NULL; |
2558 | idev->mc_ifc_count = 0; | 2557 | idev->mc_ifc_count = 0; |
2559 | setup_timer(&idev->mc_ifc_timer, mld_ifc_timer_expire, | 2558 | timer_setup(&idev->mc_ifc_timer, mld_ifc_timer_expire, 0); |
2560 | (unsigned long)idev); | 2559 | timer_setup(&idev->mc_dad_timer, mld_dad_timer_expire, 0); |
2561 | setup_timer(&idev->mc_dad_timer, mld_dad_timer_expire, | ||
2562 | (unsigned long)idev); | ||
2563 | ipv6_mc_reset(idev); | 2560 | ipv6_mc_reset(idev); |
2564 | write_unlock_bh(&idev->lock); | 2561 | write_unlock_bh(&idev->lock); |
2565 | } | 2562 | } |
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index a2b904a718c6..3ccf8dfb233e 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c | |||
@@ -529,9 +529,9 @@ struct ncsi_dev *ncsi_find_dev(struct net_device *dev) | |||
529 | return NULL; | 529 | return NULL; |
530 | } | 530 | } |
531 | 531 | ||
532 | static void ncsi_request_timeout(unsigned long data) | 532 | static void ncsi_request_timeout(struct timer_list *t) |
533 | { | 533 | { |
534 | struct ncsi_request *nr = (struct ncsi_request *)data; | 534 | struct ncsi_request *nr = from_timer(nr, t, timer); |
535 | struct ncsi_dev_priv *ndp = nr->ndp; | 535 | struct ncsi_dev_priv *ndp = nr->ndp; |
536 | unsigned long flags; | 536 | unsigned long flags; |
537 | 537 | ||
@@ -1577,9 +1577,7 @@ struct ncsi_dev *ncsi_register_dev(struct net_device *dev, | |||
1577 | for (i = 0; i < ARRAY_SIZE(ndp->requests); i++) { | 1577 | for (i = 0; i < ARRAY_SIZE(ndp->requests); i++) { |
1578 | ndp->requests[i].id = i; | 1578 | ndp->requests[i].id = i; |
1579 | ndp->requests[i].ndp = ndp; | 1579 | ndp->requests[i].ndp = ndp; |
1580 | setup_timer(&ndp->requests[i].timer, | 1580 | timer_setup(&ndp->requests[i].timer, ncsi_request_timeout, 0); |
1581 | ncsi_request_timeout, | ||
1582 | (unsigned long)&ndp->requests[i]); | ||
1583 | } | 1581 | } |
1584 | 1582 | ||
1585 | spin_lock_irqsave(&ncsi_dev_lock, flags); | 1583 | spin_lock_irqsave(&ncsi_dev_lock, flags); |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 64778f9a8548..d6748a8a79c5 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -67,9 +67,9 @@ void nf_ct_unlink_expect_report(struct nf_conntrack_expect *exp, | |||
67 | } | 67 | } |
68 | EXPORT_SYMBOL_GPL(nf_ct_unlink_expect_report); | 68 | EXPORT_SYMBOL_GPL(nf_ct_unlink_expect_report); |
69 | 69 | ||
70 | static void nf_ct_expectation_timed_out(unsigned long ul_expect) | 70 | static void nf_ct_expectation_timed_out(struct timer_list *t) |
71 | { | 71 | { |
72 | struct nf_conntrack_expect *exp = (void *)ul_expect; | 72 | struct nf_conntrack_expect *exp = from_timer(exp, t, timeout); |
73 | 73 | ||
74 | spin_lock_bh(&nf_conntrack_expect_lock); | 74 | spin_lock_bh(&nf_conntrack_expect_lock); |
75 | nf_ct_unlink_expect(exp); | 75 | nf_ct_unlink_expect(exp); |
@@ -368,8 +368,7 @@ static void nf_ct_expect_insert(struct nf_conntrack_expect *exp) | |||
368 | /* two references : one for hash insert, one for the timer */ | 368 | /* two references : one for hash insert, one for the timer */ |
369 | refcount_add(2, &exp->use); | 369 | refcount_add(2, &exp->use); |
370 | 370 | ||
371 | setup_timer(&exp->timeout, nf_ct_expectation_timed_out, | 371 | timer_setup(&exp->timeout, nf_ct_expectation_timed_out, 0); |
372 | (unsigned long)exp); | ||
373 | helper = rcu_dereference_protected(master_help->helper, | 372 | helper = rcu_dereference_protected(master_help->helper, |
374 | lockdep_is_held(&nf_conntrack_expect_lock)); | 373 | lockdep_is_held(&nf_conntrack_expect_lock)); |
375 | if (helper) { | 374 | if (helper) { |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index cad6498f10b0..e5afab86381c 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -151,7 +151,7 @@ instance_put(struct nfulnl_instance *inst) | |||
151 | call_rcu_bh(&inst->rcu, nfulnl_instance_free_rcu); | 151 | call_rcu_bh(&inst->rcu, nfulnl_instance_free_rcu); |
152 | } | 152 | } |
153 | 153 | ||
154 | static void nfulnl_timer(unsigned long data); | 154 | static void nfulnl_timer(struct timer_list *t); |
155 | 155 | ||
156 | static struct nfulnl_instance * | 156 | static struct nfulnl_instance * |
157 | instance_create(struct net *net, u_int16_t group_num, | 157 | instance_create(struct net *net, u_int16_t group_num, |
@@ -184,7 +184,7 @@ instance_create(struct net *net, u_int16_t group_num, | |||
184 | /* needs to be two, since we _put() after creation */ | 184 | /* needs to be two, since we _put() after creation */ |
185 | refcount_set(&inst->use, 2); | 185 | refcount_set(&inst->use, 2); |
186 | 186 | ||
187 | setup_timer(&inst->timer, nfulnl_timer, (unsigned long)inst); | 187 | timer_setup(&inst->timer, nfulnl_timer, 0); |
188 | 188 | ||
189 | inst->net = get_net(net); | 189 | inst->net = get_net(net); |
190 | inst->peer_user_ns = user_ns; | 190 | inst->peer_user_ns = user_ns; |
@@ -377,9 +377,9 @@ __nfulnl_flush(struct nfulnl_instance *inst) | |||
377 | } | 377 | } |
378 | 378 | ||
379 | static void | 379 | static void |
380 | nfulnl_timer(unsigned long data) | 380 | nfulnl_timer(struct timer_list *t) |
381 | { | 381 | { |
382 | struct nfulnl_instance *inst = (struct nfulnl_instance *)data; | 382 | struct nfulnl_instance *inst = from_timer(inst, t, timer); |
383 | 383 | ||
384 | spin_lock_bh(&inst->lock); | 384 | spin_lock_bh(&inst->lock); |
385 | if (inst->skb) | 385 | if (inst->skb) |
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index daf45da448fa..ee3421ad108d 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c | |||
@@ -107,9 +107,9 @@ static void idletimer_tg_work(struct work_struct *work) | |||
107 | sysfs_notify(idletimer_tg_kobj, NULL, timer->attr.attr.name); | 107 | sysfs_notify(idletimer_tg_kobj, NULL, timer->attr.attr.name); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void idletimer_tg_expired(unsigned long data) | 110 | static void idletimer_tg_expired(struct timer_list *t) |
111 | { | 111 | { |
112 | struct idletimer_tg *timer = (struct idletimer_tg *) data; | 112 | struct idletimer_tg *timer = from_timer(timer, t, timer); |
113 | 113 | ||
114 | pr_debug("timer %s expired\n", timer->attr.attr.name); | 114 | pr_debug("timer %s expired\n", timer->attr.attr.name); |
115 | 115 | ||
@@ -143,8 +143,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) | |||
143 | 143 | ||
144 | list_add(&info->timer->entry, &idletimer_tg_list); | 144 | list_add(&info->timer->entry, &idletimer_tg_list); |
145 | 145 | ||
146 | setup_timer(&info->timer->timer, idletimer_tg_expired, | 146 | timer_setup(&info->timer->timer, idletimer_tg_expired, 0); |
147 | (unsigned long) info->timer); | ||
148 | info->timer->refcnt = 1; | 147 | info->timer->refcnt = 1; |
149 | 148 | ||
150 | mod_timer(&info->timer->timer, | 149 | mod_timer(&info->timer->timer, |
diff --git a/net/netfilter/xt_LED.c b/net/netfilter/xt_LED.c index 3ba31c194cce..0971634e5444 100644 --- a/net/netfilter/xt_LED.c +++ b/net/netfilter/xt_LED.c | |||
@@ -85,9 +85,10 @@ led_tg(struct sk_buff *skb, const struct xt_action_param *par) | |||
85 | return XT_CONTINUE; | 85 | return XT_CONTINUE; |
86 | } | 86 | } |
87 | 87 | ||
88 | static void led_timeout_callback(unsigned long data) | 88 | static void led_timeout_callback(struct timer_list *t) |
89 | { | 89 | { |
90 | struct xt_led_info_internal *ledinternal = (struct xt_led_info_internal *)data; | 90 | struct xt_led_info_internal *ledinternal = from_timer(ledinternal, t, |
91 | timer); | ||
91 | 92 | ||
92 | led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF); | 93 | led_trigger_event(&ledinternal->netfilter_led_trigger, LED_OFF); |
93 | } | 94 | } |
@@ -143,8 +144,7 @@ static int led_tg_check(const struct xt_tgchk_param *par) | |||
143 | 144 | ||
144 | /* See if we need to set up a timer */ | 145 | /* See if we need to set up a timer */ |
145 | if (ledinfo->delay > 0) | 146 | if (ledinfo->delay > 0) |
146 | setup_timer(&ledinternal->timer, led_timeout_callback, | 147 | timer_setup(&ledinternal->timer, led_timeout_callback, 0); |
147 | (unsigned long)ledinternal); | ||
148 | 148 | ||
149 | list_add_tail(&ledinternal->list, &xt_led_triggers); | 149 | list_add_tail(&ledinternal->list, &xt_led_triggers); |
150 | 150 | ||
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index c25e9b4179c3..074960154993 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c | |||
@@ -591,18 +591,18 @@ static int nci_close_device(struct nci_dev *ndev) | |||
591 | } | 591 | } |
592 | 592 | ||
593 | /* NCI command timer function */ | 593 | /* NCI command timer function */ |
594 | static void nci_cmd_timer(unsigned long arg) | 594 | static void nci_cmd_timer(struct timer_list *t) |
595 | { | 595 | { |
596 | struct nci_dev *ndev = (void *) arg; | 596 | struct nci_dev *ndev = from_timer(ndev, t, cmd_timer); |
597 | 597 | ||
598 | atomic_set(&ndev->cmd_cnt, 1); | 598 | atomic_set(&ndev->cmd_cnt, 1); |
599 | queue_work(ndev->cmd_wq, &ndev->cmd_work); | 599 | queue_work(ndev->cmd_wq, &ndev->cmd_work); |
600 | } | 600 | } |
601 | 601 | ||
602 | /* NCI data exchange timer function */ | 602 | /* NCI data exchange timer function */ |
603 | static void nci_data_timer(unsigned long arg) | 603 | static void nci_data_timer(struct timer_list *t) |
604 | { | 604 | { |
605 | struct nci_dev *ndev = (void *) arg; | 605 | struct nci_dev *ndev = from_timer(ndev, t, data_timer); |
606 | 606 | ||
607 | set_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); | 607 | set_bit(NCI_DATA_EXCHANGE_TO, &ndev->flags); |
608 | queue_work(ndev->rx_wq, &ndev->rx_work); | 608 | queue_work(ndev->rx_wq, &ndev->rx_work); |
@@ -1232,10 +1232,8 @@ int nci_register_device(struct nci_dev *ndev) | |||
1232 | skb_queue_head_init(&ndev->rx_q); | 1232 | skb_queue_head_init(&ndev->rx_q); |
1233 | skb_queue_head_init(&ndev->tx_q); | 1233 | skb_queue_head_init(&ndev->tx_q); |
1234 | 1234 | ||
1235 | setup_timer(&ndev->cmd_timer, nci_cmd_timer, | 1235 | timer_setup(&ndev->cmd_timer, nci_cmd_timer, 0); |
1236 | (unsigned long) ndev); | 1236 | timer_setup(&ndev->data_timer, nci_data_timer, 0); |
1237 | setup_timer(&ndev->data_timer, nci_data_timer, | ||
1238 | (unsigned long) ndev); | ||
1239 | 1237 | ||
1240 | mutex_init(&ndev->req_lock); | 1238 | mutex_init(&ndev->req_lock); |
1241 | INIT_LIST_HEAD(&ndev->conn_info_list); | 1239 | INIT_LIST_HEAD(&ndev->conn_info_list); |
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 4c7fbc6dcce7..994dc2df57e4 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c | |||
@@ -45,9 +45,9 @@ const char *const rxrpc_call_completions[NR__RXRPC_CALL_COMPLETIONS] = { | |||
45 | 45 | ||
46 | struct kmem_cache *rxrpc_call_jar; | 46 | struct kmem_cache *rxrpc_call_jar; |
47 | 47 | ||
48 | static void rxrpc_call_timer_expired(unsigned long _call) | 48 | static void rxrpc_call_timer_expired(struct timer_list *t) |
49 | { | 49 | { |
50 | struct rxrpc_call *call = (struct rxrpc_call *)_call; | 50 | struct rxrpc_call *call = from_timer(call, t, timer); |
51 | 51 | ||
52 | _enter("%d", call->debug_id); | 52 | _enter("%d", call->debug_id); |
53 | 53 | ||
@@ -114,8 +114,7 @@ struct rxrpc_call *rxrpc_alloc_call(gfp_t gfp) | |||
114 | goto nomem_2; | 114 | goto nomem_2; |
115 | 115 | ||
116 | mutex_init(&call->user_mutex); | 116 | mutex_init(&call->user_mutex); |
117 | setup_timer(&call->timer, rxrpc_call_timer_expired, | 117 | timer_setup(&call->timer, rxrpc_call_timer_expired, 0); |
118 | (unsigned long)call); | ||
119 | INIT_WORK(&call->processor, &rxrpc_process_call); | 118 | INIT_WORK(&call->processor, &rxrpc_process_call); |
120 | INIT_LIST_HEAD(&call->link); | 119 | INIT_LIST_HEAD(&call->link); |
121 | INIT_LIST_HEAD(&call->chan_wait_link); | 120 | INIT_LIST_HEAD(&call->chan_wait_link); |
diff --git a/net/wireless/lib80211.c b/net/wireless/lib80211.c index 459611577d3d..801d4781a73b 100644 --- a/net/wireless/lib80211.c +++ b/net/wireless/lib80211.c | |||
@@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(lib80211_crypto_lock); | |||
44 | static void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *info, | 44 | static void lib80211_crypt_deinit_entries(struct lib80211_crypt_info *info, |
45 | int force); | 45 | int force); |
46 | static void lib80211_crypt_quiescing(struct lib80211_crypt_info *info); | 46 | static void lib80211_crypt_quiescing(struct lib80211_crypt_info *info); |
47 | static void lib80211_crypt_deinit_handler(unsigned long data); | 47 | static void lib80211_crypt_deinit_handler(struct timer_list *t); |
48 | 48 | ||
49 | int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, | 49 | int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, |
50 | spinlock_t *lock) | 50 | spinlock_t *lock) |
@@ -55,8 +55,8 @@ int lib80211_crypt_info_init(struct lib80211_crypt_info *info, char *name, | |||
55 | info->lock = lock; | 55 | info->lock = lock; |
56 | 56 | ||
57 | INIT_LIST_HEAD(&info->crypt_deinit_list); | 57 | INIT_LIST_HEAD(&info->crypt_deinit_list); |
58 | setup_timer(&info->crypt_deinit_timer, lib80211_crypt_deinit_handler, | 58 | timer_setup(&info->crypt_deinit_timer, lib80211_crypt_deinit_handler, |
59 | (unsigned long)info); | 59 | 0); |
60 | 60 | ||
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
@@ -116,9 +116,10 @@ static void lib80211_crypt_quiescing(struct lib80211_crypt_info *info) | |||
116 | spin_unlock_irqrestore(info->lock, flags); | 116 | spin_unlock_irqrestore(info->lock, flags); |
117 | } | 117 | } |
118 | 118 | ||
119 | static void lib80211_crypt_deinit_handler(unsigned long data) | 119 | static void lib80211_crypt_deinit_handler(struct timer_list *t) |
120 | { | 120 | { |
121 | struct lib80211_crypt_info *info = (struct lib80211_crypt_info *)data; | 121 | struct lib80211_crypt_info *info = from_timer(info, t, |
122 | crypt_deinit_timer); | ||
122 | unsigned long flags; | 123 | unsigned long flags; |
123 | 124 | ||
124 | lib80211_crypt_deinit_entries(info, 0); | 125 | lib80211_crypt_deinit_entries(info, 0); |
diff --git a/net/x25/x25_link.c b/net/x25/x25_link.c index e0cd04d28352..a6a8ab09b914 100644 --- a/net/x25/x25_link.c +++ b/net/x25/x25_link.c | |||
@@ -36,7 +36,7 @@ | |||
36 | LIST_HEAD(x25_neigh_list); | 36 | LIST_HEAD(x25_neigh_list); |
37 | DEFINE_RWLOCK(x25_neigh_list_lock); | 37 | DEFINE_RWLOCK(x25_neigh_list_lock); |
38 | 38 | ||
39 | static void x25_t20timer_expiry(unsigned long); | 39 | static void x25_t20timer_expiry(struct timer_list *); |
40 | 40 | ||
41 | static void x25_transmit_restart_confirmation(struct x25_neigh *nb); | 41 | static void x25_transmit_restart_confirmation(struct x25_neigh *nb); |
42 | static void x25_transmit_restart_request(struct x25_neigh *nb); | 42 | static void x25_transmit_restart_request(struct x25_neigh *nb); |
@@ -49,9 +49,9 @@ static inline void x25_start_t20timer(struct x25_neigh *nb) | |||
49 | mod_timer(&nb->t20timer, jiffies + nb->t20); | 49 | mod_timer(&nb->t20timer, jiffies + nb->t20); |
50 | } | 50 | } |
51 | 51 | ||
52 | static void x25_t20timer_expiry(unsigned long param) | 52 | static void x25_t20timer_expiry(struct timer_list *t) |
53 | { | 53 | { |
54 | struct x25_neigh *nb = (struct x25_neigh *)param; | 54 | struct x25_neigh *nb = from_timer(nb, t, t20timer); |
55 | 55 | ||
56 | x25_transmit_restart_request(nb); | 56 | x25_transmit_restart_request(nb); |
57 | 57 | ||
@@ -252,7 +252,7 @@ void x25_link_device_up(struct net_device *dev) | |||
252 | return; | 252 | return; |
253 | 253 | ||
254 | skb_queue_head_init(&nb->queue); | 254 | skb_queue_head_init(&nb->queue); |
255 | setup_timer(&nb->t20timer, x25_t20timer_expiry, (unsigned long)nb); | 255 | timer_setup(&nb->t20timer, x25_t20timer_expiry, 0); |
256 | 256 | ||
257 | dev_hold(dev); | 257 | dev_hold(dev); |
258 | nb->dev = dev; | 258 | nb->dev = dev; |
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index 1f5cee2269af..065d89606888 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c | |||
@@ -556,7 +556,7 @@ out: | |||
556 | return HRTIMER_NORESTART; | 556 | return HRTIMER_NORESTART; |
557 | } | 557 | } |
558 | 558 | ||
559 | static void xfrm_replay_timer_handler(unsigned long data); | 559 | static void xfrm_replay_timer_handler(struct timer_list *t); |
560 | 560 | ||
561 | struct xfrm_state *xfrm_state_alloc(struct net *net) | 561 | struct xfrm_state *xfrm_state_alloc(struct net *net) |
562 | { | 562 | { |
@@ -574,8 +574,7 @@ struct xfrm_state *xfrm_state_alloc(struct net *net) | |||
574 | INIT_HLIST_NODE(&x->byspi); | 574 | INIT_HLIST_NODE(&x->byspi); |
575 | tasklet_hrtimer_init(&x->mtimer, xfrm_timer_handler, | 575 | tasklet_hrtimer_init(&x->mtimer, xfrm_timer_handler, |
576 | CLOCK_BOOTTIME, HRTIMER_MODE_ABS); | 576 | CLOCK_BOOTTIME, HRTIMER_MODE_ABS); |
577 | setup_timer(&x->rtimer, xfrm_replay_timer_handler, | 577 | timer_setup(&x->rtimer, xfrm_replay_timer_handler, 0); |
578 | (unsigned long)x); | ||
579 | x->curlft.add_time = get_seconds(); | 578 | x->curlft.add_time = get_seconds(); |
580 | x->lft.soft_byte_limit = XFRM_INF; | 579 | x->lft.soft_byte_limit = XFRM_INF; |
581 | x->lft.soft_packet_limit = XFRM_INF; | 580 | x->lft.soft_packet_limit = XFRM_INF; |
@@ -1879,9 +1878,9 @@ void xfrm_state_walk_done(struct xfrm_state_walk *walk, struct net *net) | |||
1879 | } | 1878 | } |
1880 | EXPORT_SYMBOL(xfrm_state_walk_done); | 1879 | EXPORT_SYMBOL(xfrm_state_walk_done); |
1881 | 1880 | ||
1882 | static void xfrm_replay_timer_handler(unsigned long data) | 1881 | static void xfrm_replay_timer_handler(struct timer_list *t) |
1883 | { | 1882 | { |
1884 | struct xfrm_state *x = (struct xfrm_state *)data; | 1883 | struct xfrm_state *x = from_timer(x, t, rtimer); |
1885 | 1884 | ||
1886 | spin_lock(&x->lock); | 1885 | spin_lock(&x->lock); |
1887 | 1886 | ||