diff options
351 files changed, 1225 insertions, 1773 deletions
diff --git a/Documentation/core-api/local_ops.rst b/Documentation/core-api/local_ops.rst index 1062ddba62c7..2ac3f9f29845 100644 --- a/Documentation/core-api/local_ops.rst +++ b/Documentation/core-api/local_ops.rst | |||
| @@ -177,18 +177,14 @@ Here is a sample module which implements a basic per cpu counter using | |||
| 177 | printk("Read : CPU %d, count %ld\n", cpu, | 177 | printk("Read : CPU %d, count %ld\n", cpu, |
| 178 | local_read(&per_cpu(counters, cpu))); | 178 | local_read(&per_cpu(counters, cpu))); |
| 179 | } | 179 | } |
| 180 | del_timer(&test_timer); | 180 | mod_timer(&test_timer, jiffies + 1000); |
| 181 | test_timer.expires = jiffies + 1000; | ||
| 182 | add_timer(&test_timer); | ||
| 183 | } | 181 | } |
| 184 | 182 | ||
| 185 | static int __init test_init(void) | 183 | static int __init test_init(void) |
| 186 | { | 184 | { |
| 187 | /* initialize the timer that will increment the counter */ | 185 | /* initialize the timer that will increment the counter */ |
| 188 | init_timer(&test_timer); | 186 | timer_setup(&test_timer, do_test_timer, 0); |
| 189 | test_timer.function = do_test_timer; | 187 | mod_timer(&test_timer, jiffies + 1); |
| 190 | test_timer.expires = jiffies + 1; | ||
| 191 | add_timer(&test_timer); | ||
| 192 | 188 | ||
| 193 | return 0; | 189 | return 0; |
| 194 | } | 190 | } |
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 c1cd80ecc219..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,8 +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 | init_timer(&power_button_poll_timer); | 339 | timer_setup(&power_button_poll_timer, power_button_poll, 0); |
| 340 | power_button_poll_timer.function = power_button_poll; | ||
| 341 | power_button_poll_timer.expires = jiffies + (HZ / 10); | 340 | power_button_poll_timer.expires = jiffies + (HZ / 10); |
| 342 | add_timer(&power_button_poll_timer); | 341 | add_timer(&power_button_poll_timer); |
| 343 | return 0; | 342 | return 0; |
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c index ac97a4599034..0f5c99941a7d 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-setup.c +++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c | |||
| @@ -179,10 +179,10 @@ static int power_button_countdown; | |||
| 179 | /* Must hold the button down for at least this many counts to be processed */ | 179 | /* Must hold the button down for at least this many counts to be processed */ |
| 180 | #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ | 180 | #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ |
| 181 | 181 | ||
| 182 | static void dsmg600_power_handler(unsigned long data); | 182 | static void dsmg600_power_handler(struct timer_list *unused); |
| 183 | static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler); | 183 | static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler); |
| 184 | 184 | ||
| 185 | static void dsmg600_power_handler(unsigned long data) | 185 | static void dsmg600_power_handler(struct timer_list *unused) |
| 186 | { | 186 | { |
| 187 | /* This routine is called twice per second to check the | 187 | /* This routine is called twice per second to check the |
| 188 | * state of the power button. | 188 | * state of the power button. |
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 435602085408..76dfff03cb71 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c | |||
| @@ -202,10 +202,10 @@ static int power_button_countdown; | |||
| 202 | /* Must hold the button down for at least this many counts to be processed */ | 202 | /* Must hold the button down for at least this many counts to be processed */ |
| 203 | #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ | 203 | #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ |
| 204 | 204 | ||
| 205 | static void nas100d_power_handler(unsigned long data); | 205 | static void nas100d_power_handler(struct timer_list *unused); |
| 206 | static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler); | 206 | static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler); |
| 207 | 207 | ||
| 208 | static void nas100d_power_handler(unsigned long data) | 208 | static void nas100d_power_handler(struct timer_list *unused) |
| 209 | { | 209 | { |
| 210 | /* This routine is called twice per second to check the | 210 | /* This routine is called twice per second to check the |
| 211 | * state of the power button. | 211 | * state of the power button. |
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 1e714329fe8a..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,8 +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 | init_timer(&ntimer); | 183 | timer_setup(&ntimer, nmi_wdt_timer, 0); |
| 184 | ntimer.function = nmi_wdt_timer; | ||
| 185 | ntimer.expires = jiffies + NMI_CHECK_TIMEOUT; | 184 | ntimer.expires = jiffies + NMI_CHECK_TIMEOUT; |
| 186 | add_timer(&ntimer); | 185 | add_timer(&ntimer); |
| 187 | 186 | ||
diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c index a23f48181fd6..442bdeee6bd7 100644 --- a/arch/m68k/amiga/amisound.c +++ b/arch/m68k/amiga/amisound.c | |||
| @@ -65,7 +65,7 @@ void __init amiga_init_sound(void) | |||
| 65 | #endif | 65 | #endif |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | static void nosound( unsigned long ignored ); | 68 | static void nosound(struct timer_list *unused); |
| 69 | static DEFINE_TIMER(sound_timer, nosound); | 69 | static DEFINE_TIMER(sound_timer, nosound); |
| 70 | 70 | ||
| 71 | void amiga_mksound( unsigned int hz, unsigned int ticks ) | 71 | void amiga_mksound( unsigned int hz, unsigned int ticks ) |
| @@ -107,7 +107,7 @@ void amiga_mksound( unsigned int hz, unsigned int ticks ) | |||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | 109 | ||
| 110 | static void nosound( unsigned long ignored ) | 110 | static void nosound(struct timer_list *unused) |
| 111 | { | 111 | { |
| 112 | /* turn off DMA for audio channel 2 */ | 112 | /* turn off DMA for audio channel 2 */ |
| 113 | custom.dmacon = DMAF_AUD2; | 113 | custom.dmacon = DMAF_AUD2; |
diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index d17668649641..388780797f7d 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c | |||
| @@ -48,9 +48,9 @@ static unsigned long mac_bell_phasepersample; | |||
| 48 | * some function protos | 48 | * some function protos |
| 49 | */ | 49 | */ |
| 50 | static void mac_init_asc( void ); | 50 | static void mac_init_asc( void ); |
| 51 | static void mac_nosound( unsigned long ); | 51 | static void mac_nosound(struct timer_list *); |
| 52 | static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int ); | 52 | static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int ); |
| 53 | static void mac_quadra_ring_bell( unsigned long ); | 53 | static void mac_quadra_ring_bell(struct timer_list *); |
| 54 | static void mac_av_start_bell( unsigned int, unsigned int, unsigned int ); | 54 | static void mac_av_start_bell( unsigned int, unsigned int, unsigned int ); |
| 55 | static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ); | 55 | static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ); |
| 56 | 56 | ||
| @@ -216,7 +216,7 @@ void mac_mksound( unsigned int freq, unsigned int length ) | |||
| 216 | /* | 216 | /* |
| 217 | * regular ASC: stop whining .. | 217 | * regular ASC: stop whining .. |
| 218 | */ | 218 | */ |
| 219 | static void mac_nosound( unsigned long ignored ) | 219 | static void mac_nosound(struct timer_list *unused) |
| 220 | { | 220 | { |
| 221 | mac_asc_regs[ ASC_ENABLE ] = 0; | 221 | mac_asc_regs[ ASC_ENABLE ] = 0; |
| 222 | } | 222 | } |
| @@ -270,7 +270,7 @@ static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsig | |||
| 270 | * already load the wave table, or at least call this one... | 270 | * already load the wave table, or at least call this one... |
| 271 | * This piece keeps reloading the wave table until done. | 271 | * This piece keeps reloading the wave table until done. |
| 272 | */ | 272 | */ |
| 273 | static void mac_quadra_ring_bell( unsigned long ignored ) | 273 | static void mac_quadra_ring_bell(struct timer_list *unused) |
| 274 | { | 274 | { |
| 275 | int i, count = mac_asc_samplespersec / HZ; | 275 | int i, count = mac_asc_samplespersec / HZ; |
| 276 | unsigned long flags; | 276 | unsigned long flags; |
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/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c index 063de44675ce..ee0bd50f754b 100644 --- a/arch/mips/mti-malta/malta-display.c +++ b/arch/mips/mti-malta/malta-display.c | |||
| @@ -36,10 +36,10 @@ void mips_display_message(const char *str) | |||
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | static void scroll_display_message(unsigned long unused); | 39 | static void scroll_display_message(struct timer_list *unused); |
| 40 | static DEFINE_TIMER(mips_scroll_timer, scroll_display_message); | 40 | static DEFINE_TIMER(mips_scroll_timer, scroll_display_message); |
| 41 | 41 | ||
| 42 | static void scroll_display_message(unsigned long unused) | 42 | static void scroll_display_message(struct timer_list *unused) |
| 43 | { | 43 | { |
| 44 | mips_display_message(&display_string[display_count++]); | 44 | mips_display_message(&display_string[display_count++]); |
| 45 | if (display_count == max_display_count) | 45 | if (display_count == max_display_count) |
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 27a2dd616a7d..c46bf29ae412 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c | |||
| @@ -91,7 +91,7 @@ static int pdc_console_setup(struct console *co, char *options) | |||
| 91 | 91 | ||
| 92 | #define PDC_CONS_POLL_DELAY (30 * HZ / 1000) | 92 | #define PDC_CONS_POLL_DELAY (30 * HZ / 1000) |
| 93 | 93 | ||
| 94 | static void pdc_console_poll(unsigned long unused); | 94 | static void pdc_console_poll(struct timer_list *unused); |
| 95 | static DEFINE_TIMER(pdc_console_timer, pdc_console_poll); | 95 | static DEFINE_TIMER(pdc_console_timer, pdc_console_poll); |
| 96 | static struct tty_port tty_port; | 96 | static struct tty_port tty_port; |
| 97 | 97 | ||
| @@ -135,7 +135,7 @@ static const struct tty_operations pdc_console_tty_ops = { | |||
| 135 | .chars_in_buffer = pdc_console_tty_chars_in_buffer, | 135 | .chars_in_buffer = pdc_console_tty_chars_in_buffer, |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | static void pdc_console_poll(unsigned long unused) | 138 | static void pdc_console_poll(struct timer_list *unused) |
| 139 | { | 139 | { |
| 140 | int data, count = 0; | 140 | int data, count = 0; |
| 141 | 141 | ||
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/kvm/booke.c b/arch/powerpc/kvm/booke.c index 071b87ee682f..83b485810aea 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
| @@ -599,9 +599,9 @@ static void arm_next_watchdog(struct kvm_vcpu *vcpu) | |||
| 599 | spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags); | 599 | spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags); |
| 600 | } | 600 | } |
| 601 | 601 | ||
| 602 | void kvmppc_watchdog_func(unsigned long data) | 602 | void kvmppc_watchdog_func(struct timer_list *t) |
| 603 | { | 603 | { |
| 604 | struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data; | 604 | struct kvm_vcpu *vcpu = from_timer(vcpu, t, arch.wdt_timer); |
| 605 | u32 tsr, new_tsr; | 605 | u32 tsr, new_tsr; |
| 606 | int final; | 606 | int final; |
| 607 | 607 | ||
| @@ -1412,8 +1412,7 @@ int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu) | |||
| 1412 | { | 1412 | { |
| 1413 | /* setup watchdog timer once */ | 1413 | /* setup watchdog timer once */ |
| 1414 | spin_lock_init(&vcpu->arch.wdt_lock); | 1414 | spin_lock_init(&vcpu->arch.wdt_lock); |
| 1415 | setup_timer(&vcpu->arch.wdt_timer, kvmppc_watchdog_func, | 1415 | timer_setup(&vcpu->arch.wdt_timer, kvmppc_watchdog_func, 0); |
| 1416 | (unsigned long)vcpu); | ||
| 1417 | 1416 | ||
| 1418 | /* | 1417 | /* |
| 1419 | * Clear DBSR.MRR to avoid guest debug interrupt as | 1418 | * Clear DBSR.MRR to avoid guest debug interrupt as |
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/s390/mm/cmm.c b/arch/s390/mm/cmm.c index 2dbdcd85b68f..3d017171ff8f 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
| @@ -56,10 +56,10 @@ static DEFINE_SPINLOCK(cmm_lock); | |||
| 56 | 56 | ||
| 57 | static struct task_struct *cmm_thread_ptr; | 57 | static struct task_struct *cmm_thread_ptr; |
| 58 | static DECLARE_WAIT_QUEUE_HEAD(cmm_thread_wait); | 58 | static DECLARE_WAIT_QUEUE_HEAD(cmm_thread_wait); |
| 59 | static DEFINE_TIMER(cmm_timer, NULL); | ||
| 60 | 59 | ||
| 61 | static void cmm_timer_fn(unsigned long); | 60 | static void cmm_timer_fn(struct timer_list *); |
| 62 | static void cmm_set_timer(void); | 61 | static void cmm_set_timer(void); |
| 62 | static DEFINE_TIMER(cmm_timer, cmm_timer_fn); | ||
| 63 | 63 | ||
| 64 | static long cmm_alloc_pages(long nr, long *counter, | 64 | static long cmm_alloc_pages(long nr, long *counter, |
| 65 | struct cmm_page_array **list) | 65 | struct cmm_page_array **list) |
| @@ -194,13 +194,11 @@ static void cmm_set_timer(void) | |||
| 194 | if (mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds*HZ)) | 194 | if (mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds*HZ)) |
| 195 | return; | 195 | return; |
| 196 | } | 196 | } |
| 197 | cmm_timer.function = cmm_timer_fn; | ||
| 198 | cmm_timer.data = 0; | ||
| 199 | cmm_timer.expires = jiffies + cmm_timeout_seconds*HZ; | 197 | cmm_timer.expires = jiffies + cmm_timeout_seconds*HZ; |
| 200 | add_timer(&cmm_timer); | 198 | add_timer(&cmm_timer); |
| 201 | } | 199 | } |
| 202 | 200 | ||
| 203 | static void cmm_timer_fn(unsigned long ignored) | 201 | static void cmm_timer_fn(struct timer_list *unused) |
| 204 | { | 202 | { |
| 205 | long nr; | 203 | long nr; |
| 206 | 204 | ||
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 cae707f3472d..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,15 +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 | init_timer(&hose->err_timer); | 109 | timer_setup(&hose->err_timer, pcibios_enable_err, 0); |
| 110 | hose->err_timer.data = (unsigned long)hose; | ||
| 111 | hose->err_timer.function = pcibios_enable_err; | ||
| 112 | } | 110 | } |
| 113 | 111 | ||
| 114 | if (hose->serr_irq) { | 112 | if (hose->serr_irq) { |
| 115 | init_timer(&hose->serr_timer); | 113 | timer_setup(&hose->serr_timer, pcibios_enable_serr, 0); |
| 116 | hose->serr_timer.data = (unsigned long)hose; | ||
| 117 | hose->serr_timer.function = pcibios_enable_serr; | ||
| 118 | } | 114 | } |
| 119 | } | 115 | } |
| 120 | 116 | ||
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 5bfb341cc5c4..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,10 +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 | init_timer(&psw->debounce); | 81 | timer_setup(&psw->debounce, switch_timer, 0); |
| 82 | |||
| 83 | psw->debounce.function = switch_timer; | ||
| 84 | psw->debounce.data = (unsigned long)psw; | ||
| 85 | 82 | ||
| 86 | /* Workqueue API brain-damage */ | 83 | /* Workqueue API brain-damage */ |
| 87 | psw->pdev = pdev; | 84 | psw->pdev = pdev; |
diff --git a/block/blk-core.c b/block/blk-core.c index 1038706edd87..b8881750a3ac 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
| @@ -863,9 +863,9 @@ static void blk_queue_usage_counter_release(struct percpu_ref *ref) | |||
| 863 | wake_up_all(&q->mq_freeze_wq); | 863 | wake_up_all(&q->mq_freeze_wq); |
| 864 | } | 864 | } |
| 865 | 865 | ||
| 866 | static void blk_rq_timed_out_timer(unsigned long data) | 866 | static void blk_rq_timed_out_timer(struct timer_list *t) |
| 867 | { | 867 | { |
| 868 | struct request_queue *q = (struct request_queue *)data; | 868 | struct request_queue *q = from_timer(q, t, timeout); |
| 869 | 869 | ||
| 870 | kblockd_schedule_work(&q->timeout_work); | 870 | kblockd_schedule_work(&q->timeout_work); |
| 871 | } | 871 | } |
| @@ -901,9 +901,9 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) | |||
| 901 | q->backing_dev_info->name = "block"; | 901 | q->backing_dev_info->name = "block"; |
| 902 | q->node = node_id; | 902 | q->node = node_id; |
| 903 | 903 | ||
| 904 | setup_timer(&q->backing_dev_info->laptop_mode_wb_timer, | 904 | timer_setup(&q->backing_dev_info->laptop_mode_wb_timer, |
| 905 | laptop_mode_timer_fn, (unsigned long) q); | 905 | laptop_mode_timer_fn, 0); |
| 906 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); | 906 | timer_setup(&q->timeout, blk_rq_timed_out_timer, 0); |
| 907 | INIT_WORK(&q->timeout_work, NULL); | 907 | INIT_WORK(&q->timeout_work, NULL); |
| 908 | INIT_LIST_HEAD(&q->queue_head); | 908 | INIT_LIST_HEAD(&q->queue_head); |
| 909 | INIT_LIST_HEAD(&q->timeout_list); | 909 | INIT_LIST_HEAD(&q->timeout_list); |
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 6b6368a56526..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,9 +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 | init_timer (&dev->timer); | 1888 | timer_setup(&dev->timer, fs_poll, 0); |
| 1889 | dev->timer.data = (unsigned long) dev; | ||
| 1890 | dev->timer.function = fs_poll; | ||
| 1891 | dev->timer.expires = jiffies + FS_POLL_FREQ; | 1889 | dev->timer.expires = jiffies + FS_POLL_FREQ; |
| 1892 | add_timer (&dev->timer); | 1890 | add_timer (&dev->timer); |
| 1893 | #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/idt77105.c b/drivers/atm/idt77105.c index 909744eb7bab..0a67487c0b1d 100644 --- a/drivers/atm/idt77105.c +++ b/drivers/atm/idt77105.c | |||
| @@ -45,8 +45,8 @@ static DEFINE_SPINLOCK(idt77105_priv_lock); | |||
| 45 | #define PUT(val,reg) dev->ops->phy_put(dev,val,IDT77105_##reg) | 45 | #define PUT(val,reg) dev->ops->phy_put(dev,val,IDT77105_##reg) |
| 46 | #define GET(reg) dev->ops->phy_get(dev,IDT77105_##reg) | 46 | #define GET(reg) dev->ops->phy_get(dev,IDT77105_##reg) |
| 47 | 47 | ||
| 48 | static void idt77105_stats_timer_func(unsigned long); | 48 | static void idt77105_stats_timer_func(struct timer_list *); |
| 49 | static void idt77105_restart_timer_func(unsigned long); | 49 | static void idt77105_restart_timer_func(struct timer_list *); |
| 50 | 50 | ||
| 51 | 51 | ||
| 52 | static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func); | 52 | static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func); |
| @@ -80,7 +80,7 @@ static u16 get_counter(struct atm_dev *dev, int counter) | |||
| 80 | * a separate copy of the stats allows implementation of | 80 | * a separate copy of the stats allows implementation of |
| 81 | * an ioctl which gathers the stats *without* zero'ing them. | 81 | * an ioctl which gathers the stats *without* zero'ing them. |
| 82 | */ | 82 | */ |
| 83 | static void idt77105_stats_timer_func(unsigned long dummy) | 83 | static void idt77105_stats_timer_func(struct timer_list *unused) |
| 84 | { | 84 | { |
| 85 | struct idt77105_priv *walk; | 85 | struct idt77105_priv *walk; |
| 86 | struct atm_dev *dev; | 86 | struct atm_dev *dev; |
| @@ -109,7 +109,7 @@ static void idt77105_stats_timer_func(unsigned long dummy) | |||
| 109 | * interrupts need to be disabled when the cable is pulled out | 109 | * interrupts need to be disabled when the cable is pulled out |
| 110 | * to avoid lots of spurious cell error interrupts. | 110 | * to avoid lots of spurious cell error interrupts. |
| 111 | */ | 111 | */ |
| 112 | static void idt77105_restart_timer_func(unsigned long dummy) | 112 | static void idt77105_restart_timer_func(struct timer_list *unused) |
| 113 | { | 113 | { |
| 114 | struct idt77105_priv *walk; | 114 | struct idt77105_priv *walk; |
| 115 | struct atm_dev *dev; | 115 | struct atm_dev *dev; |
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/iphase.c b/drivers/atm/iphase.c index 12f646760b68..98a3a43484c8 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
| @@ -75,7 +75,7 @@ static void desc_dbg(IADEV *iadev); | |||
| 75 | static IADEV *ia_dev[8]; | 75 | static IADEV *ia_dev[8]; |
| 76 | static struct atm_dev *_ia_dev[8]; | 76 | static struct atm_dev *_ia_dev[8]; |
| 77 | static int iadev_count; | 77 | static int iadev_count; |
| 78 | static void ia_led_timer(unsigned long arg); | 78 | static void ia_led_timer(struct timer_list *unused); |
| 79 | static DEFINE_TIMER(ia_timer, ia_led_timer); | 79 | static DEFINE_TIMER(ia_timer, ia_led_timer); |
| 80 | static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ; | 80 | static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ; |
| 81 | static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ; | 81 | static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ; |
| @@ -2432,7 +2432,7 @@ static void ia_update_stats(IADEV *iadev) { | |||
| 2432 | return; | 2432 | return; |
| 2433 | } | 2433 | } |
| 2434 | 2434 | ||
| 2435 | static void ia_led_timer(unsigned long arg) { | 2435 | static void ia_led_timer(struct timer_list *unused) { |
| 2436 | unsigned long flags; | 2436 | unsigned long flags; |
| 2437 | static u_char blinking[8] = {0, 0, 0, 0, 0, 0, 0, 0}; | 2437 | static u_char blinking[8] = {0, 0, 0, 0, 0, 0, 0, 0}; |
| 2438 | u_char i; | 2438 | u_char i; |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 2351dad78ff5..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,10 +1790,8 @@ 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 | init_timer(&lanai->timer); | 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 | lanai->timer.data = (unsigned long) lanai; | ||
| 1796 | lanai->timer.function = lanai_timed_poll; | ||
| 1797 | add_timer(&lanai->timer); | 1795 | add_timer(&lanai->timer); |
| 1798 | } | 1796 | } |
| 1799 | 1797 | ||
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index a9702836cbae..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,10 +284,8 @@ 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 | init_timer(&ns_timer); | 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 | ns_timer.data = 0UL; | ||
| 290 | ns_timer.function = ns_poll; | ||
| 291 | add_timer(&ns_timer); | 289 | add_timer(&ns_timer); |
| 292 | } | 290 | } |
| 293 | 291 | ||
| @@ -2681,7 +2679,7 @@ static void which_list(ns_dev * card, struct sk_buff *skb) | |||
| 2681 | } | 2679 | } |
| 2682 | #endif /* EXTRA_DEBUG */ | 2680 | #endif /* EXTRA_DEBUG */ |
| 2683 | 2681 | ||
| 2684 | static void ns_poll(unsigned long arg) | 2682 | static void ns_poll(struct timer_list *unused) |
| 2685 | { | 2683 | { |
| 2686 | int i; | 2684 | int i; |
| 2687 | ns_dev *card; | 2685 | ns_dev *card; |
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 680ee1d36ac9..38559f04db2c 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c | |||
| @@ -481,7 +481,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws) | |||
| 481 | * Use timer struct to check if the given source is initialized | 481 | * Use timer struct to check if the given source is initialized |
| 482 | * by wakeup_source_add. | 482 | * by wakeup_source_add. |
| 483 | */ | 483 | */ |
| 484 | return ws->timer.function != (TIMER_FUNC_TYPE)pm_wakeup_timer_fn; | 484 | return ws->timer.function != pm_wakeup_timer_fn; |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | /* | 487 | /* |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 255591ab3716..442e777bdfb2 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
| @@ -3079,11 +3079,10 @@ DAC960_InitializeController(DAC960_Controller_T *Controller) | |||
| 3079 | /* | 3079 | /* |
| 3080 | Initialize the Monitoring Timer. | 3080 | Initialize the Monitoring Timer. |
| 3081 | */ | 3081 | */ |
| 3082 | init_timer(&Controller->MonitoringTimer); | 3082 | timer_setup(&Controller->MonitoringTimer, |
| 3083 | DAC960_MonitoringTimerFunction, 0); | ||
| 3083 | Controller->MonitoringTimer.expires = | 3084 | Controller->MonitoringTimer.expires = |
| 3084 | jiffies + DAC960_MonitoringTimerInterval; | 3085 | jiffies + DAC960_MonitoringTimerInterval; |
| 3085 | Controller->MonitoringTimer.data = (unsigned long) Controller; | ||
| 3086 | Controller->MonitoringTimer.function = DAC960_MonitoringTimerFunction; | ||
| 3087 | add_timer(&Controller->MonitoringTimer); | 3086 | add_timer(&Controller->MonitoringTimer); |
| 3088 | Controller->ControllerInitialized = true; | 3087 | Controller->ControllerInitialized = true; |
| 3089 | return true; | 3088 | return true; |
| @@ -5620,9 +5619,9 @@ static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *Command) | |||
| 5620 | the status of DAC960 Controllers. | 5619 | the status of DAC960 Controllers. |
| 5621 | */ | 5620 | */ |
| 5622 | 5621 | ||
| 5623 | static void DAC960_MonitoringTimerFunction(unsigned long TimerData) | 5622 | static void DAC960_MonitoringTimerFunction(struct timer_list *t) |
| 5624 | { | 5623 | { |
| 5625 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) TimerData; | 5624 | DAC960_Controller_T *Controller = from_timer(Controller, t, MonitoringTimer); |
| 5626 | DAC960_Command_T *Command; | 5625 | DAC960_Command_T *Command; |
| 5627 | unsigned long flags; | 5626 | unsigned long flags; |
| 5628 | 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/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 55ab25f79a08..812fed069708 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
| @@ -1429,7 +1429,7 @@ aoecmd_ata_id(struct aoedev *d) | |||
| 1429 | 1429 | ||
| 1430 | d->rttavg = RTTAVG_INIT; | 1430 | d->rttavg = RTTAVG_INIT; |
| 1431 | d->rttdev = RTTDEV_INIT; | 1431 | d->rttdev = RTTDEV_INIT; |
| 1432 | d->timer.function = (TIMER_FUNC_TYPE)rexmit_timer; | 1432 | d->timer.function = rexmit_timer; |
| 1433 | 1433 | ||
| 1434 | skb = skb_clone(skb, GFP_ATOMIC); | 1434 | skb = skb_clone(skb, GFP_ATOMIC); |
| 1435 | if (skb) { | 1435 | if (skb) { |
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index ae596e55bcb6..8bc3b9fd8dd2 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
| @@ -342,8 +342,8 @@ static int NeedSeek = 0; | |||
| 342 | static void fd_select_side( int side ); | 342 | static void fd_select_side( int side ); |
| 343 | static void fd_select_drive( int drive ); | 343 | static void fd_select_drive( int drive ); |
| 344 | static void fd_deselect( void ); | 344 | static void fd_deselect( void ); |
| 345 | static void fd_motor_off_timer( unsigned long dummy ); | 345 | static void fd_motor_off_timer(struct timer_list *unused); |
| 346 | static void check_change( unsigned long dummy ); | 346 | static void check_change(struct timer_list *unused); |
| 347 | static irqreturn_t floppy_irq (int irq, void *dummy); | 347 | static irqreturn_t floppy_irq (int irq, void *dummy); |
| 348 | static void fd_error( void ); | 348 | static void fd_error( void ); |
| 349 | static int do_format(int drive, int type, struct atari_format_descr *desc); | 349 | static int do_format(int drive, int type, struct atari_format_descr *desc); |
| @@ -353,12 +353,12 @@ static void fd_calibrate_done( int status ); | |||
| 353 | static void fd_seek( void ); | 353 | static void fd_seek( void ); |
| 354 | static void fd_seek_done( int status ); | 354 | static void fd_seek_done( int status ); |
| 355 | static void fd_rwsec( void ); | 355 | static void fd_rwsec( void ); |
| 356 | static void fd_readtrack_check( unsigned long dummy ); | 356 | static void fd_readtrack_check(struct timer_list *unused); |
| 357 | static void fd_rwsec_done( int status ); | 357 | static void fd_rwsec_done( int status ); |
| 358 | static void fd_rwsec_done1(int status); | 358 | static void fd_rwsec_done1(int status); |
| 359 | static void fd_writetrack( void ); | 359 | static void fd_writetrack( void ); |
| 360 | static void fd_writetrack_done( int status ); | 360 | static void fd_writetrack_done( int status ); |
| 361 | static void fd_times_out( unsigned long dummy ); | 361 | static void fd_times_out(struct timer_list *unused); |
| 362 | static void finish_fdc( void ); | 362 | static void finish_fdc( void ); |
| 363 | static void finish_fdc_done( int dummy ); | 363 | static void finish_fdc_done( int dummy ); |
| 364 | static void setup_req_params( int drive ); | 364 | static void setup_req_params( int drive ); |
| @@ -479,7 +479,7 @@ static void fd_deselect( void ) | |||
| 479 | * counts the index signals, which arrive only if one drive is selected. | 479 | * counts the index signals, which arrive only if one drive is selected. |
| 480 | */ | 480 | */ |
| 481 | 481 | ||
| 482 | static void fd_motor_off_timer( unsigned long dummy ) | 482 | static void fd_motor_off_timer(struct timer_list *unused) |
| 483 | { | 483 | { |
| 484 | unsigned char status; | 484 | unsigned char status; |
| 485 | 485 | ||
| @@ -515,7 +515,7 @@ static void fd_motor_off_timer( unsigned long dummy ) | |||
| 515 | * as possible) and keep track of the current state of the write protection. | 515 | * as possible) and keep track of the current state of the write protection. |
| 516 | */ | 516 | */ |
| 517 | 517 | ||
| 518 | static void check_change( unsigned long dummy ) | 518 | static void check_change(struct timer_list *unused) |
| 519 | { | 519 | { |
| 520 | static int drive = 0; | 520 | static int drive = 0; |
| 521 | 521 | ||
| @@ -966,7 +966,7 @@ static void fd_rwsec( void ) | |||
| 966 | } | 966 | } |
| 967 | 967 | ||
| 968 | 968 | ||
| 969 | static void fd_readtrack_check( unsigned long dummy ) | 969 | static void fd_readtrack_check(struct timer_list *unused) |
| 970 | { | 970 | { |
| 971 | unsigned long flags, addr, addr2; | 971 | unsigned long flags, addr, addr2; |
| 972 | 972 | ||
| @@ -1237,7 +1237,7 @@ static void fd_writetrack_done( int status ) | |||
| 1237 | fd_error(); | 1237 | fd_error(); |
| 1238 | } | 1238 | } |
| 1239 | 1239 | ||
| 1240 | static void fd_times_out( unsigned long dummy ) | 1240 | static void fd_times_out(struct timer_list *unused) |
| 1241 | { | 1241 | { |
| 1242 | atari_disable_irq( IRQ_MFP_FDC ); | 1242 | atari_disable_irq( IRQ_MFP_FDC ); |
| 1243 | if (!FloppyIRQHandler) goto end; /* int occurred after timer was fired, but | 1243 | if (!FloppyIRQHandler) goto end; /* int occurred after timer was fired, but |
diff --git a/drivers/block/rsxx/cregs.c b/drivers/block/rsxx/cregs.c index 926dce9c452f..c148e83e4ed7 100644 --- a/drivers/block/rsxx/cregs.c +++ b/drivers/block/rsxx/cregs.c | |||
| @@ -203,9 +203,9 @@ static int creg_queue_cmd(struct rsxx_cardinfo *card, | |||
| 203 | return 0; | 203 | return 0; |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | static void creg_cmd_timed_out(unsigned long data) | 206 | static void creg_cmd_timed_out(struct timer_list *t) |
| 207 | { | 207 | { |
| 208 | struct rsxx_cardinfo *card = (struct rsxx_cardinfo *) data; | 208 | struct rsxx_cardinfo *card = from_timer(card, t, creg_ctrl.cmd_timer); |
| 209 | struct creg_cmd *cmd; | 209 | struct creg_cmd *cmd; |
| 210 | 210 | ||
| 211 | spin_lock(&card->creg_ctrl.lock); | 211 | spin_lock(&card->creg_ctrl.lock); |
| @@ -745,8 +745,7 @@ int rsxx_creg_setup(struct rsxx_cardinfo *card) | |||
| 745 | mutex_init(&card->creg_ctrl.reset_lock); | 745 | mutex_init(&card->creg_ctrl.reset_lock); |
| 746 | INIT_LIST_HEAD(&card->creg_ctrl.queue); | 746 | INIT_LIST_HEAD(&card->creg_ctrl.queue); |
| 747 | spin_lock_init(&card->creg_ctrl.lock); | 747 | spin_lock_init(&card->creg_ctrl.lock); |
| 748 | setup_timer(&card->creg_ctrl.cmd_timer, creg_cmd_timed_out, | 748 | timer_setup(&card->creg_ctrl.cmd_timer, creg_cmd_timed_out, 0); |
| 749 | (unsigned long) card); | ||
| 750 | 749 | ||
| 751 | return 0; | 750 | return 0; |
| 752 | } | 751 | } |
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/swim3.c b/drivers/block/swim3.c index e620e423102b..af51015d056e 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
| @@ -397,7 +397,7 @@ static void set_timeout(struct floppy_state *fs, int nticks, | |||
| 397 | if (fs->timeout_pending) | 397 | if (fs->timeout_pending) |
| 398 | del_timer(&fs->timeout); | 398 | del_timer(&fs->timeout); |
| 399 | fs->timeout.expires = jiffies + nticks; | 399 | fs->timeout.expires = jiffies + nticks; |
| 400 | fs->timeout.function = (TIMER_FUNC_TYPE)proc; | 400 | fs->timeout.function = proc; |
| 401 | add_timer(&fs->timeout); | 401 | add_timer(&fs->timeout); |
| 402 | fs->timeout_pending = 1; | 402 | fs->timeout_pending = 1; |
| 403 | } | 403 | } |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 0677d2514665..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,8 +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 | init_timer(&battery_timer); | 741 | timer_setup(&battery_timer, check_all_batteries, 0); |
| 742 | battery_timer.function = check_all_batteries; | ||
| 743 | battery_timer.expires = jiffies + (HZ * 60); | 742 | battery_timer.expires = jiffies + (HZ * 60); |
| 744 | add_timer(&battery_timer); | 743 | add_timer(&battery_timer); |
| 745 | } | 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/dtlk.c b/drivers/char/dtlk.c index 1a0385ed6417..839ee61d352a 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c | |||
| @@ -74,7 +74,7 @@ | |||
| 74 | #endif /* TRACING */ | 74 | #endif /* TRACING */ |
| 75 | 75 | ||
| 76 | static DEFINE_MUTEX(dtlk_mutex); | 76 | static DEFINE_MUTEX(dtlk_mutex); |
| 77 | static void dtlk_timer_tick(unsigned long data); | 77 | static void dtlk_timer_tick(struct timer_list *unused); |
| 78 | 78 | ||
| 79 | static int dtlk_major; | 79 | static int dtlk_major; |
| 80 | static int dtlk_port_lpc; | 80 | static int dtlk_port_lpc; |
| @@ -259,7 +259,7 @@ static unsigned int dtlk_poll(struct file *file, poll_table * wait) | |||
| 259 | return mask; | 259 | return mask; |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | static void dtlk_timer_tick(unsigned long data) | 262 | static void dtlk_timer_tick(struct timer_list *unused) |
| 263 | { | 263 | { |
| 264 | TRACE_TEXT(" dtlk_timer_tick"); | 264 | TRACE_TEXT(" dtlk_timer_tick"); |
| 265 | wake_up_interruptible(&dtlk_process_list); | 265 | wake_up_interruptible(&dtlk_process_list); |
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c index 5b8db2ed844d..7700280717f2 100644 --- a/drivers/char/hangcheck-timer.c +++ b/drivers/char/hangcheck-timer.c | |||
| @@ -122,11 +122,11 @@ __setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks); | |||
| 122 | /* Last time scheduled */ | 122 | /* Last time scheduled */ |
| 123 | static unsigned long long hangcheck_tsc, hangcheck_tsc_margin; | 123 | static unsigned long long hangcheck_tsc, hangcheck_tsc_margin; |
| 124 | 124 | ||
| 125 | static void hangcheck_fire(unsigned long); | 125 | static void hangcheck_fire(struct timer_list *); |
| 126 | 126 | ||
| 127 | static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire); | 127 | static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire); |
| 128 | 128 | ||
| 129 | static void hangcheck_fire(unsigned long data) | 129 | static void hangcheck_fire(struct timer_list *unused) |
| 130 | { | 130 | { |
| 131 | unsigned long long cur_tsc, tsc_diff; | 131 | unsigned long long cur_tsc, tsc_diff; |
| 132 | 132 | ||
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/nwbutton.c b/drivers/char/nwbutton.c index 44006ed9558f..a7113b78251a 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #define __NWBUTTON_C /* Tell the header file who we are */ | 23 | #define __NWBUTTON_C /* Tell the header file who we are */ |
| 24 | #include "nwbutton.h" | 24 | #include "nwbutton.h" |
| 25 | 25 | ||
| 26 | static void button_sequence_finished (unsigned long parameters); | 26 | static void button_sequence_finished(struct timer_list *unused); |
| 27 | 27 | ||
| 28 | static int button_press_count; /* The count of button presses */ | 28 | static int button_press_count; /* The count of button presses */ |
| 29 | /* Times for the end of a sequence */ | 29 | /* Times for the end of a sequence */ |
| @@ -127,7 +127,7 @@ static void button_consume_callbacks (int bpcount) | |||
| 127 | * any matching registered function callbacks, initiate reboot, etc.). | 127 | * any matching registered function callbacks, initiate reboot, etc.). |
| 128 | */ | 128 | */ |
| 129 | 129 | ||
| 130 | static void button_sequence_finished (unsigned long parameters) | 130 | static void button_sequence_finished(struct timer_list *unused) |
| 131 | { | 131 | { |
| 132 | if (IS_ENABLED(CONFIG_NWBUTTON_REBOOT) && | 132 | if (IS_ENABLED(CONFIG_NWBUTTON_REBOOT) && |
| 133 | button_press_count == reboot_count) | 133 | button_press_count == reboot_count) |
diff --git a/drivers/char/nwbutton.h b/drivers/char/nwbutton.h index abee3ca74801..9dedfd7adc0e 100644 --- a/drivers/char/nwbutton.h +++ b/drivers/char/nwbutton.h | |||
| @@ -25,7 +25,7 @@ struct button_callback { | |||
| 25 | 25 | ||
| 26 | /* Function prototypes: */ | 26 | /* Function prototypes: */ |
| 27 | 27 | ||
| 28 | static void button_sequence_finished (unsigned long parameters); | 28 | static void button_sequence_finished(struct timer_list *unused); |
| 29 | static irqreturn_t button_handler (int irq, void *dev_id); | 29 | static irqreturn_t button_handler (int irq, void *dev_id); |
| 30 | int button_init (void); | 30 | int button_init (void); |
| 31 | int button_add_callback (void (*callback) (void), int count); | 31 | int button_add_callback (void (*callback) (void), int count); |
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index 616871e68e09..5542a438bbd0 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
| @@ -135,7 +135,7 @@ static struct fasync_struct *rtc_async_queue; | |||
| 135 | static DECLARE_WAIT_QUEUE_HEAD(rtc_wait); | 135 | static DECLARE_WAIT_QUEUE_HEAD(rtc_wait); |
| 136 | 136 | ||
| 137 | #ifdef RTC_IRQ | 137 | #ifdef RTC_IRQ |
| 138 | static void rtc_dropped_irq(unsigned long data); | 138 | static void rtc_dropped_irq(struct timer_list *unused); |
| 139 | 139 | ||
| 140 | static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq); | 140 | static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq); |
| 141 | #endif | 141 | #endif |
| @@ -1171,7 +1171,7 @@ module_exit(rtc_exit); | |||
| 1171 | * for something that requires a steady > 1KHz signal anyways.) | 1171 | * for something that requires a steady > 1KHz signal anyways.) |
| 1172 | */ | 1172 | */ |
| 1173 | 1173 | ||
| 1174 | static void rtc_dropped_irq(unsigned long data) | 1174 | static void rtc_dropped_irq(struct timer_list *unused) |
| 1175 | { | 1175 | { |
| 1176 | unsigned long freq; | 1176 | unsigned long freq; |
| 1177 | 1177 | ||
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/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index 7c64a5c1bfc1..a31990408153 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c | |||
| @@ -177,7 +177,14 @@ out_fail: | |||
| 177 | return ret; | 177 | return ret; |
| 178 | } | 178 | } |
| 179 | 179 | ||
| 180 | void timer_of_exit(struct timer_of *to) | 180 | /** |
| 181 | * timer_of_cleanup - release timer_of ressources | ||
| 182 | * @to: timer_of structure | ||
| 183 | * | ||
| 184 | * Release the ressources that has been used in timer_of_init(). | ||
| 185 | * This function should be called in init error cases | ||
| 186 | */ | ||
| 187 | void __init timer_of_cleanup(struct timer_of *to) | ||
| 181 | { | 188 | { |
| 182 | if (to->flags & TIMER_OF_IRQ) | 189 | if (to->flags & TIMER_OF_IRQ) |
| 183 | timer_irq_exit(&to->of_irq); | 190 | timer_irq_exit(&to->of_irq); |
diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h index 43f5ba3f8979..3f708f1be43d 100644 --- a/drivers/clocksource/timer-of.h +++ b/drivers/clocksource/timer-of.h | |||
| @@ -68,6 +68,6 @@ static inline unsigned long timer_of_period(struct timer_of *to) | |||
| 68 | extern int __init timer_of_init(struct device_node *np, | 68 | extern int __init timer_of_init(struct device_node *np, |
| 69 | struct timer_of *to); | 69 | struct timer_of *to); |
| 70 | 70 | ||
| 71 | extern void timer_of_exit(struct timer_of *to); | 71 | extern void __init timer_of_cleanup(struct timer_of *to); |
| 72 | 72 | ||
| 73 | #endif | 73 | #endif |
diff --git a/drivers/firmware/psci_checker.c b/drivers/firmware/psci_checker.c index 56cf825ed779..f3f4f810e5df 100644 --- a/drivers/firmware/psci_checker.c +++ b/drivers/firmware/psci_checker.c | |||
| @@ -220,7 +220,7 @@ out_free_cpus: | |||
| 220 | return err; | 220 | return err; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | static void dummy_callback(unsigned long ignored) {} | 223 | static void dummy_callback(struct timer_list *unused) {} |
| 224 | 224 | ||
| 225 | static int suspend_cpu(int index, bool broadcast) | 225 | static int suspend_cpu(int index, bool broadcast) |
| 226 | { | 226 | { |
| @@ -287,7 +287,7 @@ static int suspend_test_thread(void *arg) | |||
| 287 | pr_info("CPU %d entering suspend cycles, states 1 through %d\n", | 287 | pr_info("CPU %d entering suspend cycles, states 1 through %d\n", |
| 288 | cpu, drv->state_count - 1); | 288 | cpu, drv->state_count - 1); |
| 289 | 289 | ||
| 290 | setup_timer_on_stack(&wakeup_timer, dummy_callback, 0); | 290 | timer_setup_on_stack(&wakeup_timer, dummy_callback, 0); |
| 291 | for (i = 0; i < NUM_SUSPEND_CYCLE; ++i) { | 291 | for (i = 0; i < NUM_SUSPEND_CYCLE; ++i) { |
| 292 | int index; | 292 | int index; |
| 293 | /* | 293 | /* |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index bd5b8065c32e..2fa95aef74d5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
| @@ -268,9 +268,10 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) | |||
| 268 | * | 268 | * |
| 269 | * Checks for fence activity. | 269 | * Checks for fence activity. |
| 270 | */ | 270 | */ |
| 271 | static void amdgpu_fence_fallback(unsigned long arg) | 271 | static void amdgpu_fence_fallback(struct timer_list *t) |
| 272 | { | 272 | { |
| 273 | struct amdgpu_ring *ring = (void *)arg; | 273 | struct amdgpu_ring *ring = from_timer(ring, t, |
| 274 | fence_drv.fallback_timer); | ||
| 274 | 275 | ||
| 275 | amdgpu_fence_process(ring); | 276 | amdgpu_fence_process(ring); |
| 276 | } | 277 | } |
| @@ -422,8 +423,7 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, | |||
| 422 | atomic_set(&ring->fence_drv.last_seq, 0); | 423 | atomic_set(&ring->fence_drv.last_seq, 0); |
| 423 | ring->fence_drv.initialized = false; | 424 | ring->fence_drv.initialized = false; |
| 424 | 425 | ||
| 425 | setup_timer(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback, | 426 | timer_setup(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback, 0); |
| 426 | (unsigned long)ring); | ||
| 427 | 427 | ||
| 428 | ring->fence_drv.num_fences_mask = num_hw_submission * 2 - 1; | 428 | ring->fence_drv.num_fences_mask = num_hw_submission * 2 - 1; |
| 429 | spin_lock_init(&ring->fence_drv.lock); | 429 | spin_lock_init(&ring->fence_drv.lock); |
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/i915/selftests/lib_sw_fence.c b/drivers/gpu/drm/i915/selftests/lib_sw_fence.c index 3790fdf44a1a..b26f07b55d86 100644 --- a/drivers/gpu/drm/i915/selftests/lib_sw_fence.c +++ b/drivers/gpu/drm/i915/selftests/lib_sw_fence.c | |||
| @@ -49,9 +49,9 @@ void onstack_fence_fini(struct i915_sw_fence *fence) | |||
| 49 | i915_sw_fence_fini(fence); | 49 | i915_sw_fence_fini(fence); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | static void timed_fence_wake(unsigned long data) | 52 | static void timed_fence_wake(struct timer_list *t) |
| 53 | { | 53 | { |
| 54 | struct timed_fence *tf = (struct timed_fence *)data; | 54 | struct timed_fence *tf = from_timer(tf, t, timer); |
| 55 | 55 | ||
| 56 | i915_sw_fence_commit(&tf->fence); | 56 | i915_sw_fence_commit(&tf->fence); |
| 57 | } | 57 | } |
| @@ -60,7 +60,7 @@ void timed_fence_init(struct timed_fence *tf, unsigned long expires) | |||
| 60 | { | 60 | { |
| 61 | onstack_fence_init(&tf->fence); | 61 | onstack_fence_init(&tf->fence); |
| 62 | 62 | ||
| 63 | setup_timer_on_stack(&tf->timer, timed_fence_wake, (unsigned long)tf); | 63 | timer_setup_on_stack(&tf->timer, timed_fence_wake, 0); |
| 64 | 64 | ||
| 65 | if (time_after(expires, jiffies)) | 65 | if (time_after(expires, jiffies)) |
| 66 | mod_timer(&tf->timer, expires); | 66 | mod_timer(&tf->timer, expires); |
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 b56a05730314..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,9 +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 | init_timer(&dsi->te_timer); | 5452 | timer_setup(&dsi->te_timer, dsi_te_timeout, 0); |
| 5453 | dsi->te_timer.function = dsi_te_timeout; | ||
| 5454 | dsi->te_timer.data = 0; | ||
| 5455 | #endif | 5453 | #endif |
| 5456 | 5454 | ||
| 5457 | 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/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 98a6cb9f44fc..4ae45d7dac42 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c | |||
| @@ -674,10 +674,9 @@ void vc4_bo_dec_usecnt(struct vc4_bo *bo) | |||
| 674 | mutex_unlock(&bo->madv_lock); | 674 | mutex_unlock(&bo->madv_lock); |
| 675 | } | 675 | } |
| 676 | 676 | ||
| 677 | static void vc4_bo_cache_time_timer(unsigned long data) | 677 | static void vc4_bo_cache_time_timer(struct timer_list *t) |
| 678 | { | 678 | { |
| 679 | struct drm_device *dev = (struct drm_device *)data; | 679 | struct vc4_dev *vc4 = from_timer(vc4, t, bo_cache.time_timer); |
| 680 | struct vc4_dev *vc4 = to_vc4_dev(dev); | ||
| 681 | 680 | ||
| 682 | schedule_work(&vc4->bo_cache.time_work); | 681 | schedule_work(&vc4->bo_cache.time_work); |
| 683 | } | 682 | } |
| @@ -1039,9 +1038,7 @@ int vc4_bo_cache_init(struct drm_device *dev) | |||
| 1039 | INIT_LIST_HEAD(&vc4->bo_cache.time_list); | 1038 | INIT_LIST_HEAD(&vc4->bo_cache.time_list); |
| 1040 | 1039 | ||
| 1041 | INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work); | 1040 | INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work); |
| 1042 | setup_timer(&vc4->bo_cache.time_timer, | 1041 | timer_setup(&vc4->bo_cache.time_timer, vc4_bo_cache_time_timer, 0); |
| 1043 | vc4_bo_cache_time_timer, | ||
| 1044 | (unsigned long)dev); | ||
| 1045 | 1042 | ||
| 1046 | return 0; | 1043 | return 0; |
| 1047 | } | 1044 | } |
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c index e00ac2f3a264..6c32c89a83a9 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c | |||
| @@ -312,10 +312,10 @@ vc4_reset_work(struct work_struct *work) | |||
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | static void | 314 | static void |
| 315 | vc4_hangcheck_elapsed(unsigned long data) | 315 | vc4_hangcheck_elapsed(struct timer_list *t) |
| 316 | { | 316 | { |
| 317 | struct drm_device *dev = (struct drm_device *)data; | 317 | struct vc4_dev *vc4 = from_timer(vc4, t, hangcheck.timer); |
| 318 | struct vc4_dev *vc4 = to_vc4_dev(dev); | 318 | struct drm_device *dev = vc4->dev; |
| 319 | uint32_t ct0ca, ct1ca; | 319 | uint32_t ct0ca, ct1ca; |
| 320 | unsigned long irqflags; | 320 | unsigned long irqflags; |
| 321 | struct vc4_exec_info *bin_exec, *render_exec; | 321 | struct vc4_exec_info *bin_exec, *render_exec; |
| @@ -1154,9 +1154,7 @@ vc4_gem_init(struct drm_device *dev) | |||
| 1154 | spin_lock_init(&vc4->job_lock); | 1154 | spin_lock_init(&vc4->job_lock); |
| 1155 | 1155 | ||
| 1156 | INIT_WORK(&vc4->hangcheck.reset_work, vc4_reset_work); | 1156 | INIT_WORK(&vc4->hangcheck.reset_work, vc4_reset_work); |
| 1157 | setup_timer(&vc4->hangcheck.timer, | 1157 | timer_setup(&vc4->hangcheck.timer, vc4_hangcheck_elapsed, 0); |
| 1158 | vc4_hangcheck_elapsed, | ||
| 1159 | (unsigned long)dev); | ||
| 1160 | 1158 | ||
| 1161 | INIT_WORK(&vc4->job_done_work, vc4_job_done_work); | 1159 | INIT_WORK(&vc4->job_done_work, vc4_job_done_work); |
| 1162 | 1160 | ||
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/infiniband/hw/mthca/mthca_catas.c b/drivers/infiniband/hw/mthca/mthca_catas.c index f6474c24f193..ffb98eaaf1c2 100644 --- a/drivers/infiniband/hw/mthca/mthca_catas.c +++ b/drivers/infiniband/hw/mthca/mthca_catas.c | |||
| @@ -130,9 +130,9 @@ static void handle_catas(struct mthca_dev *dev) | |||
| 130 | spin_unlock_irqrestore(&catas_lock, flags); | 130 | spin_unlock_irqrestore(&catas_lock, flags); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | static void poll_catas(unsigned long dev_ptr) | 133 | static void poll_catas(struct timer_list *t) |
| 134 | { | 134 | { |
| 135 | struct mthca_dev *dev = (struct mthca_dev *) dev_ptr; | 135 | struct mthca_dev *dev = from_timer(dev, t, catas_err.timer); |
| 136 | int i; | 136 | int i; |
| 137 | 137 | ||
| 138 | for (i = 0; i < dev->catas_err.size; ++i) | 138 | for (i = 0; i < dev->catas_err.size; ++i) |
| @@ -149,7 +149,7 @@ void mthca_start_catas_poll(struct mthca_dev *dev) | |||
| 149 | { | 149 | { |
| 150 | phys_addr_t addr; | 150 | phys_addr_t addr; |
| 151 | 151 | ||
| 152 | init_timer(&dev->catas_err.timer); | 152 | timer_setup(&dev->catas_err.timer, poll_catas, 0); |
| 153 | dev->catas_err.map = NULL; | 153 | dev->catas_err.map = NULL; |
| 154 | 154 | ||
| 155 | addr = pci_resource_start(dev->pdev, 0) + | 155 | addr = pci_resource_start(dev->pdev, 0) + |
| @@ -164,8 +164,6 @@ void mthca_start_catas_poll(struct mthca_dev *dev) | |||
| 164 | return; | 164 | return; |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | dev->catas_err.timer.data = (unsigned long) dev; | ||
| 168 | dev->catas_err.timer.function = poll_catas; | ||
| 169 | dev->catas_err.timer.expires = jiffies + MTHCA_CATAS_POLL_INTERVAL; | 167 | dev->catas_err.timer.expires = jiffies + MTHCA_CATAS_POLL_INTERVAL; |
| 170 | INIT_LIST_HEAD(&dev->catas_err.list); | 168 | INIT_LIST_HEAD(&dev->catas_err.list); |
| 171 | add_timer(&dev->catas_err.timer); | 169 | add_timer(&dev->catas_err.timer); |
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index db46b7b53fb4..162475aeeedd 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c | |||
| @@ -3819,7 +3819,7 @@ void nes_port_ibevent(struct nes_vnic *nesvnic) | |||
| 3819 | if (!nesvnic->event_timer.function) { | 3819 | if (!nesvnic->event_timer.function) { |
| 3820 | ib_dispatch_event(&event); | 3820 | ib_dispatch_event(&event); |
| 3821 | nesvnic->last_dispatched_event = event.event; | 3821 | nesvnic->last_dispatched_event = event.event; |
| 3822 | nesvnic->event_timer.function = (TIMER_FUNC_TYPE)nes_handle_delayed_event; | 3822 | nesvnic->event_timer.function = nes_handle_delayed_event; |
| 3823 | nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY; | 3823 | nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY; |
| 3824 | add_timer(&nesvnic->event_timer); | 3824 | add_timer(&nesvnic->event_timer); |
| 3825 | } else { | 3825 | } else { |
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/input.c b/drivers/input/input.c index 44916ef4a424..e30642db50d5 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
| @@ -2047,7 +2047,7 @@ static void devm_input_device_unregister(struct device *dev, void *res) | |||
| 2047 | */ | 2047 | */ |
| 2048 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period) | 2048 | void input_enable_softrepeat(struct input_dev *dev, int delay, int period) |
| 2049 | { | 2049 | { |
| 2050 | dev->timer.function = (TIMER_FUNC_TYPE)input_repeat_key; | 2050 | dev->timer.function = input_repeat_key; |
| 2051 | dev->rep[REP_DELAY] = delay; | 2051 | dev->rep[REP_DELAY] = delay; |
| 2052 | dev->rep[REP_PERIOD] = period; | 2052 | dev->rep[REP_PERIOD] = period; |
| 2053 | } | 2053 | } |
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/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index d3265b6b58b8..1173890f6719 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c | |||
| @@ -102,7 +102,7 @@ static inline bool get_down(unsigned long data0, unsigned long data1) | |||
| 102 | !(data1 & S3C2410_ADCDAT0_UPDOWN)); | 102 | !(data1 & S3C2410_ADCDAT0_UPDOWN)); |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | static void touch_timer_fire(unsigned long data) | 105 | static void touch_timer_fire(struct timer_list *unused) |
| 106 | { | 106 | { |
| 107 | unsigned long data0; | 107 | unsigned long data0; |
| 108 | unsigned long data1; | 108 | unsigned long data1; |
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..34c93874af23 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c | |||
| @@ -301,8 +301,9 @@ reset_hfcpci(struct hfc_pci *hc) | |||
| 301 | * Timer function called when kernel timer expires | 301 | * Timer function called when kernel timer expires |
| 302 | */ | 302 | */ |
| 303 | static void | 303 | static void |
| 304 | hfcpci_Timer(struct hfc_pci *hc) | 304 | hfcpci_Timer(struct timer_list *t) |
| 305 | { | 305 | { |
| 306 | struct hfc_pci *hc = from_timer(hc, t, hw.timer); | ||
| 306 | hc->hw.timer.expires = jiffies + 75; | 307 | hc->hw.timer.expires = jiffies + 75; |
| 307 | /* WD RESET */ | 308 | /* WD RESET */ |
| 308 | /* | 309 | /* |
| @@ -1241,7 +1242,7 @@ hfcpci_int(int intno, void *dev_id) | |||
| 1241 | * timer callback for D-chan busy resolution. Currently no function | 1242 | * timer callback for D-chan busy resolution. Currently no function |
| 1242 | */ | 1243 | */ |
| 1243 | static void | 1244 | static void |
| 1244 | hfcpci_dbusy_timer(struct hfc_pci *hc) | 1245 | hfcpci_dbusy_timer(struct timer_list *t) |
| 1245 | { | 1246 | { |
| 1246 | } | 1247 | } |
| 1247 | 1248 | ||
| @@ -1717,8 +1718,7 @@ static void | |||
| 1717 | inithfcpci(struct hfc_pci *hc) | 1718 | inithfcpci(struct hfc_pci *hc) |
| 1718 | { | 1719 | { |
| 1719 | printk(KERN_DEBUG "inithfcpci: entered\n"); | 1720 | printk(KERN_DEBUG "inithfcpci: entered\n"); |
| 1720 | setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer, | 1721 | timer_setup(&hc->dch.timer, hfcpci_dbusy_timer, 0); |
| 1721 | (long)&hc->dch); | ||
| 1722 | hc->chanlimit = 2; | 1722 | hc->chanlimit = 2; |
| 1723 | mode_hfcpci(&hc->bch[0], 1, -1); | 1723 | mode_hfcpci(&hc->bch[0], 1, -1); |
| 1724 | mode_hfcpci(&hc->bch[1], 2, -1); | 1724 | mode_hfcpci(&hc->bch[1], 2, -1); |
| @@ -2043,7 +2043,7 @@ setup_hw(struct hfc_pci *hc) | |||
| 2043 | Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); | 2043 | Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); |
| 2044 | /* At this point the needed PCI config is done */ | 2044 | /* At this point the needed PCI config is done */ |
| 2045 | /* fifos are still not enabled */ | 2045 | /* fifos are still not enabled */ |
| 2046 | setup_timer(&hc->hw.timer, (void *)hfcpci_Timer, (long)hc); | 2046 | timer_setup(&hc->hw.timer, hfcpci_Timer, 0); |
| 2047 | /* default PCM master */ | 2047 | /* default PCM master */ |
| 2048 | test_and_set_bit(HFC_CFG_MASTER, &hc->cfg); | 2048 | test_and_set_bit(HFC_CFG_MASTER, &hc->cfg); |
| 2049 | return 0; | 2049 | return 0; |
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 38a5bb764c7b..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,8 +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 | init_timer(&dev->timer); | 2297 | timer_setup(&dev->timer, isdn_timer_funct, 0); |
| 2298 | dev->timer.function = isdn_timer_funct; | ||
| 2299 | spin_lock_init(&dev->lock); | 2298 | spin_lock_init(&dev->lock); |
| 2300 | spin_lock_init(&dev->timerlock); | 2299 | spin_lock_init(&dev->timerlock); |
| 2301 | #ifdef MODULE | 2300 | #ifdef MODULE |
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index f63a110b7bcb..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 | init_timer(&lp->cisco_timer); | 1618 | timer_setup(&lp->cisco_timer, |
| 1619 | lp->cisco_timer.data = (unsigned long) lp; | 1619 | isdn_net_ciscohdlck_slarp_send_keepalive, 0); |
| 1620 | lp->cisco_timer.function = isdn_net_ciscohdlck_slarp_send_keepalive; | ||
| 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/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index ce90213a42fa..76516ee84e9a 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c | |||
| @@ -270,9 +270,9 @@ static void pblk_write_kick(struct pblk *pblk) | |||
| 270 | mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(1000)); | 270 | mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(1000)); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | void pblk_write_timer_fn(unsigned long data) | 273 | void pblk_write_timer_fn(struct timer_list *t) |
| 274 | { | 274 | { |
| 275 | struct pblk *pblk = (struct pblk *)data; | 275 | struct pblk *pblk = from_timer(pblk, t, wtimer); |
| 276 | 276 | ||
| 277 | /* kick the write thread every tick to flush outstanding data */ | 277 | /* kick the write thread every tick to flush outstanding data */ |
| 278 | pblk_write_kick(pblk); | 278 | pblk_write_kick(pblk); |
diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c index 00d5698d64a9..9c8e114c8a54 100644 --- a/drivers/lightnvm/pblk-gc.c +++ b/drivers/lightnvm/pblk-gc.c | |||
| @@ -442,9 +442,9 @@ next_gc_group: | |||
| 442 | goto next_gc_group; | 442 | goto next_gc_group; |
| 443 | } | 443 | } |
| 444 | 444 | ||
| 445 | static void pblk_gc_timer(unsigned long data) | 445 | static void pblk_gc_timer(struct timer_list *t) |
| 446 | { | 446 | { |
| 447 | struct pblk *pblk = (struct pblk *)data; | 447 | struct pblk *pblk = from_timer(pblk, t, gc.gc_timer); |
| 448 | 448 | ||
| 449 | pblk_gc_kick(pblk); | 449 | pblk_gc_kick(pblk); |
| 450 | } | 450 | } |
| @@ -601,7 +601,7 @@ int pblk_gc_init(struct pblk *pblk) | |||
| 601 | goto fail_free_writer_kthread; | 601 | goto fail_free_writer_kthread; |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | setup_timer(&gc->gc_timer, pblk_gc_timer, (unsigned long)pblk); | 604 | timer_setup(&gc->gc_timer, pblk_gc_timer, 0); |
| 605 | mod_timer(&gc->gc_timer, jiffies + msecs_to_jiffies(GC_TIME_MSECS)); | 605 | mod_timer(&gc->gc_timer, jiffies + msecs_to_jiffies(GC_TIME_MSECS)); |
| 606 | 606 | ||
| 607 | gc->gc_active = 0; | 607 | gc->gc_active = 0; |
diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index f62112ba5482..695826a06b5d 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c | |||
| @@ -866,7 +866,7 @@ fail: | |||
| 866 | 866 | ||
| 867 | static int pblk_writer_init(struct pblk *pblk) | 867 | static int pblk_writer_init(struct pblk *pblk) |
| 868 | { | 868 | { |
| 869 | setup_timer(&pblk->wtimer, pblk_write_timer_fn, (unsigned long)pblk); | 869 | timer_setup(&pblk->wtimer, pblk_write_timer_fn, 0); |
| 870 | mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(100)); | 870 | mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(100)); |
| 871 | 871 | ||
| 872 | pblk->writer_ts = kthread_create(pblk_write_ts, pblk, "pblk-writer-t"); | 872 | pblk->writer_ts = kthread_create(pblk_write_ts, pblk, "pblk-writer-t"); |
diff --git a/drivers/lightnvm/pblk-rl.c b/drivers/lightnvm/pblk-rl.c index abae31fd434e..dacc71922260 100644 --- a/drivers/lightnvm/pblk-rl.c +++ b/drivers/lightnvm/pblk-rl.c | |||
| @@ -158,9 +158,9 @@ int pblk_rl_max_io(struct pblk_rl *rl) | |||
| 158 | return rl->rb_max_io; | 158 | return rl->rb_max_io; |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | static void pblk_rl_u_timer(unsigned long data) | 161 | static void pblk_rl_u_timer(struct timer_list *t) |
| 162 | { | 162 | { |
| 163 | struct pblk_rl *rl = (struct pblk_rl *)data; | 163 | struct pblk_rl *rl = from_timer(rl, t, u_timer); |
| 164 | 164 | ||
| 165 | /* Release user I/O state. Protect from GC */ | 165 | /* Release user I/O state. Protect from GC */ |
| 166 | smp_store_release(&rl->rb_user_active, 0); | 166 | smp_store_release(&rl->rb_user_active, 0); |
| @@ -202,7 +202,7 @@ void pblk_rl_init(struct pblk_rl *rl, int budget) | |||
| 202 | atomic_set(&rl->rb_gc_cnt, 0); | 202 | atomic_set(&rl->rb_gc_cnt, 0); |
| 203 | atomic_set(&rl->rb_space, -1); | 203 | atomic_set(&rl->rb_space, -1); |
| 204 | 204 | ||
| 205 | setup_timer(&rl->u_timer, pblk_rl_u_timer, (unsigned long)rl); | 205 | timer_setup(&rl->u_timer, pblk_rl_u_timer, 0); |
| 206 | 206 | ||
| 207 | rl->rb_user_active = 0; | 207 | rl->rb_user_active = 0; |
| 208 | rl->rb_gc_active = 0; | 208 | rl->rb_gc_active = 0; |
diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index 90961033a79f..59a64d461a5d 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h | |||
| @@ -797,7 +797,7 @@ void pblk_map_rq(struct pblk *pblk, struct nvm_rq *rqd, unsigned int sentry, | |||
| 797 | * pblk write thread | 797 | * pblk write thread |
| 798 | */ | 798 | */ |
| 799 | int pblk_write_ts(void *data); | 799 | int pblk_write_ts(void *data); |
| 800 | void pblk_write_timer_fn(unsigned long data); | 800 | void pblk_write_timer_fn(struct timer_list *t); |
| 801 | void pblk_write_should_kick(struct pblk *pblk); | 801 | void pblk_write_should_kick(struct pblk *pblk); |
| 802 | 802 | ||
| 803 | /* | 803 | /* |
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 267f01ae87e4..0993c14be860 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c | |||
| @@ -267,9 +267,9 @@ static void rrpc_gc_kick(struct rrpc *rrpc) | |||
| 267 | /* | 267 | /* |
| 268 | * timed GC every interval. | 268 | * timed GC every interval. |
| 269 | */ | 269 | */ |
| 270 | static void rrpc_gc_timer(unsigned long data) | 270 | static void rrpc_gc_timer(struct timer_list *t) |
| 271 | { | 271 | { |
| 272 | struct rrpc *rrpc = (struct rrpc *)data; | 272 | struct rrpc *rrpc = from_timer(rrpc, t, gc_timer); |
| 273 | 273 | ||
| 274 | rrpc_gc_kick(rrpc); | 274 | rrpc_gc_kick(rrpc); |
| 275 | mod_timer(&rrpc->gc_timer, jiffies + msecs_to_jiffies(10)); | 275 | mod_timer(&rrpc->gc_timer, jiffies + msecs_to_jiffies(10)); |
| @@ -1063,7 +1063,7 @@ static int rrpc_gc_init(struct rrpc *rrpc) | |||
| 1063 | if (!rrpc->kgc_wq) | 1063 | if (!rrpc->kgc_wq) |
| 1064 | return -ENOMEM; | 1064 | return -ENOMEM; |
| 1065 | 1065 | ||
| 1066 | setup_timer(&rrpc->gc_timer, rrpc_gc_timer, (unsigned long)rrpc); | 1066 | timer_setup(&rrpc->gc_timer, rrpc_gc_timer, 0); |
| 1067 | 1067 | ||
| 1068 | return 0; | 1068 | return 0; |
| 1069 | } | 1069 | } |
diff --git a/drivers/media/common/saa7146/saa7146_vbi.c b/drivers/media/common/saa7146/saa7146_vbi.c index ce8d78c137f0..e1d369b976ed 100644 --- a/drivers/media/common/saa7146/saa7146_vbi.c +++ b/drivers/media/common/saa7146/saa7146_vbi.c | |||
| @@ -402,7 +402,7 @@ static int vbi_open(struct saa7146_dev *dev, struct file *file) | |||
| 402 | sizeof(struct saa7146_buf), | 402 | sizeof(struct saa7146_buf), |
| 403 | file, &dev->v4l2_lock); | 403 | file, &dev->v4l2_lock); |
| 404 | 404 | ||
| 405 | vv->vbi_read_timeout.function = (TIMER_FUNC_TYPE)vbi_read_timeout; | 405 | vv->vbi_read_timeout.function = vbi_read_timeout; |
| 406 | vv->vbi_read_timeout_file = file; | 406 | vv->vbi_read_timeout_file = file; |
| 407 | 407 | ||
| 408 | /* initialize the brs */ | 408 | /* initialize the brs */ |
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index fb43025df573..dba21215dc84 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c | |||
| @@ -339,9 +339,9 @@ static int restart_video_queue(struct viu_dmaqueue *vidq) | |||
| 339 | } | 339 | } |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | static void viu_vid_timeout(unsigned long data) | 342 | static void viu_vid_timeout(struct timer_list *t) |
| 343 | { | 343 | { |
| 344 | struct viu_dev *dev = (struct viu_dev *)data; | 344 | struct viu_dev *dev = from_timer(dev, t, vidq.timeout); |
| 345 | struct viu_buf *buf; | 345 | struct viu_buf *buf; |
| 346 | struct viu_dmaqueue *vidq = &dev->vidq; | 346 | struct viu_dmaqueue *vidq = &dev->vidq; |
| 347 | 347 | ||
| @@ -1466,8 +1466,7 @@ static int viu_of_probe(struct platform_device *op) | |||
| 1466 | viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad, | 1466 | viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad, |
| 1467 | "saa7113", VIU_VIDEO_DECODER_ADDR, NULL); | 1467 | "saa7113", VIU_VIDEO_DECODER_ADDR, NULL); |
| 1468 | 1468 | ||
| 1469 | setup_timer(&viu_dev->vidq.timeout, viu_vid_timeout, | 1469 | timer_setup(&viu_dev->vidq.timeout, viu_vid_timeout, 0); |
| 1470 | (unsigned long)viu_dev); | ||
| 1471 | viu_dev->std = V4L2_STD_NTSC_M; | 1470 | viu_dev->std = V4L2_STD_NTSC_M; |
| 1472 | viu_dev->first = 1; | 1471 | viu_dev->first = 1; |
| 1473 | 1472 | ||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 1839a86cc2a5..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,9 +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 | init_timer(&dev->watchdog_timer); | 1317 | timer_setup(&dev->watchdog_timer, s5p_mfc_watchdog, 0); |
| 1318 | dev->watchdog_timer.data = (unsigned long)dev; | ||
| 1319 | dev->watchdog_timer.function = s5p_mfc_watchdog; | ||
| 1320 | 1318 | ||
| 1321 | ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); | 1319 | ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); |
| 1322 | 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 34dc7e062471..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,9 +648,7 @@ int au0828_dvb_register(struct au0828_dev *dev) | |||
| 648 | return ret; | 648 | return ret; |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | dev->bulk_timeout.function = au0828_bulk_timeout; | 651 | timer_setup(&dev->bulk_timeout, au0828_bulk_timeout, 0); |
| 652 | dev->bulk_timeout.data = (unsigned long) dev; | ||
| 653 | init_timer(&dev->bulk_timeout); | ||
| 654 | 652 | ||
| 655 | return 0; | 653 | return 0; |
| 656 | } | 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/cris/eth_v10.c b/drivers/net/cris/eth_v10.c index b6e2bfd7d2d6..8b1a859f5140 100644 --- a/drivers/net/cris/eth_v10.c +++ b/drivers/net/cris/eth_v10.c | |||
| @@ -165,9 +165,16 @@ static unsigned int network_rec_config_shadow = 0; | |||
| 165 | 165 | ||
| 166 | static unsigned int network_tr_ctrl_shadow = 0; | 166 | static unsigned int network_tr_ctrl_shadow = 0; |
| 167 | 167 | ||
| 168 | /* Timers */ | ||
| 169 | static void e100_check_speed(struct timer_list *unused); | ||
| 170 | static void e100_clear_network_leds(struct timer_list *unused); | ||
| 171 | static void e100_check_duplex(struct timer_list *unused); | ||
| 172 | static DEFINE_TIMER(speed_timer, e100_check_speed); | ||
| 173 | static DEFINE_TIMER(clear_led_timer, e100_clear_network_leds); | ||
| 174 | static DEFINE_TIMER(duplex_timer, e100_check_duplex); | ||
| 175 | static struct net_device *timer_dev; | ||
| 176 | |||
| 168 | /* Network speed indication. */ | 177 | /* Network speed indication. */ |
| 169 | static DEFINE_TIMER(speed_timer, NULL); | ||
| 170 | static DEFINE_TIMER(clear_led_timer, NULL); | ||
| 171 | static int current_speed; /* Speed read from transceiver */ | 178 | static int current_speed; /* Speed read from transceiver */ |
| 172 | static int current_speed_selection; /* Speed selected by user */ | 179 | static int current_speed_selection; /* Speed selected by user */ |
| 173 | static unsigned long led_next_time; | 180 | static unsigned long led_next_time; |
| @@ -175,7 +182,6 @@ static int led_active; | |||
| 175 | static int rx_queue_len; | 182 | static int rx_queue_len; |
| 176 | 183 | ||
| 177 | /* Duplex */ | 184 | /* Duplex */ |
| 178 | static DEFINE_TIMER(duplex_timer, NULL); | ||
| 179 | static int full_duplex; | 185 | static int full_duplex; |
| 180 | static enum duplex current_duplex; | 186 | static enum duplex current_duplex; |
| 181 | 187 | ||
| @@ -200,9 +206,7 @@ static void update_rx_stats(struct net_device_stats *); | |||
| 200 | static void update_tx_stats(struct net_device_stats *); | 206 | static void update_tx_stats(struct net_device_stats *); |
| 201 | static int e100_probe_transceiver(struct net_device* dev); | 207 | static int e100_probe_transceiver(struct net_device* dev); |
| 202 | 208 | ||
| 203 | static void e100_check_speed(unsigned long priv); | ||
| 204 | static void e100_set_speed(struct net_device* dev, unsigned long speed); | 209 | static void e100_set_speed(struct net_device* dev, unsigned long speed); |
| 205 | static void e100_check_duplex(unsigned long priv); | ||
| 206 | static void e100_set_duplex(struct net_device* dev, enum duplex); | 210 | static void e100_set_duplex(struct net_device* dev, enum duplex); |
| 207 | static void e100_negotiate(struct net_device* dev); | 211 | static void e100_negotiate(struct net_device* dev); |
| 208 | 212 | ||
| @@ -214,7 +218,6 @@ static void e100_send_mdio_bit(unsigned char bit); | |||
| 214 | static unsigned char e100_receive_mdio_bit(void); | 218 | static unsigned char e100_receive_mdio_bit(void); |
| 215 | static void e100_reset_transceiver(struct net_device* net); | 219 | static void e100_reset_transceiver(struct net_device* net); |
| 216 | 220 | ||
| 217 | static void e100_clear_network_leds(unsigned long dummy); | ||
| 218 | static void e100_set_network_leds(int active); | 221 | static void e100_set_network_leds(int active); |
| 219 | 222 | ||
| 220 | static const struct ethtool_ops e100_ethtool_ops; | 223 | static const struct ethtool_ops e100_ethtool_ops; |
| @@ -381,17 +384,12 @@ etrax_ethernet_init(void) | |||
| 381 | current_speed = 10; | 384 | current_speed = 10; |
| 382 | current_speed_selection = 0; /* Auto */ | 385 | current_speed_selection = 0; /* Auto */ |
| 383 | speed_timer.expires = jiffies + NET_LINK_UP_CHECK_INTERVAL; | 386 | speed_timer.expires = jiffies + NET_LINK_UP_CHECK_INTERVAL; |
| 384 | speed_timer.data = (unsigned long)dev; | ||
| 385 | speed_timer.function = e100_check_speed; | ||
| 386 | |||
| 387 | clear_led_timer.function = e100_clear_network_leds; | ||
| 388 | clear_led_timer.data = (unsigned long)dev; | ||
| 389 | 387 | ||
| 390 | full_duplex = 0; | 388 | full_duplex = 0; |
| 391 | current_duplex = autoneg; | 389 | current_duplex = autoneg; |
| 392 | duplex_timer.expires = jiffies + NET_DUPLEX_CHECK_INTERVAL; | 390 | duplex_timer.expires = jiffies + NET_DUPLEX_CHECK_INTERVAL; |
| 393 | duplex_timer.data = (unsigned long)dev; | 391 | |
| 394 | duplex_timer.function = e100_check_duplex; | 392 | timer_dev = dev; |
| 395 | 393 | ||
| 396 | /* Initialize mii interface */ | 394 | /* Initialize mii interface */ |
| 397 | np->mii_if.phy_id_mask = 0x1f; | 395 | np->mii_if.phy_id_mask = 0x1f; |
| @@ -680,9 +678,9 @@ intel_check_speed(struct net_device* dev) | |||
| 680 | } | 678 | } |
| 681 | #endif | 679 | #endif |
| 682 | static void | 680 | static void |
| 683 | e100_check_speed(unsigned long priv) | 681 | e100_check_speed(struct timer_list *unused) |
| 684 | { | 682 | { |
| 685 | struct net_device* dev = (struct net_device*)priv; | 683 | struct net_device* dev = timer_dev; |
| 686 | struct net_local *np = netdev_priv(dev); | 684 | struct net_local *np = netdev_priv(dev); |
| 687 | static int led_initiated = 0; | 685 | static int led_initiated = 0; |
| 688 | unsigned long data; | 686 | unsigned long data; |
| @@ -799,9 +797,9 @@ e100_set_speed(struct net_device* dev, unsigned long speed) | |||
| 799 | } | 797 | } |
| 800 | 798 | ||
| 801 | static void | 799 | static void |
| 802 | e100_check_duplex(unsigned long priv) | 800 | e100_check_duplex(struct timer_list *unused) |
| 803 | { | 801 | { |
| 804 | struct net_device *dev = (struct net_device *)priv; | 802 | struct net_device *dev = timer_dev; |
| 805 | struct net_local *np = netdev_priv(dev); | 803 | struct net_local *np = netdev_priv(dev); |
| 806 | int old_duplex; | 804 | int old_duplex; |
| 807 | 805 | ||
| @@ -1669,9 +1667,9 @@ e100_hardware_send_packet(struct net_local *np, char *buf, int length) | |||
| 1669 | } | 1667 | } |
| 1670 | 1668 | ||
| 1671 | static void | 1669 | static void |
| 1672 | e100_clear_network_leds(unsigned long dummy) | 1670 | e100_clear_network_leds(struct timer_list *unused) |
| 1673 | { | 1671 | { |
| 1674 | struct net_device *dev = (struct net_device *)dummy; | 1672 | struct net_device *dev = timer_dev; |
| 1675 | struct net_local *np = netdev_priv(dev); | 1673 | struct net_local *np = netdev_priv(dev); |
| 1676 | 1674 | ||
| 1677 | spin_lock(&np->led_lock); | 1675 | spin_lock(&np->led_lock); |
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_clsf.c b/drivers/net/ethernet/cisco/enic/enic_clsf.c index 8dc21c9f9716..973c1fb70d09 100644 --- a/drivers/net/ethernet/cisco/enic/enic_clsf.c +++ b/drivers/net/ethernet/cisco/enic/enic_clsf.c | |||
| @@ -123,9 +123,9 @@ struct enic_rfs_fltr_node *htbl_fltr_search(struct enic *enic, u16 fltr_id) | |||
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | #ifdef CONFIG_RFS_ACCEL | 125 | #ifdef CONFIG_RFS_ACCEL |
| 126 | void enic_flow_may_expire(unsigned long data) | 126 | void enic_flow_may_expire(struct timer_list *t) |
| 127 | { | 127 | { |
| 128 | struct enic *enic = (struct enic *)data; | 128 | struct enic *enic = from_timer(enic, t, rfs_h.rfs_may_expire); |
| 129 | bool res; | 129 | bool res; |
| 130 | int j; | 130 | int j; |
| 131 | 131 | ||
diff --git a/drivers/net/ethernet/cisco/enic/enic_clsf.h b/drivers/net/ethernet/cisco/enic/enic_clsf.h index 0ae83e091a62..8c4ce50da6e1 100644 --- a/drivers/net/ethernet/cisco/enic/enic_clsf.h +++ b/drivers/net/ethernet/cisco/enic/enic_clsf.h | |||
| @@ -16,12 +16,11 @@ struct enic_rfs_fltr_node *htbl_fltr_search(struct enic *enic, u16 fltr_id); | |||
| 16 | #ifdef CONFIG_RFS_ACCEL | 16 | #ifdef CONFIG_RFS_ACCEL |
| 17 | int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb, | 17 | int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb, |
| 18 | u16 rxq_index, u32 flow_id); | 18 | u16 rxq_index, u32 flow_id); |
| 19 | void enic_flow_may_expire(unsigned long data); | 19 | void enic_flow_may_expire(struct timer_list *t); |
| 20 | 20 | ||
| 21 | static inline void enic_rfs_timer_start(struct enic *enic) | 21 | static inline void enic_rfs_timer_start(struct enic *enic) |
| 22 | { | 22 | { |
| 23 | setup_timer(&enic->rfs_h.rfs_may_expire, enic_flow_may_expire, | 23 | timer_setup(&enic->rfs_h.rfs_may_expire, enic_flow_may_expire, 0); |
| 24 | (unsigned long)enic); | ||
| 25 | mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4); | 24 | mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4); |
| 26 | } | 25 | } |
| 27 | 26 | ||
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/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index 8f53d762fbc4..5a4e78fde530 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c | |||
| @@ -254,7 +254,7 @@ tlan_set_timer(struct net_device *dev, u32 ticks, u32 type) | |||
| 254 | spin_unlock_irqrestore(&priv->lock, flags); | 254 | spin_unlock_irqrestore(&priv->lock, flags); |
| 255 | return; | 255 | return; |
| 256 | } | 256 | } |
| 257 | priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; | 257 | priv->timer.function = tlan_timer; |
| 258 | if (!in_irq()) | 258 | if (!in_irq()) |
| 259 | spin_unlock_irqrestore(&priv->lock, flags); | 259 | spin_unlock_irqrestore(&priv->lock, flags); |
| 260 | 260 | ||
| @@ -1425,7 +1425,7 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int) | |||
| 1425 | tlan_dio_write8(dev->base_addr, | 1425 | tlan_dio_write8(dev->base_addr, |
| 1426 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); | 1426 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); |
| 1427 | if (priv->timer.function == NULL) { | 1427 | if (priv->timer.function == NULL) { |
| 1428 | priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; | 1428 | priv->timer.function = tlan_timer; |
| 1429 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; | 1429 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; |
| 1430 | priv->timer_set_at = jiffies; | 1430 | priv->timer_set_at = jiffies; |
| 1431 | priv->timer_type = TLAN_TIMER_ACTIVITY; | 1431 | priv->timer_type = TLAN_TIMER_ACTIVITY; |
| @@ -1576,7 +1576,7 @@ drop_and_reuse: | |||
| 1576 | tlan_dio_write8(dev->base_addr, | 1576 | tlan_dio_write8(dev->base_addr, |
| 1577 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); | 1577 | TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT); |
| 1578 | if (priv->timer.function == NULL) { | 1578 | if (priv->timer.function == NULL) { |
| 1579 | priv->timer.function = (TIMER_FUNC_TYPE)tlan_timer; | 1579 | priv->timer.function = tlan_timer; |
| 1580 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; | 1580 | priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; |
| 1581 | priv->timer_set_at = jiffies; | 1581 | priv->timer_set_at = jiffies; |
| 1582 | priv->timer_type = TLAN_TIMER_ACTIVITY; | 1582 | priv->timer_type = TLAN_TIMER_ACTIVITY; |
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/hamradio/scc.c b/drivers/net/hamradio/scc.c index c9f7215c5dc2..3de272959090 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
| @@ -1005,7 +1005,7 @@ static void __scc_start_tx_timer(struct scc_channel *scc, | |||
| 1005 | } else | 1005 | } else |
| 1006 | if (when != TIMER_OFF) | 1006 | if (when != TIMER_OFF) |
| 1007 | { | 1007 | { |
| 1008 | scc->tx_t.function = (TIMER_FUNC_TYPE)handler; | 1008 | scc->tx_t.function = handler; |
| 1009 | scc->tx_t.expires = jiffies + (when*HZ)/100; | 1009 | scc->tx_t.expires = jiffies + (when*HZ)/100; |
| 1010 | add_timer(&scc->tx_t); | 1010 | add_timer(&scc->tx_t); |
| 1011 | } | 1011 | } |
| @@ -1031,7 +1031,7 @@ static void scc_start_defer(struct scc_channel *scc) | |||
| 1031 | 1031 | ||
| 1032 | if (scc->kiss.maxdefer != 0 && scc->kiss.maxdefer != TIMER_OFF) | 1032 | if (scc->kiss.maxdefer != 0 && scc->kiss.maxdefer != TIMER_OFF) |
| 1033 | { | 1033 | { |
| 1034 | scc->tx_wdog.function = (TIMER_FUNC_TYPE)t_busy; | 1034 | scc->tx_wdog.function = t_busy; |
| 1035 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxdefer; | 1035 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxdefer; |
| 1036 | add_timer(&scc->tx_wdog); | 1036 | add_timer(&scc->tx_wdog); |
| 1037 | } | 1037 | } |
| @@ -1047,7 +1047,7 @@ static void scc_start_maxkeyup(struct scc_channel *scc) | |||
| 1047 | 1047 | ||
| 1048 | if (scc->kiss.maxkeyup != 0 && scc->kiss.maxkeyup != TIMER_OFF) | 1048 | if (scc->kiss.maxkeyup != 0 && scc->kiss.maxkeyup != TIMER_OFF) |
| 1049 | { | 1049 | { |
| 1050 | scc->tx_wdog.function = (TIMER_FUNC_TYPE)t_maxkeyup; | 1050 | scc->tx_wdog.function = t_maxkeyup; |
| 1051 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxkeyup; | 1051 | scc->tx_wdog.expires = jiffies + HZ*scc->kiss.maxkeyup; |
| 1052 | add_timer(&scc->tx_wdog); | 1052 | add_timer(&scc->tx_wdog); |
| 1053 | } | 1053 | } |
| @@ -1428,7 +1428,7 @@ scc_start_calibrate(struct scc_channel *scc, int duration, unsigned char pattern | |||
| 1428 | 1428 | ||
| 1429 | del_timer(&scc->tx_wdog); | 1429 | del_timer(&scc->tx_wdog); |
| 1430 | 1430 | ||
| 1431 | scc->tx_wdog.function = (TIMER_FUNC_TYPE)scc_stop_calibrate; | 1431 | scc->tx_wdog.function = scc_stop_calibrate; |
| 1432 | scc->tx_wdog.expires = jiffies + HZ*duration; | 1432 | scc->tx_wdog.expires = jiffies + HZ*duration; |
| 1433 | add_timer(&scc->tx_wdog); | 1433 | add_timer(&scc->tx_wdog); |
| 1434 | 1434 | ||
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 6a7bde9bc4b2..95749006d687 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/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index ede89d4ffc88..e99e766a3028 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c | |||
| @@ -518,11 +518,11 @@ exit: | |||
| 518 | 518 | ||
| 519 | /* LED trigger */ | 519 | /* LED trigger */ |
| 520 | static int tx_activity; | 520 | static int tx_activity; |
| 521 | static void at76_ledtrig_tx_timerfunc(unsigned long data); | 521 | static void at76_ledtrig_tx_timerfunc(struct timer_list *unused); |
| 522 | static DEFINE_TIMER(ledtrig_tx_timer, at76_ledtrig_tx_timerfunc); | 522 | static DEFINE_TIMER(ledtrig_tx_timer, at76_ledtrig_tx_timerfunc); |
| 523 | DEFINE_LED_TRIGGER(ledtrig_tx); | 523 | DEFINE_LED_TRIGGER(ledtrig_tx); |
| 524 | 524 | ||
| 525 | static void at76_ledtrig_tx_timerfunc(unsigned long data) | 525 | static void at76_ledtrig_tx_timerfunc(struct timer_list *unused) |
| 526 | { | 526 | { |
| 527 | static int tx_lastactivity; | 527 | static int tx_lastactivity; |
| 528 | 528 | ||
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/dvm/tt.c b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c index 5b73492e7ff7..6524533d723c 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/tt.c | |||
| @@ -164,9 +164,10 @@ enum iwl_antenna_ok iwl_rx_ant_restriction(struct iwl_priv *priv) | |||
| 164 | * without doing anything, driver should continue the 5 seconds timer | 164 | * without doing anything, driver should continue the 5 seconds timer |
| 165 | * to wake up uCode for temperature check until temperature drop below CT | 165 | * to wake up uCode for temperature check until temperature drop below CT |
| 166 | */ | 166 | */ |
| 167 | static void iwl_tt_check_exit_ct_kill(unsigned long data) | 167 | static void iwl_tt_check_exit_ct_kill(struct timer_list *t) |
| 168 | { | 168 | { |
| 169 | struct iwl_priv *priv = (struct iwl_priv *)data; | 169 | struct iwl_priv *priv = from_timer(priv, t, |
| 170 | thermal_throttle.ct_kill_exit_tm); | ||
| 170 | struct iwl_tt_mgmt *tt = &priv->thermal_throttle; | 171 | struct iwl_tt_mgmt *tt = &priv->thermal_throttle; |
| 171 | unsigned long flags; | 172 | unsigned long flags; |
| 172 | 173 | ||
| @@ -214,9 +215,10 @@ static void iwl_perform_ct_kill_task(struct iwl_priv *priv, | |||
| 214 | } | 215 | } |
| 215 | } | 216 | } |
| 216 | 217 | ||
| 217 | static void iwl_tt_ready_for_ct_kill(unsigned long data) | 218 | static void iwl_tt_ready_for_ct_kill(struct timer_list *t) |
| 218 | { | 219 | { |
| 219 | struct iwl_priv *priv = (struct iwl_priv *)data; | 220 | struct iwl_priv *priv = from_timer(priv, t, |
| 221 | thermal_throttle.ct_kill_waiting_tm); | ||
| 220 | struct iwl_tt_mgmt *tt = &priv->thermal_throttle; | 222 | struct iwl_tt_mgmt *tt = &priv->thermal_throttle; |
| 221 | 223 | ||
| 222 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 224 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
| @@ -612,10 +614,10 @@ void iwl_tt_initialize(struct iwl_priv *priv) | |||
| 612 | memset(tt, 0, sizeof(struct iwl_tt_mgmt)); | 614 | memset(tt, 0, sizeof(struct iwl_tt_mgmt)); |
| 613 | 615 | ||
| 614 | tt->state = IWL_TI_0; | 616 | tt->state = IWL_TI_0; |
| 615 | setup_timer(&priv->thermal_throttle.ct_kill_exit_tm, | 617 | timer_setup(&priv->thermal_throttle.ct_kill_exit_tm, |
| 616 | iwl_tt_check_exit_ct_kill, (unsigned long)priv); | 618 | iwl_tt_check_exit_ct_kill, 0); |
| 617 | setup_timer(&priv->thermal_throttle.ct_kill_waiting_tm, | 619 | timer_setup(&priv->thermal_throttle.ct_kill_waiting_tm, |
| 618 | iwl_tt_ready_for_ct_kill, (unsigned long)priv); | 620 | iwl_tt_ready_for_ct_kill, 0); |
| 619 | /* setup deferred ct kill work */ | 621 | /* setup deferred ct kill work */ |
| 620 | INIT_WORK(&priv->tt_work, iwl_bg_tt_work); | 622 | INIT_WORK(&priv->tt_work, iwl_bg_tt_work); |
| 621 | INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); | 623 | INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); |
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 1a8d8db80b05..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,10 +1189,8 @@ 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 | init_timer(&sta->timer); | 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 | sta->timer.data = (unsigned long) sta; | ||
| 1195 | sta->timer.function = ap_handle_timer; | ||
| 1196 | if (!ap->local->hostapd) | 1194 | if (!ap->local->hostapd) |
| 1197 | add_timer(&sta->timer); | 1195 | add_timer(&sta->timer); |
| 1198 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ | 1196 | #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ |
diff --git a/drivers/net/wireless/intersil/hostap/hostap_hw.c b/drivers/net/wireless/intersil/hostap/hostap_hw.c index 72b46eaf3de2..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,13 +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 | init_timer(&local->passive_scan_timer); | 3228 | timer_setup(&local->passive_scan_timer, hostap_passive_scan, 0); |
| 3229 | local->passive_scan_timer.data = (unsigned long) local; | 3229 | timer_setup(&local->tick_timer, hostap_tick_timer, 0); |
| 3230 | local->passive_scan_timer.function = hostap_passive_scan; | ||
| 3231 | |||
| 3232 | init_timer(&local->tick_timer); | ||
| 3233 | local->tick_timer.data = (unsigned long) local; | ||
| 3234 | local->tick_timer.function = hostap_tick_timer; | ||
| 3235 | local->tick_timer.expires = jiffies + 2 * HZ; | 3230 | local->tick_timer.expires = jiffies + 2 * HZ; |
| 3236 | add_timer(&local->tick_timer); | 3231 | add_timer(&local->tick_timer); |
| 3237 | 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/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c index 7d6dc76c930a..6711e7fb6926 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c +++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | |||
| @@ -554,7 +554,7 @@ qtnf_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) | |||
| 554 | return -EFAULT; | 554 | return -EFAULT; |
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | mac->scan_timeout.function = (TIMER_FUNC_TYPE)qtnf_scan_timeout; | 557 | mac->scan_timeout.function = qtnf_scan_timeout; |
| 558 | mod_timer(&mac->scan_timeout, | 558 | mod_timer(&mac->scan_timeout, |
| 559 | jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); | 559 | jiffies + QTNF_SCAN_TIMEOUT_SEC * HZ); |
| 560 | 560 | ||
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/ray_cs.c b/drivers/net/wireless/ray_cs.c index d8afcdfca1ed..0133fcd4601b 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
| @@ -569,7 +569,7 @@ static int dl_startup_params(struct net_device *dev) | |||
| 569 | local->card_status = CARD_DL_PARAM; | 569 | local->card_status = CARD_DL_PARAM; |
| 570 | /* Start kernel timer to wait for dl startup to complete. */ | 570 | /* Start kernel timer to wait for dl startup to complete. */ |
| 571 | local->timer.expires = jiffies + HZ / 2; | 571 | local->timer.expires = jiffies + HZ / 2; |
| 572 | local->timer.function = (TIMER_FUNC_TYPE)verify_dl_startup; | 572 | local->timer.function = verify_dl_startup; |
| 573 | add_timer(&local->timer); | 573 | add_timer(&local->timer); |
| 574 | dev_dbg(&link->dev, | 574 | dev_dbg(&link->dev, |
| 575 | "ray_cs dl_startup_params started timer for verify_dl_startup\n"); | 575 | "ray_cs dl_startup_params started timer for verify_dl_startup\n"); |
| @@ -1947,12 +1947,12 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id) | |||
| 1947 | dev_dbg(&link->dev, | 1947 | dev_dbg(&link->dev, |
| 1948 | "ray_cs interrupt network \"%s\" start failed\n", | 1948 | "ray_cs interrupt network \"%s\" start failed\n", |
| 1949 | memtmp); | 1949 | memtmp); |
| 1950 | local->timer.function = (TIMER_FUNC_TYPE)start_net; | 1950 | local->timer.function = start_net; |
| 1951 | } else { | 1951 | } else { |
| 1952 | dev_dbg(&link->dev, | 1952 | dev_dbg(&link->dev, |
| 1953 | "ray_cs interrupt network \"%s\" join failed\n", | 1953 | "ray_cs interrupt network \"%s\" join failed\n", |
| 1954 | memtmp); | 1954 | memtmp); |
| 1955 | local->timer.function = (TIMER_FUNC_TYPE)join_net; | 1955 | local->timer.function = join_net; |
| 1956 | } | 1956 | } |
| 1957 | add_timer(&local->timer); | 1957 | add_timer(&local->timer); |
| 1958 | } | 1958 | } |
| @@ -2417,9 +2417,9 @@ static void authenticate(ray_dev_t *local) | |||
| 2417 | 2417 | ||
| 2418 | del_timer(&local->timer); | 2418 | del_timer(&local->timer); |
| 2419 | if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) { | 2419 | if (build_auth_frame(local, local->bss_id, OPEN_AUTH_REQUEST)) { |
| 2420 | local->timer.function = (TIMER_FUNC_TYPE)join_net; | 2420 | local->timer.function = join_net; |
| 2421 | } else { | 2421 | } else { |
| 2422 | local->timer.function = (TIMER_FUNC_TYPE)authenticate_timeout; | 2422 | local->timer.function = authenticate_timeout; |
| 2423 | } | 2423 | } |
| 2424 | local->timer.expires = jiffies + HZ * 2; | 2424 | local->timer.expires = jiffies + HZ * 2; |
| 2425 | add_timer(&local->timer); | 2425 | add_timer(&local->timer); |
| @@ -2502,7 +2502,7 @@ static void associate(ray_dev_t *local) | |||
| 2502 | 2502 | ||
| 2503 | del_timer(&local->timer); | 2503 | del_timer(&local->timer); |
| 2504 | local->timer.expires = jiffies + HZ * 2; | 2504 | local->timer.expires = jiffies + HZ * 2; |
| 2505 | local->timer.function = (TIMER_FUNC_TYPE)join_net; | 2505 | local->timer.function = join_net; |
| 2506 | add_timer(&local->timer); | 2506 | add_timer(&local->timer); |
| 2507 | local->card_status = CARD_ASSOC_FAILED; | 2507 | local->card_status = CARD_ASSOC_FAILED; |
| 2508 | return; | 2508 | return; |
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/nfcmrvl/fw_dnld.c b/drivers/nfc/nfcmrvl/fw_dnld.c index 7f8960a46aab..52c8ae504e32 100644 --- a/drivers/nfc/nfcmrvl/fw_dnld.c +++ b/drivers/nfc/nfcmrvl/fw_dnld.c | |||
| @@ -130,9 +130,9 @@ static void fw_dnld_over(struct nfcmrvl_private *priv, u32 error) | |||
| 130 | nfc_fw_download_done(priv->ndev->nfc_dev, priv->fw_dnld.name, error); | 130 | nfc_fw_download_done(priv->ndev->nfc_dev, priv->fw_dnld.name, error); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | static void fw_dnld_timeout(unsigned long arg) | 133 | static void fw_dnld_timeout(struct timer_list *t) |
| 134 | { | 134 | { |
| 135 | struct nfcmrvl_private *priv = (struct nfcmrvl_private *) arg; | 135 | struct nfcmrvl_private *priv = from_timer(priv, t, fw_dnld.timer); |
| 136 | 136 | ||
| 137 | nfc_err(priv->dev, "FW loading timeout"); | 137 | nfc_err(priv->dev, "FW loading timeout"); |
| 138 | priv->fw_dnld.state = STATE_RESET; | 138 | priv->fw_dnld.state = STATE_RESET; |
| @@ -538,8 +538,7 @@ int nfcmrvl_fw_dnld_start(struct nci_dev *ndev, const char *firmware_name) | |||
| 538 | } | 538 | } |
| 539 | 539 | ||
| 540 | /* Configure a timer for timeout */ | 540 | /* Configure a timer for timeout */ |
| 541 | setup_timer(&priv->fw_dnld.timer, fw_dnld_timeout, | 541 | timer_setup(&priv->fw_dnld.timer, fw_dnld_timeout, 0); |
| 542 | (unsigned long) priv); | ||
| 543 | mod_timer(&priv->fw_dnld.timer, | 542 | mod_timer(&priv->fw_dnld.timer, |
| 544 | jiffies + msecs_to_jiffies(FW_DNLD_TIMEOUT)); | 543 | jiffies + msecs_to_jiffies(FW_DNLD_TIMEOUT)); |
| 545 | 544 | ||
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index c05cb637ba92..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,9 +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 | init_timer(&priv->listen_timer); | 2635 | timer_setup(&priv->listen_timer, pn533_listen_mode_timer, 0); |
| 2636 | priv->listen_timer.data = (unsigned long) priv; | ||
| 2637 | priv->listen_timer.function = pn533_listen_mode_timer; | ||
| 2638 | 2636 | ||
| 2639 | skb_queue_head_init(&priv->resp_q); | 2637 | skb_queue_head_init(&priv->resp_q); |
| 2640 | 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 9477994cf975..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,13 +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 | init_timer(&ndlc->t1_timer); | 285 | timer_setup(&ndlc->t1_timer, ndlc_t1_timeout, 0); |
| 286 | ndlc->t1_timer.data = (unsigned long)ndlc; | 286 | timer_setup(&ndlc->t2_timer, ndlc_t2_timeout, 0); |
| 287 | ndlc->t1_timer.function = ndlc_t1_timeout; | ||
| 288 | |||
| 289 | init_timer(&ndlc->t2_timer); | ||
| 290 | ndlc->t2_timer.data = (unsigned long)ndlc; | ||
| 291 | ndlc->t2_timer.function = ndlc_t2_timeout; | ||
| 292 | 287 | ||
| 293 | skb_queue_head_init(&ndlc->rcv_q); | 288 | skb_queue_head_init(&ndlc->rcv_q); |
| 294 | skb_queue_head_init(&ndlc->send_q); | 289 | skb_queue_head_init(&ndlc->send_q); |
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 56f2112e0cd8..f55d082ace71 100644 --- a/drivers/nfc/st-nci/se.c +++ b/drivers/nfc/st-nci/se.c | |||
| @@ -677,7 +677,7 @@ int st_nci_se_io(struct nci_dev *ndev, u32 se_idx, | |||
| 677 | } | 677 | } |
| 678 | EXPORT_SYMBOL(st_nci_se_io); | 678 | EXPORT_SYMBOL(st_nci_se_io); |
| 679 | 679 | ||
| 680 | static void st_nci_se_wt_timeout(unsigned long data) | 680 | static void st_nci_se_wt_timeout(struct timer_list *t) |
| 681 | { | 681 | { |
| 682 | /* | 682 | /* |
| 683 | * No answer from the secure element | 683 | * No answer from the secure element |
| @@ -690,7 +690,7 @@ static void st_nci_se_wt_timeout(unsigned long data) | |||
| 690 | */ | 690 | */ |
| 691 | /* hardware reset managed through VCC_UICC_OUT power supply */ | 691 | /* hardware reset managed through VCC_UICC_OUT power supply */ |
| 692 | u8 param = 0x01; | 692 | u8 param = 0x01; |
| 693 | struct st_nci_info *info = (struct st_nci_info *) data; | 693 | struct st_nci_info *info = from_timer(info, t, se_info.bwi_timer); |
| 694 | 694 | ||
| 695 | pr_debug("\n"); | 695 | pr_debug("\n"); |
| 696 | 696 | ||
| @@ -708,9 +708,10 @@ static void st_nci_se_wt_timeout(unsigned long data) | |||
| 708 | info->se_info.cb(info->se_info.cb_context, NULL, 0, -ETIME); | 708 | info->se_info.cb(info->se_info.cb_context, NULL, 0, -ETIME); |
| 709 | } | 709 | } |
| 710 | 710 | ||
| 711 | static void st_nci_se_activation_timeout(unsigned long data) | 711 | static void st_nci_se_activation_timeout(struct timer_list *t) |
| 712 | { | 712 | { |
| 713 | struct st_nci_info *info = (struct st_nci_info *) data; | 713 | struct st_nci_info *info = from_timer(info, t, |
| 714 | se_info.se_active_timer); | ||
| 714 | 715 | ||
| 715 | pr_debug("\n"); | 716 | pr_debug("\n"); |
| 716 | 717 | ||
| @@ -725,15 +726,11 @@ int st_nci_se_init(struct nci_dev *ndev, struct st_nci_se_status *se_status) | |||
| 725 | 726 | ||
| 726 | init_completion(&info->se_info.req_completion); | 727 | init_completion(&info->se_info.req_completion); |
| 727 | /* initialize timers */ | 728 | /* initialize timers */ |
| 728 | init_timer(&info->se_info.bwi_timer); | 729 | timer_setup(&info->se_info.bwi_timer, st_nci_se_wt_timeout, 0); |
| 729 | info->se_info.bwi_timer.data = (unsigned long)info; | ||
| 730 | info->se_info.bwi_timer.function = st_nci_se_wt_timeout; | ||
| 731 | info->se_info.bwi_active = false; | 730 | info->se_info.bwi_active = false; |
| 732 | 731 | ||
| 733 | init_timer(&info->se_info.se_active_timer); | 732 | timer_setup(&info->se_info.se_active_timer, |
| 734 | info->se_info.se_active_timer.data = (unsigned long)info; | 733 | st_nci_se_activation_timeout, 0); |
| 735 | info->se_info.se_active_timer.function = | ||
| 736 | st_nci_se_activation_timeout; | ||
| 737 | info->se_info.se_active = false; | 734 | info->se_info.se_active = false; |
| 738 | 735 | ||
| 739 | info->se_info.xch_error = false; | 736 | info->se_info.xch_error = false; |
diff --git a/drivers/nfc/st21nfca/se.c b/drivers/nfc/st21nfca/se.c index 3a98563d4a12..4bed9e842db3 100644 --- a/drivers/nfc/st21nfca/se.c +++ b/drivers/nfc/st21nfca/se.c | |||
| @@ -252,7 +252,7 @@ int st21nfca_hci_se_io(struct nfc_hci_dev *hdev, u32 se_idx, | |||
| 252 | } | 252 | } |
| 253 | EXPORT_SYMBOL(st21nfca_hci_se_io); | 253 | EXPORT_SYMBOL(st21nfca_hci_se_io); |
| 254 | 254 | ||
| 255 | static void st21nfca_se_wt_timeout(unsigned long data) | 255 | static void st21nfca_se_wt_timeout(struct timer_list *t) |
| 256 | { | 256 | { |
| 257 | /* | 257 | /* |
| 258 | * No answer from the secure element | 258 | * No answer from the secure element |
| @@ -265,7 +265,8 @@ static void st21nfca_se_wt_timeout(unsigned long data) | |||
| 265 | */ | 265 | */ |
| 266 | /* hardware reset managed through VCC_UICC_OUT power supply */ | 266 | /* hardware reset managed through VCC_UICC_OUT power supply */ |
| 267 | u8 param = 0x01; | 267 | u8 param = 0x01; |
| 268 | struct st21nfca_hci_info *info = (struct st21nfca_hci_info *) data; | 268 | struct st21nfca_hci_info *info = from_timer(info, t, |
| 269 | se_info.bwi_timer); | ||
| 269 | 270 | ||
| 270 | pr_debug("\n"); | 271 | pr_debug("\n"); |
| 271 | 272 | ||
| @@ -283,9 +284,10 @@ static void st21nfca_se_wt_timeout(unsigned long data) | |||
| 283 | info->se_info.cb(info->se_info.cb_context, NULL, 0, -ETIME); | 284 | info->se_info.cb(info->se_info.cb_context, NULL, 0, -ETIME); |
| 284 | } | 285 | } |
| 285 | 286 | ||
| 286 | static void st21nfca_se_activation_timeout(unsigned long data) | 287 | static void st21nfca_se_activation_timeout(struct timer_list *t) |
| 287 | { | 288 | { |
| 288 | struct st21nfca_hci_info *info = (struct st21nfca_hci_info *) data; | 289 | struct st21nfca_hci_info *info = from_timer(info, t, |
| 290 | se_info.se_active_timer); | ||
| 289 | 291 | ||
| 290 | pr_debug("\n"); | 292 | pr_debug("\n"); |
| 291 | 293 | ||
| @@ -392,14 +394,11 @@ void st21nfca_se_init(struct nfc_hci_dev *hdev) | |||
| 392 | 394 | ||
| 393 | init_completion(&info->se_info.req_completion); | 395 | init_completion(&info->se_info.req_completion); |
| 394 | /* initialize timers */ | 396 | /* initialize timers */ |
| 395 | init_timer(&info->se_info.bwi_timer); | 397 | timer_setup(&info->se_info.bwi_timer, st21nfca_se_wt_timeout, 0); |
| 396 | info->se_info.bwi_timer.data = (unsigned long)info; | ||
| 397 | info->se_info.bwi_timer.function = st21nfca_se_wt_timeout; | ||
| 398 | info->se_info.bwi_active = false; | 398 | info->se_info.bwi_active = false; |
| 399 | 399 | ||
| 400 | init_timer(&info->se_info.se_active_timer); | 400 | timer_setup(&info->se_info.se_active_timer, |
| 401 | info->se_info.se_active_timer.data = (unsigned long)info; | 401 | st21nfca_se_activation_timeout, 0); |
| 402 | info->se_info.se_active_timer.function = st21nfca_se_activation_timeout; | ||
| 403 | info->se_info.se_active = false; | 402 | info->se_info.se_active = false; |
| 404 | 403 | ||
| 405 | info->se_info.count_pipes = 0; | 404 | info->se_info.count_pipes = 0; |
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 29f35e29d480..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,9 +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 | init_timer(&device->timer); | 122 | timer_setup(&device->timer, dasd_device_timeout, 0); |
| 123 | device->timer.function = dasd_device_timeout; | ||
| 124 | device->timer.data = (unsigned long) device; | ||
| 125 | INIT_WORK(&device->kick_work, do_kick_device); | 123 | INIT_WORK(&device->kick_work, do_kick_device); |
| 126 | INIT_WORK(&device->restore_device, do_restore_device); | 124 | INIT_WORK(&device->restore_device, do_restore_device); |
| 127 | INIT_WORK(&device->reload_device, do_reload_device); | 125 | INIT_WORK(&device->reload_device, do_reload_device); |
| @@ -163,9 +161,7 @@ struct dasd_block *dasd_alloc_block(void) | |||
| 163 | (unsigned long) block); | 161 | (unsigned long) block); |
| 164 | INIT_LIST_HEAD(&block->ccw_queue); | 162 | INIT_LIST_HEAD(&block->ccw_queue); |
| 165 | spin_lock_init(&block->queue_lock); | 163 | spin_lock_init(&block->queue_lock); |
| 166 | init_timer(&block->timer); | 164 | timer_setup(&block->timer, dasd_block_timeout, 0); |
| 167 | block->timer.function = dasd_block_timeout; | ||
| 168 | block->timer.data = (unsigned long) block; | ||
| 169 | spin_lock_init(&block->profile.lock); | 165 | spin_lock_init(&block->profile.lock); |
| 170 | 166 | ||
| 171 | return block; | 167 | return block; |
| @@ -1560,12 +1556,12 @@ EXPORT_SYMBOL(dasd_start_IO); | |||
| 1560 | * 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), |
| 1561 | * DASD_CQR_QUEUED for 2) and 3). | 1557 | * DASD_CQR_QUEUED for 2) and 3). |
| 1562 | */ | 1558 | */ |
| 1563 | static void dasd_device_timeout(unsigned long ptr) | 1559 | static void dasd_device_timeout(struct timer_list *t) |
| 1564 | { | 1560 | { |
| 1565 | unsigned long flags; | 1561 | unsigned long flags; |
| 1566 | struct dasd_device *device; | 1562 | struct dasd_device *device; |
| 1567 | 1563 | ||
| 1568 | device = (struct dasd_device *) ptr; | 1564 | device = from_timer(device, t, timer); |
| 1569 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 1565 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
| 1570 | /* re-activate request queue */ | 1566 | /* re-activate request queue */ |
| 1571 | dasd_device_remove_stop_bits(device, DASD_STOPPED_PENDING); | 1567 | dasd_device_remove_stop_bits(device, DASD_STOPPED_PENDING); |
| @@ -2628,12 +2624,12 @@ EXPORT_SYMBOL(dasd_cancel_req); | |||
| 2628 | * 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 |
| 2629 | * change interrupt) | 2625 | * change interrupt) |
| 2630 | */ | 2626 | */ |
| 2631 | static void dasd_block_timeout(unsigned long ptr) | 2627 | static void dasd_block_timeout(struct timer_list *t) |
| 2632 | { | 2628 | { |
| 2633 | unsigned long flags; | 2629 | unsigned long flags; |
| 2634 | struct dasd_block *block; | 2630 | struct dasd_block *block; |
| 2635 | 2631 | ||
| 2636 | block = (struct dasd_block *) ptr; | 2632 | block = from_timer(block, t, timer); |
| 2637 | spin_lock_irqsave(get_ccwdev_lock(block->base->cdev), flags); | 2633 | spin_lock_irqsave(get_ccwdev_lock(block->base->cdev), flags); |
| 2638 | /* re-activate request queue */ | 2634 | /* re-activate request queue */ |
| 2639 | 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/char/sclp.c b/drivers/s390/char/sclp.c index 9b4c61c1e309..e4e2df7a478e 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c | |||
| @@ -158,7 +158,7 @@ static inline void | |||
| 158 | __sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *)) | 158 | __sclp_set_request_timer(unsigned long time, void (*cb)(struct timer_list *)) |
| 159 | { | 159 | { |
| 160 | del_timer(&sclp_request_timer); | 160 | del_timer(&sclp_request_timer); |
| 161 | sclp_request_timer.function = (TIMER_FUNC_TYPE)cb; | 161 | sclp_request_timer.function = cb; |
| 162 | sclp_request_timer.expires = jiffies + time; | 162 | sclp_request_timer.expires = jiffies + time; |
| 163 | add_timer(&sclp_request_timer); | 163 | add_timer(&sclp_request_timer); |
| 164 | } | 164 | } |
| @@ -566,7 +566,7 @@ sclp_sync_wait(void) | |||
| 566 | if (timer_pending(&sclp_request_timer) && | 566 | if (timer_pending(&sclp_request_timer) && |
| 567 | get_tod_clock_fast() > timeout && | 567 | get_tod_clock_fast() > timeout && |
| 568 | del_timer(&sclp_request_timer)) | 568 | del_timer(&sclp_request_timer)) |
| 569 | sclp_request_timer.function((TIMER_DATA_TYPE)&sclp_request_timer); | 569 | sclp_request_timer.function(&sclp_request_timer); |
| 570 | cpu_relax(); | 570 | cpu_relax(); |
| 571 | } | 571 | } |
| 572 | local_irq_disable(); | 572 | local_irq_disable(); |
diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c index 8c14c6c3ad3d..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); |
| @@ -142,13 +143,11 @@ void | |||
| 142 | fsm_settimer(fsm_instance *fi, fsm_timer *this) | 143 | fsm_settimer(fsm_instance *fi, fsm_timer *this) |
| 143 | { | 144 | { |
| 144 | this->fi = fi; | 145 | this->fi = fi; |
| 145 | this->tl.function = (void *)fsm_expire_timer; | ||
| 146 | this->tl.data = (long)this; | ||
| 147 | #if FSM_TIMER_DEBUG | 146 | #if FSM_TIMER_DEBUG |
| 148 | printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name, | 147 | printk(KERN_DEBUG "fsm(%s): Create timer %p\n", fi->name, |
| 149 | this); | 148 | this); |
| 150 | #endif | 149 | #endif |
| 151 | init_timer(&this->tl); | 150 | timer_setup(&this->tl, fsm_expire_timer, 0); |
| 152 | } | 151 | } |
| 153 | 152 | ||
| 154 | void | 153 | void |
| @@ -170,7 +169,7 @@ fsm_addtimer(fsm_timer *this, int millisec, int event, void *arg) | |||
| 170 | this->fi->name, this, millisec); | 169 | this->fi->name, this, millisec); |
| 171 | #endif | 170 | #endif |
| 172 | 171 | ||
| 173 | setup_timer(&this->tl, (void *)fsm_expire_timer, (long)this); | 172 | timer_setup(&this->tl, fsm_expire_timer, 0); |
| 174 | this->expire_event = event; | 173 | this->expire_event = event; |
| 175 | this->event_arg = arg; | 174 | this->event_arg = arg; |
| 176 | this->tl.expires = jiffies + (millisec * HZ) / 1000; | 175 | this->tl.expires = jiffies + (millisec * HZ) / 1000; |
| @@ -189,7 +188,7 @@ fsm_modtimer(fsm_timer *this, int millisec, int event, void *arg) | |||
| 189 | #endif | 188 | #endif |
| 190 | 189 | ||
| 191 | del_timer(&this->tl); | 190 | del_timer(&this->tl); |
| 192 | setup_timer(&this->tl, (void *)fsm_expire_timer, (long)this); | 191 | timer_setup(&this->tl, fsm_expire_timer, 0); |
| 193 | this->expire_event = event; | 192 | this->expire_event = event; |
| 194 | this->event_arg = arg; | 193 | this->event_arg = arg; |
| 195 | this->tl.expires = jiffies + (millisec * HZ) / 1000; | 194 | this->tl.expires = jiffies + (millisec * HZ) / 1000; |
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 51b81c0a0652..b12cb81ad8a2 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
| @@ -34,7 +34,7 @@ static void zfcp_fsf_request_timeout_handler(struct timer_list *t) | |||
| 34 | static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, | 34 | static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, |
| 35 | unsigned long timeout) | 35 | unsigned long timeout) |
| 36 | { | 36 | { |
| 37 | fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_fsf_request_timeout_handler; | 37 | fsf_req->timer.function = zfcp_fsf_request_timeout_handler; |
| 38 | fsf_req->timer.expires = jiffies + timeout; | 38 | fsf_req->timer.expires = jiffies + timeout; |
| 39 | add_timer(&fsf_req->timer); | 39 | add_timer(&fsf_req->timer); |
| 40 | } | 40 | } |
| @@ -42,7 +42,7 @@ static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, | |||
| 42 | static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) | 42 | static void zfcp_fsf_start_erp_timer(struct zfcp_fsf_req *fsf_req) |
| 43 | { | 43 | { |
| 44 | BUG_ON(!fsf_req->erp_action); | 44 | BUG_ON(!fsf_req->erp_action); |
| 45 | fsf_req->timer.function = (TIMER_FUNC_TYPE)zfcp_erp_timeout_handler; | 45 | fsf_req->timer.function = zfcp_erp_timeout_handler; |
| 46 | fsf_req->timer.expires = jiffies + 30 * HZ; | 46 | fsf_req->timer.expires = jiffies + 30 * HZ; |
| 47 | add_timer(&fsf_req->timer); | 47 | add_timer(&fsf_req->timer); |
| 48 | } | 48 | } |
diff --git a/drivers/scsi/aic94xx/aic94xx_hwi.c b/drivers/scsi/aic94xx/aic94xx_hwi.c index 5402b85b0bdc..2dbc8330d7d3 100644 --- a/drivers/scsi/aic94xx/aic94xx_hwi.c +++ b/drivers/scsi/aic94xx/aic94xx_hwi.c | |||
| @@ -1175,7 +1175,7 @@ static void asd_start_scb_timers(struct list_head *list) | |||
| 1175 | struct asd_ascb *ascb; | 1175 | struct asd_ascb *ascb; |
| 1176 | list_for_each_entry(ascb, list, list) { | 1176 | list_for_each_entry(ascb, list, list) { |
| 1177 | if (!ascb->uldd_timer) { | 1177 | if (!ascb->uldd_timer) { |
| 1178 | ascb->timer.function = (TIMER_FUNC_TYPE)asd_ascb_timedout; | 1178 | ascb->timer.function = asd_ascb_timedout; |
| 1179 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; | 1179 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; |
| 1180 | add_timer(&ascb->timer); | 1180 | add_timer(&ascb->timer); |
| 1181 | } | 1181 | } |
diff --git a/drivers/scsi/aic94xx/aic94xx_tmf.c b/drivers/scsi/aic94xx/aic94xx_tmf.c index 4637119c09d8..2a01702d5ba7 100644 --- a/drivers/scsi/aic94xx/aic94xx_tmf.c +++ b/drivers/scsi/aic94xx/aic94xx_tmf.c | |||
| @@ -42,7 +42,7 @@ static int asd_enqueue_internal(struct asd_ascb *ascb, | |||
| 42 | ascb->tasklet_complete = tasklet_complete; | 42 | ascb->tasklet_complete = tasklet_complete; |
| 43 | ascb->uldd_timer = 1; | 43 | ascb->uldd_timer = 1; |
| 44 | 44 | ||
| 45 | ascb->timer.function = (TIMER_FUNC_TYPE)timed_out; | 45 | ascb->timer.function = timed_out; |
| 46 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; | 46 | ascb->timer.expires = jiffies + AIC94XX_SCB_TIMEOUT; |
| 47 | 47 | ||
| 48 | add_timer(&ascb->timer); | 48 | add_timer(&ascb->timer); |
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index af032c46ec0e..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,10 +837,8 @@ 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 | init_timer(&acb->eternal_timer); | 840 | timer_setup(&acb->eternal_timer, arcmsr_request_device_map, 0); |
| 841 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); | 841 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); |
| 842 | acb->eternal_timer.data = (unsigned long) acb; | ||
| 843 | acb->eternal_timer.function = &arcmsr_request_device_map; | ||
| 844 | add_timer(&acb->eternal_timer); | 842 | add_timer(&acb->eternal_timer); |
| 845 | if(arcmsr_alloc_sysfs_attr(acb)) | 843 | if(arcmsr_alloc_sysfs_attr(acb)) |
| 846 | goto out_free_sysfs; | 844 | goto out_free_sysfs; |
| @@ -930,10 +928,8 @@ static int arcmsr_resume(struct pci_dev *pdev) | |||
| 930 | atomic_set(&acb->rq_map_token, 16); | 928 | atomic_set(&acb->rq_map_token, 16); |
| 931 | atomic_set(&acb->ante_token_value, 16); | 929 | atomic_set(&acb->ante_token_value, 16); |
| 932 | acb->fw_flag = FW_NORMAL; | 930 | acb->fw_flag = FW_NORMAL; |
| 933 | init_timer(&acb->eternal_timer); | 931 | timer_setup(&acb->eternal_timer, arcmsr_request_device_map, 0); |
| 934 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); | 932 | acb->eternal_timer.expires = jiffies + msecs_to_jiffies(6 * HZ); |
| 935 | acb->eternal_timer.data = (unsigned long) acb; | ||
| 936 | acb->eternal_timer.function = &arcmsr_request_device_map; | ||
| 937 | add_timer(&acb->eternal_timer); | 933 | add_timer(&acb->eternal_timer); |
| 938 | return 0; | 934 | return 0; |
| 939 | controller_stop: | 935 | controller_stop: |
| @@ -3459,9 +3455,9 @@ static void arcmsr_hbaD_request_device_map(struct AdapterControlBlock *acb) | |||
| 3459 | } | 3455 | } |
| 3460 | } | 3456 | } |
| 3461 | 3457 | ||
| 3462 | static void arcmsr_request_device_map(unsigned long pacb) | 3458 | static void arcmsr_request_device_map(struct timer_list *t) |
| 3463 | { | 3459 | { |
| 3464 | struct AdapterControlBlock *acb = (struct AdapterControlBlock *)pacb; | 3460 | struct AdapterControlBlock *acb = from_timer(acb, t, eternal_timer); |
| 3465 | switch (acb->adapter_type) { | 3461 | switch (acb->adapter_type) { |
| 3466 | case ACB_ADAPTER_TYPE_A: { | 3462 | case ACB_ADAPTER_TYPE_A: { |
| 3467 | 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 24388795ee9a..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,9 +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 | init_timer(&info->eh_timer); | 2852 | timer_setup(&info->eh_timer, fas216_eh_timer, 0); |
| 2853 | info->eh_timer.data = (unsigned long)info; | ||
| 2854 | info->eh_timer.function = fas216_eh_timer; | ||
| 2855 | 2853 | ||
| 2856 | spin_lock_init(&info->host_lock); | 2854 | spin_lock_init(&info->host_lock); |
| 2857 | 2855 | ||
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index be96aa1e5077..b3cfdd5f4d1c 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
| @@ -5279,7 +5279,7 @@ static void beiscsi_hw_health_check(struct timer_list *t) | |||
| 5279 | if (!test_bit(BEISCSI_HBA_UER_SUPP, &phba->state)) | 5279 | if (!test_bit(BEISCSI_HBA_UER_SUPP, &phba->state)) |
| 5280 | return; | 5280 | return; |
| 5281 | /* modify this timer to check TPE */ | 5281 | /* modify this timer to check TPE */ |
| 5282 | phba->hw_check.function = (TIMER_FUNC_TYPE)beiscsi_hw_tpe_check; | 5282 | phba->hw_check.function = beiscsi_hw_tpe_check; |
| 5283 | } | 5283 | } |
| 5284 | 5284 | ||
| 5285 | mod_timer(&phba->hw_check, | 5285 | mod_timer(&phba->hw_check, |
| @@ -5367,7 +5367,7 @@ static int beiscsi_enable_port(struct beiscsi_hba *phba) | |||
| 5367 | * Timer function gets modified for TPE detection. | 5367 | * Timer function gets modified for TPE detection. |
| 5368 | * Always reinit to do health check first. | 5368 | * Always reinit to do health check first. |
| 5369 | */ | 5369 | */ |
| 5370 | phba->hw_check.function = (TIMER_FUNC_TYPE)beiscsi_hw_health_check; | 5370 | phba->hw_check.function = beiscsi_hw_health_check; |
| 5371 | mod_timer(&phba->hw_check, | 5371 | mod_timer(&phba->hw_check, |
| 5372 | jiffies + msecs_to_jiffies(BEISCSI_UE_DETECT_INTERVAL)); | 5372 | jiffies + msecs_to_jiffies(BEISCSI_UE_DETECT_INTERVAL)); |
| 5373 | return 0; | 5373 | return 0; |
diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index 5caf5f3ff642..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,9 +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 | init_timer(&bfad->hal_tmo); | 722 | timer_setup(&bfad->hal_tmo, bfad_bfa_tmo, 0); |
| 723 | bfad->hal_tmo.function = bfad_bfa_tmo; | ||
| 724 | bfad->hal_tmo.data = (unsigned long)bfad; | ||
| 725 | 723 | ||
| 726 | mod_timer(&bfad->hal_tmo, | 724 | mod_timer(&bfad->hal_tmo, |
| 727 | 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/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c index babd79361a46..bf07735275a4 100644 --- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c +++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c | |||
| @@ -586,8 +586,8 @@ static int do_act_open_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx) | |||
| 586 | cxgbi_sock_get(csk); | 586 | cxgbi_sock_get(csk); |
| 587 | spin_lock_bh(&csk->lock); | 587 | spin_lock_bh(&csk->lock); |
| 588 | if (rpl->status == CPL_ERR_CONN_EXIST && | 588 | if (rpl->status == CPL_ERR_CONN_EXIST && |
| 589 | csk->retry_timer.function != (TIMER_FUNC_TYPE)act_open_retry_timer) { | 589 | csk->retry_timer.function != act_open_retry_timer) { |
| 590 | csk->retry_timer.function = (TIMER_FUNC_TYPE)act_open_retry_timer; | 590 | csk->retry_timer.function = act_open_retry_timer; |
| 591 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); | 591 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); |
| 592 | } else | 592 | } else |
| 593 | cxgbi_sock_fail_act_open(csk, | 593 | cxgbi_sock_fail_act_open(csk, |
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index 266eddf17a99..406e94312d4e 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | |||
| @@ -963,8 +963,8 @@ static void do_act_open_rpl(struct cxgbi_device *cdev, struct sk_buff *skb) | |||
| 963 | spin_lock_bh(&csk->lock); | 963 | spin_lock_bh(&csk->lock); |
| 964 | 964 | ||
| 965 | if (status == CPL_ERR_CONN_EXIST && | 965 | if (status == CPL_ERR_CONN_EXIST && |
| 966 | csk->retry_timer.function != (TIMER_FUNC_TYPE)csk_act_open_retry_timer) { | 966 | csk->retry_timer.function != csk_act_open_retry_timer) { |
| 967 | csk->retry_timer.function = (TIMER_FUNC_TYPE)csk_act_open_retry_timer; | 967 | csk->retry_timer.function = csk_act_open_retry_timer; |
| 968 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); | 968 | mod_timer(&csk->retry_timer, jiffies + HZ / 2); |
| 969 | } else | 969 | } else |
| 970 | cxgbi_sock_fail_act_open(csk, | 970 | cxgbi_sock_fail_act_open(csk, |
diff --git a/drivers/scsi/esas2r/esas2r_main.c b/drivers/scsi/esas2r/esas2r_main.c index 81f226be3e3b..4eb14301a497 100644 --- a/drivers/scsi/esas2r/esas2r_main.c +++ b/drivers/scsi/esas2r/esas2r_main.c | |||
| @@ -1631,23 +1631,21 @@ 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 | init_timer(&a->timer); | 1638 | timer_setup(&a->timer, esas2r_timer_callback, 0); |
| 1639 | 1639 | ||
| 1640 | a->timer.function = esas2r_timer_callback; | ||
| 1641 | a->timer.data = (unsigned long)a; | ||
| 1642 | a->timer.expires = jiffies + | 1640 | a->timer.expires = jiffies + |
| 1643 | msecs_to_jiffies(100); | 1641 | msecs_to_jiffies(100); |
| 1644 | 1642 | ||
| 1645 | add_timer(&a->timer); | 1643 | add_timer(&a->timer); |
| 1646 | } | 1644 | } |
| 1647 | 1645 | ||
| 1648 | static void esas2r_timer_callback(unsigned long context) | 1646 | static void esas2r_timer_callback(struct timer_list *t) |
| 1649 | { | 1647 | { |
| 1650 | struct esas2r_adapter *a = (struct esas2r_adapter *)context; | 1648 | struct esas2r_adapter *a = from_timer(a, t, timer); |
| 1651 | 1649 | ||
| 1652 | set_bit(AF2_TIMER_TICK, &a->flags2); | 1650 | set_bit(AF2_TIMER_TICK, &a->flags2); |
| 1653 | 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/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 61a85ff8e459..5f503cb09508 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c | |||
| @@ -839,7 +839,7 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, | |||
| 839 | } | 839 | } |
| 840 | task->task_done = hisi_sas_task_done; | 840 | task->task_done = hisi_sas_task_done; |
| 841 | 841 | ||
| 842 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)hisi_sas_tmf_timedout; | 842 | task->slow_task->timer.function = hisi_sas_tmf_timedout; |
| 843 | task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ; | 843 | task->slow_task->timer.expires = jiffies + TASK_TIMEOUT*HZ; |
| 844 | add_timer(&task->slow_task->timer); | 844 | add_timer(&task->slow_task->timer); |
| 845 | 845 | ||
| @@ -1451,7 +1451,7 @@ hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba, | |||
| 1451 | task->dev = device; | 1451 | task->dev = device; |
| 1452 | task->task_proto = device->tproto; | 1452 | task->task_proto = device->tproto; |
| 1453 | task->task_done = hisi_sas_task_done; | 1453 | task->task_done = hisi_sas_task_done; |
| 1454 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)hisi_sas_tmf_timedout; | 1454 | task->slow_task->timer.function = hisi_sas_tmf_timedout; |
| 1455 | task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110); | 1455 | task->slow_task->timer.expires = jiffies + msecs_to_jiffies(110); |
| 1456 | add_timer(&task->slow_task->timer); | 1456 | add_timer(&task->slow_task->timer); |
| 1457 | 1457 | ||
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index d02c2a791981..5d3467fd728d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | |||
| @@ -1268,7 +1268,7 @@ static void link_timeout_enable_link(struct timer_list *t) | |||
| 1268 | } | 1268 | } |
| 1269 | } | 1269 | } |
| 1270 | 1270 | ||
| 1271 | hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link; | 1271 | hisi_hba->timer.function = link_timeout_disable_link; |
| 1272 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900)); | 1272 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(900)); |
| 1273 | } | 1273 | } |
| 1274 | 1274 | ||
| @@ -1289,13 +1289,13 @@ static void link_timeout_disable_link(struct timer_list *t) | |||
| 1289 | } | 1289 | } |
| 1290 | } | 1290 | } |
| 1291 | 1291 | ||
| 1292 | hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_enable_link; | 1292 | hisi_hba->timer.function = link_timeout_enable_link; |
| 1293 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100)); | 1293 | mod_timer(&hisi_hba->timer, jiffies + msecs_to_jiffies(100)); |
| 1294 | } | 1294 | } |
| 1295 | 1295 | ||
| 1296 | static void set_link_timer_quirk(struct hisi_hba *hisi_hba) | 1296 | static void set_link_timer_quirk(struct hisi_hba *hisi_hba) |
| 1297 | { | 1297 | { |
| 1298 | hisi_hba->timer.function = (TIMER_FUNC_TYPE)link_timeout_disable_link; | 1298 | hisi_hba->timer.function = link_timeout_disable_link; |
| 1299 | hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000); | 1299 | hisi_hba->timer.expires = jiffies + msecs_to_jiffies(1000); |
| 1300 | add_timer(&hisi_hba->timer); | 1300 | add_timer(&hisi_hba->timer); |
| 1301 | } | 1301 | } |
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index d53429371127..cc0187965eee 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
| @@ -997,7 +997,7 @@ static void ipr_do_req(struct ipr_cmnd *ipr_cmd, | |||
| 997 | ipr_cmd->done = done; | 997 | ipr_cmd->done = done; |
| 998 | 998 | ||
| 999 | ipr_cmd->timer.expires = jiffies + timeout; | 999 | ipr_cmd->timer.expires = jiffies + timeout; |
| 1000 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)timeout_func; | 1000 | ipr_cmd->timer.function = timeout_func; |
| 1001 | 1001 | ||
| 1002 | add_timer(&ipr_cmd->timer); | 1002 | add_timer(&ipr_cmd->timer); |
| 1003 | 1003 | ||
| @@ -8312,7 +8312,7 @@ static void ipr_reset_start_timer(struct ipr_cmnd *ipr_cmd, | |||
| 8312 | ipr_cmd->done = ipr_reset_ioa_job; | 8312 | ipr_cmd->done = ipr_reset_ioa_job; |
| 8313 | 8313 | ||
| 8314 | ipr_cmd->timer.expires = jiffies + timeout; | 8314 | ipr_cmd->timer.expires = jiffies + timeout; |
| 8315 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_reset_timer_done; | 8315 | ipr_cmd->timer.function = ipr_reset_timer_done; |
| 8316 | add_timer(&ipr_cmd->timer); | 8316 | add_timer(&ipr_cmd->timer); |
| 8317 | } | 8317 | } |
| 8318 | 8318 | ||
| @@ -8397,7 +8397,7 @@ static int ipr_reset_next_stage(struct ipr_cmnd *ipr_cmd) | |||
| 8397 | } | 8397 | } |
| 8398 | 8398 | ||
| 8399 | ipr_cmd->timer.expires = jiffies + stage_time * HZ; | 8399 | ipr_cmd->timer.expires = jiffies + stage_time * HZ; |
| 8400 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_oper_timeout; | 8400 | ipr_cmd->timer.function = ipr_oper_timeout; |
| 8401 | ipr_cmd->done = ipr_reset_ioa_job; | 8401 | ipr_cmd->done = ipr_reset_ioa_job; |
| 8402 | add_timer(&ipr_cmd->timer); | 8402 | add_timer(&ipr_cmd->timer); |
| 8403 | 8403 | ||
| @@ -8468,7 +8468,7 @@ static int ipr_reset_enable_ioa(struct ipr_cmnd *ipr_cmd) | |||
| 8468 | } | 8468 | } |
| 8469 | 8469 | ||
| 8470 | ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ); | 8470 | ipr_cmd->timer.expires = jiffies + (ioa_cfg->transop_timeout * HZ); |
| 8471 | ipr_cmd->timer.function = (TIMER_FUNC_TYPE)ipr_oper_timeout; | 8471 | ipr_cmd->timer.function = ipr_oper_timeout; |
| 8472 | ipr_cmd->done = ipr_reset_ioa_job; | 8472 | ipr_cmd->done = ipr_reset_ioa_job; |
| 8473 | add_timer(&ipr_cmd->timer); | 8473 | add_timer(&ipr_cmd->timer); |
| 8474 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q); | 8474 | list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_pending_q); |
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 1a4e701a8449..4fae253d4f3d 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
| @@ -1214,7 +1214,7 @@ static int fc_fcp_cmd_send(struct fc_lport *lport, struct fc_fcp_pkt *fsp, | |||
| 1214 | fsp->seq_ptr = seq; | 1214 | fsp->seq_ptr = seq; |
| 1215 | fc_fcp_pkt_hold(fsp); /* hold for fc_fcp_pkt_destroy */ | 1215 | fc_fcp_pkt_hold(fsp); /* hold for fc_fcp_pkt_destroy */ |
| 1216 | 1216 | ||
| 1217 | fsp->timer.function = (TIMER_FUNC_TYPE)fc_fcp_timeout; | 1217 | fsp->timer.function = fc_fcp_timeout; |
| 1218 | if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) | 1218 | if (rpriv->flags & FC_RP_FLAGS_REC_SUPPORTED) |
| 1219 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); | 1219 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); |
| 1220 | 1220 | ||
| @@ -1307,7 +1307,7 @@ static void fc_lun_reset_send(struct timer_list *t) | |||
| 1307 | return; | 1307 | return; |
| 1308 | if (fc_fcp_lock_pkt(fsp)) | 1308 | if (fc_fcp_lock_pkt(fsp)) |
| 1309 | return; | 1309 | return; |
| 1310 | fsp->timer.function = (TIMER_FUNC_TYPE)fc_lun_reset_send; | 1310 | fsp->timer.function = fc_lun_reset_send; |
| 1311 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); | 1311 | fc_fcp_timer_set(fsp, get_fsp_rec_tov(fsp)); |
| 1312 | fc_fcp_unlock_pkt(fsp); | 1312 | fc_fcp_unlock_pkt(fsp); |
| 1313 | } | 1313 | } |
| @@ -1445,7 +1445,7 @@ static void fc_fcp_timeout(struct timer_list *t) | |||
| 1445 | if (fsp->lp->qfull) { | 1445 | if (fsp->lp->qfull) { |
| 1446 | FC_FCP_DBG(fsp, "fcp timeout, resetting timer delay %d\n", | 1446 | FC_FCP_DBG(fsp, "fcp timeout, resetting timer delay %d\n", |
| 1447 | fsp->timer_delay); | 1447 | fsp->timer_delay); |
| 1448 | fsp->timer.function = (TIMER_FUNC_TYPE)fc_fcp_timeout; | 1448 | fsp->timer.function = fc_fcp_timeout; |
| 1449 | fc_fcp_timer_set(fsp, fsp->timer_delay); | 1449 | fc_fcp_timer_set(fsp, fsp->timer_delay); |
| 1450 | goto unlock; | 1450 | goto unlock; |
| 1451 | } | 1451 | } |
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 174e5eff6155..ca1566237ae7 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
| @@ -92,7 +92,7 @@ static int smp_execute_task_sg(struct domain_device *dev, | |||
| 92 | 92 | ||
| 93 | task->task_done = smp_task_done; | 93 | task->task_done = smp_task_done; |
| 94 | 94 | ||
| 95 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)smp_task_timedout; | 95 | task->slow_task->timer.function = smp_task_timedout; |
| 96 | task->slow_task->timer.expires = jiffies + SMP_TIMEOUT*HZ; | 96 | task->slow_task->timer.expires = jiffies + SMP_TIMEOUT*HZ; |
| 97 | add_timer(&task->slow_task->timer); | 97 | add_timer(&task->slow_task->timer); |
| 98 | 98 | ||
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 91795eb56206..58476b728c57 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
| @@ -919,7 +919,7 @@ void sas_task_abort(struct sas_task *task) | |||
| 919 | return; | 919 | return; |
| 920 | if (!del_timer(&slow->timer)) | 920 | if (!del_timer(&slow->timer)) |
| 921 | return; | 921 | return; |
| 922 | slow->timer.function((TIMER_DATA_TYPE)&slow->timer); | 922 | slow->timer.function(&slow->timer); |
| 923 | return; | 923 | return; |
| 924 | } | 924 | } |
| 925 | 925 | ||
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c index cff1c37b8d2e..cff43bd9f675 100644 --- a/drivers/scsi/mvsas/mv_sas.c +++ b/drivers/scsi/mvsas/mv_sas.c | |||
| @@ -1310,7 +1310,7 @@ static int mvs_exec_internal_tmf_task(struct domain_device *dev, | |||
| 1310 | memcpy(&task->ssp_task, parameter, para_len); | 1310 | memcpy(&task->ssp_task, parameter, para_len); |
| 1311 | task->task_done = mvs_task_done; | 1311 | task->task_done = mvs_task_done; |
| 1312 | 1312 | ||
| 1313 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)mvs_tmf_timedout; | 1313 | task->slow_task->timer.function = mvs_tmf_timedout; |
| 1314 | task->slow_task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ; | 1314 | task->slow_task->timer.expires = jiffies + MVS_TASK_TIMEOUT*HZ; |
| 1315 | add_timer(&task->slow_task->timer); | 1315 | add_timer(&task->slow_task->timer); |
| 1316 | 1316 | ||
| @@ -2020,7 +2020,7 @@ void mvs_int_port(struct mvs_info *mvi, int phy_no, u32 events) | |||
| 2020 | MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no, | 2020 | MVS_CHIP_DISP->write_port_irq_mask(mvi, phy_no, |
| 2021 | tmp | PHYEV_SIG_FIS); | 2021 | tmp | PHYEV_SIG_FIS); |
| 2022 | if (phy->timer.function == NULL) { | 2022 | if (phy->timer.function == NULL) { |
| 2023 | phy->timer.function = (TIMER_FUNC_TYPE)mvs_sig_time_out; | 2023 | phy->timer.function = mvs_sig_time_out; |
| 2024 | phy->timer.expires = jiffies + 5*HZ; | 2024 | phy->timer.expires = jiffies + 5*HZ; |
| 2025 | add_timer(&phy->timer); | 2025 | add_timer(&phy->timer); |
| 2026 | } | 2026 | } |
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 5b93ed810f6e..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,9 +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 | init_timer(&np->timer); | 8360 | timer_setup(&np->timer, ncr53c8xx_timeout, 0); |
| 8361 | np->timer.data = (unsigned long) np; | ||
| 8362 | np->timer.function = ncr53c8xx_timeout; | ||
| 8363 | 8361 | ||
| 8364 | /* Try to map the controller chip to virtual and physical memory. */ | 8362 | /* Try to map the controller chip to virtual and physical memory. */ |
| 8365 | 8363 | ||
diff --git a/drivers/scsi/pm8001/pm8001_sas.c b/drivers/scsi/pm8001/pm8001_sas.c index 0e294e80c169..947d6017d004 100644 --- a/drivers/scsi/pm8001/pm8001_sas.c +++ b/drivers/scsi/pm8001/pm8001_sas.c | |||
| @@ -695,7 +695,7 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev, | |||
| 695 | task->task_proto = dev->tproto; | 695 | task->task_proto = dev->tproto; |
| 696 | memcpy(&task->ssp_task, parameter, para_len); | 696 | memcpy(&task->ssp_task, parameter, para_len); |
| 697 | task->task_done = pm8001_task_done; | 697 | task->task_done = pm8001_task_done; |
| 698 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)pm8001_tmf_timedout; | 698 | task->slow_task->timer.function = pm8001_tmf_timedout; |
| 699 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ; | 699 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT*HZ; |
| 700 | add_timer(&task->slow_task->timer); | 700 | add_timer(&task->slow_task->timer); |
| 701 | 701 | ||
| @@ -781,7 +781,7 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha, | |||
| 781 | task->dev = dev; | 781 | task->dev = dev; |
| 782 | task->task_proto = dev->tproto; | 782 | task->task_proto = dev->tproto; |
| 783 | task->task_done = pm8001_task_done; | 783 | task->task_done = pm8001_task_done; |
| 784 | task->slow_task->timer.function = (TIMER_FUNC_TYPE)pm8001_tmf_timedout; | 784 | task->slow_task->timer.function = pm8001_tmf_timedout; |
| 785 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ; | 785 | task->slow_task->timer.expires = jiffies + PM8001_TASK_TIMEOUT * HZ; |
| 786 | add_timer(&task->slow_task->timer); | 786 | add_timer(&task->slow_task->timer); |
| 787 | 787 | ||
diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index 4f9f115fb6a0..e58be98430b0 100644 --- a/drivers/scsi/pmcraid.c +++ b/drivers/scsi/pmcraid.c | |||
| @@ -604,7 +604,7 @@ static void pmcraid_start_bist(struct pmcraid_cmd *cmd) | |||
| 604 | 604 | ||
| 605 | cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); | 605 | cmd->time_left = msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); |
| 606 | cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); | 606 | cmd->timer.expires = jiffies + msecs_to_jiffies(PMCRAID_BIST_TIMEOUT); |
| 607 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_bist_done; | 607 | cmd->timer.function = pmcraid_bist_done; |
| 608 | add_timer(&cmd->timer); | 608 | add_timer(&cmd->timer); |
| 609 | } | 609 | } |
| 610 | 610 | ||
| @@ -636,7 +636,7 @@ static void pmcraid_reset_alert_done(struct timer_list *t) | |||
| 636 | /* restart timer if some more time is available to wait */ | 636 | /* restart timer if some more time is available to wait */ |
| 637 | cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT; | 637 | cmd->time_left -= PMCRAID_CHECK_FOR_RESET_TIMEOUT; |
| 638 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; | 638 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; |
| 639 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_reset_alert_done; | 639 | cmd->timer.function = pmcraid_reset_alert_done; |
| 640 | add_timer(&cmd->timer); | 640 | add_timer(&cmd->timer); |
| 641 | } | 641 | } |
| 642 | } | 642 | } |
| @@ -673,7 +673,7 @@ static void pmcraid_reset_alert(struct pmcraid_cmd *cmd) | |||
| 673 | */ | 673 | */ |
| 674 | cmd->time_left = PMCRAID_RESET_TIMEOUT; | 674 | cmd->time_left = PMCRAID_RESET_TIMEOUT; |
| 675 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; | 675 | cmd->timer.expires = jiffies + PMCRAID_CHECK_FOR_RESET_TIMEOUT; |
| 676 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_reset_alert_done; | 676 | cmd->timer.function = pmcraid_reset_alert_done; |
| 677 | add_timer(&cmd->timer); | 677 | add_timer(&cmd->timer); |
| 678 | 678 | ||
| 679 | iowrite32(DOORBELL_IOA_RESET_ALERT, | 679 | iowrite32(DOORBELL_IOA_RESET_ALERT, |
| @@ -923,7 +923,7 @@ static void pmcraid_send_cmd( | |||
| 923 | if (timeout_func) { | 923 | if (timeout_func) { |
| 924 | /* setup timeout handler */ | 924 | /* setup timeout handler */ |
| 925 | cmd->timer.expires = jiffies + timeout; | 925 | cmd->timer.expires = jiffies + timeout; |
| 926 | cmd->timer.function = (TIMER_FUNC_TYPE)timeout_func; | 926 | cmd->timer.function = timeout_func; |
| 927 | add_timer(&cmd->timer); | 927 | add_timer(&cmd->timer); |
| 928 | } | 928 | } |
| 929 | 929 | ||
| @@ -1951,7 +1951,7 @@ static void pmcraid_soft_reset(struct pmcraid_cmd *cmd) | |||
| 1951 | cmd->cmd_done = pmcraid_ioa_reset; | 1951 | cmd->cmd_done = pmcraid_ioa_reset; |
| 1952 | cmd->timer.expires = jiffies + | 1952 | cmd->timer.expires = jiffies + |
| 1953 | msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT); | 1953 | msecs_to_jiffies(PMCRAID_TRANSOP_TIMEOUT); |
| 1954 | cmd->timer.function = (TIMER_FUNC_TYPE)pmcraid_timeout_handler; | 1954 | cmd->timer.function = pmcraid_timeout_handler; |
| 1955 | 1955 | ||
| 1956 | if (!timer_pending(&cmd->timer)) | 1956 | if (!timer_pending(&cmd->timer)) |
| 1957 | add_timer(&cmd->timer); | 1957 | add_timer(&cmd->timer); |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index d32e3ba8863e..791a2182de53 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | |||
| @@ -565,9 +565,9 @@ static irqreturn_t sym53c8xx_intr(int irq, void *dev_id) | |||
| 565 | /* | 565 | /* |
| 566 | * Linux entry point of the timer handler | 566 | * Linux entry point of the timer handler |
| 567 | */ | 567 | */ |
| 568 | static void sym53c8xx_timer(unsigned long npref) | 568 | static void sym53c8xx_timer(struct timer_list *t) |
| 569 | { | 569 | { |
| 570 | struct sym_hcb *np = (struct sym_hcb *)npref; | 570 | struct sym_hcb *np = from_timer(np, t, s.timer); |
| 571 | unsigned long flags; | 571 | unsigned long flags; |
| 572 | 572 | ||
| 573 | spin_lock_irqsave(np->s.host->host_lock, flags); | 573 | spin_lock_irqsave(np->s.host->host_lock, flags); |
| @@ -1351,9 +1351,7 @@ static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit, | |||
| 1351 | /* | 1351 | /* |
| 1352 | * Start the timer daemon | 1352 | * Start the timer daemon |
| 1353 | */ | 1353 | */ |
| 1354 | init_timer(&np->s.timer); | 1354 | timer_setup(&np->s.timer, sym53c8xx_timer, 0); |
| 1355 | np->s.timer.data = (unsigned long) np; | ||
| 1356 | np->s.timer.function = sym53c8xx_timer; | ||
| 1357 | np->s.lasttime=0; | 1355 | np->s.lasttime=0; |
| 1358 | sym_timer (np); | 1356 | sym_timer (np); |
| 1359 | 1357 | ||
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/irda/include/net/irda/timer.h b/drivers/staging/irda/include/net/irda/timer.h index a6635f0afae9..6dab15f5dae1 100644 --- a/drivers/staging/irda/include/net/irda/timer.h +++ b/drivers/staging/irda/include/net/irda/timer.h | |||
| @@ -75,7 +75,7 @@ struct lap_cb; | |||
| 75 | static inline void irda_start_timer(struct timer_list *ptimer, int timeout, | 75 | static inline void irda_start_timer(struct timer_list *ptimer, int timeout, |
| 76 | void (*callback)(struct timer_list *)) | 76 | void (*callback)(struct timer_list *)) |
| 77 | { | 77 | { |
| 78 | ptimer->function = (TIMER_FUNC_TYPE) callback; | 78 | ptimer->function = callback; |
| 79 | 79 | ||
| 80 | /* Set new value for timer (update or add timer). | 80 | /* Set new value for timer (update or add timer). |
| 81 | * We use mod_timer() because it's more efficient and also | 81 | * We use mod_timer() because it's more efficient and also |
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/speakup/main.c b/drivers/staging/speakup/main.c index 16497202473f..aae868509e13 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c | |||
| @@ -1164,7 +1164,7 @@ static void spkup_write(const u16 *in_buf, int count) | |||
| 1164 | static const int NUM_CTL_LABELS = (MSG_CTL_END - MSG_CTL_START + 1); | 1164 | static const int NUM_CTL_LABELS = (MSG_CTL_END - MSG_CTL_START + 1); |
| 1165 | 1165 | ||
| 1166 | static void read_all_doc(struct vc_data *vc); | 1166 | static void read_all_doc(struct vc_data *vc); |
| 1167 | static void cursor_done(u_long data); | 1167 | static void cursor_done(struct timer_list *unused); |
| 1168 | static DEFINE_TIMER(cursor_timer, cursor_done); | 1168 | static DEFINE_TIMER(cursor_timer, cursor_done); |
| 1169 | 1169 | ||
| 1170 | static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag) | 1170 | static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag) |
| @@ -1682,7 +1682,7 @@ static int speak_highlight(struct vc_data *vc) | |||
| 1682 | return 0; | 1682 | return 0; |
| 1683 | } | 1683 | } |
| 1684 | 1684 | ||
| 1685 | static void cursor_done(u_long data) | 1685 | static void cursor_done(struct timer_list *unused) |
| 1686 | { | 1686 | { |
| 1687 | struct vc_data *vc = vc_cons[cursor_con].d; | 1687 | struct vc_data *vc = vc_cons[cursor_con].d; |
| 1688 | unsigned long flags; | 1688 | unsigned long flags; |
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c index 6ddd3fc3f08d..aac29c816d09 100644 --- a/drivers/staging/speakup/synth.c +++ b/drivers/staging/speakup/synth.c | |||
| @@ -153,7 +153,7 @@ int spk_synth_is_alive_restart(struct spk_synth *synth) | |||
| 153 | } | 153 | } |
| 154 | EXPORT_SYMBOL_GPL(spk_synth_is_alive_restart); | 154 | EXPORT_SYMBOL_GPL(spk_synth_is_alive_restart); |
| 155 | 155 | ||
| 156 | static void thread_wake_up(u_long data) | 156 | static void thread_wake_up(struct timer_list *unused) |
| 157 | { | 157 | { |
| 158 | wake_up_interruptible_all(&speakup_event); | 158 | wake_up_interruptible_all(&speakup_event); |
| 159 | } | 159 | } |
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 cc2468a299d3..a415d87f22d2 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c | |||
| @@ -1055,9 +1055,9 @@ static int tcmu_check_expired_cmd(int id, void *p, void *data) | |||
| 1055 | return 0; | 1055 | return 0; |
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | static void tcmu_device_timedout(unsigned long data) | 1058 | static void tcmu_device_timedout(struct timer_list *t) |
| 1059 | { | 1059 | { |
| 1060 | struct tcmu_dev *udev = (struct tcmu_dev *)data; | 1060 | struct tcmu_dev *udev = from_timer(udev, t, timeout); |
| 1061 | unsigned long flags; | 1061 | unsigned long flags; |
| 1062 | 1062 | ||
| 1063 | spin_lock_irqsave(&udev->commands_lock, flags); | 1063 | spin_lock_irqsave(&udev->commands_lock, flags); |
| @@ -1117,8 +1117,7 @@ static struct se_device *tcmu_alloc_device(struct se_hba *hba, const char *name) | |||
| 1117 | idr_init(&udev->commands); | 1117 | idr_init(&udev->commands); |
| 1118 | spin_lock_init(&udev->commands_lock); | 1118 | spin_lock_init(&udev->commands_lock); |
| 1119 | 1119 | ||
| 1120 | setup_timer(&udev->timeout, tcmu_device_timedout, | 1120 | timer_setup(&udev->timeout, tcmu_device_timedout, 0); |
| 1121 | (unsigned long)udev); | ||
| 1122 | 1121 | ||
| 1123 | init_waitqueue_head(&udev->nl_cmd_wq); | 1122 | init_waitqueue_head(&udev->nl_cmd_wq); |
| 1124 | spin_lock_init(&udev->nl_cmd_lock); | 1123 | spin_lock_init(&udev->nl_cmd_lock); |
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c index 5d442469c95e..cf0bde3bb927 100644 --- a/drivers/tty/cyclades.c +++ b/drivers/tty/cyclades.c | |||
| @@ -279,7 +279,7 @@ static unsigned detect_isa_irq(void __iomem *); | |||
| 279 | #endif /* CONFIG_ISA */ | 279 | #endif /* CONFIG_ISA */ |
| 280 | 280 | ||
| 281 | #ifndef CONFIG_CYZ_INTR | 281 | #ifndef CONFIG_CYZ_INTR |
| 282 | static void cyz_poll(unsigned long); | 282 | static void cyz_poll(struct timer_list *); |
| 283 | 283 | ||
| 284 | /* The Cyclades-Z polling cycle is defined by this variable */ | 284 | /* The Cyclades-Z polling cycle is defined by this variable */ |
| 285 | static long cyz_polling_cycle = CZ_DEF_POLL; | 285 | static long cyz_polling_cycle = CZ_DEF_POLL; |
| @@ -1214,7 +1214,7 @@ static void cyz_rx_restart(struct timer_list *t) | |||
| 1214 | 1214 | ||
| 1215 | #else /* CONFIG_CYZ_INTR */ | 1215 | #else /* CONFIG_CYZ_INTR */ |
| 1216 | 1216 | ||
| 1217 | static void cyz_poll(unsigned long arg) | 1217 | static void cyz_poll(struct timer_list *unused) |
| 1218 | { | 1218 | { |
| 1219 | struct cyclades_card *cinfo; | 1219 | struct cyclades_card *cinfo; |
| 1220 | struct cyclades_port *info; | 1220 | struct cyclades_port *info; |
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/isicom.c b/drivers/tty/isicom.c index ee7958ab269f..015686ff4825 100644 --- a/drivers/tty/isicom.c +++ b/drivers/tty/isicom.c | |||
| @@ -170,7 +170,7 @@ static struct pci_driver isicom_driver = { | |||
| 170 | static int prev_card = 3; /* start servicing isi_card[0] */ | 170 | static int prev_card = 3; /* start servicing isi_card[0] */ |
| 171 | static struct tty_driver *isicom_normal; | 171 | static struct tty_driver *isicom_normal; |
| 172 | 172 | ||
| 173 | static void isicom_tx(unsigned long _data); | 173 | static void isicom_tx(struct timer_list *unused); |
| 174 | static void isicom_start(struct tty_struct *tty); | 174 | static void isicom_start(struct tty_struct *tty); |
| 175 | 175 | ||
| 176 | static DEFINE_TIMER(tx, isicom_tx); | 176 | static DEFINE_TIMER(tx, isicom_tx); |
| @@ -394,7 +394,7 @@ static inline int __isicom_paranoia_check(struct isi_port const *port, | |||
| 394 | * will do the rest of the work for us. | 394 | * will do the rest of the work for us. |
| 395 | */ | 395 | */ |
| 396 | 396 | ||
| 397 | static void isicom_tx(unsigned long _data) | 397 | static void isicom_tx(struct timer_list *unused) |
| 398 | { | 398 | { |
| 399 | unsigned long flags, base; | 399 | unsigned long flags, base; |
| 400 | unsigned int retries; | 400 | unsigned int retries; |
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 65a70f3c7cde..68cbc03aab4b 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c | |||
| @@ -198,7 +198,7 @@ static void moxa_hangup(struct tty_struct *); | |||
| 198 | static int moxa_tiocmget(struct tty_struct *tty); | 198 | static int moxa_tiocmget(struct tty_struct *tty); |
| 199 | static int moxa_tiocmset(struct tty_struct *tty, | 199 | static int moxa_tiocmset(struct tty_struct *tty, |
| 200 | unsigned int set, unsigned int clear); | 200 | unsigned int set, unsigned int clear); |
| 201 | static void moxa_poll(unsigned long); | 201 | static void moxa_poll(struct timer_list *); |
| 202 | static void moxa_set_tty_param(struct tty_struct *, struct ktermios *); | 202 | static void moxa_set_tty_param(struct tty_struct *, struct ktermios *); |
| 203 | static void moxa_shutdown(struct tty_port *); | 203 | static void moxa_shutdown(struct tty_port *); |
| 204 | static int moxa_carrier_raised(struct tty_port *); | 204 | static int moxa_carrier_raised(struct tty_port *); |
| @@ -1429,7 +1429,7 @@ put: | |||
| 1429 | return 0; | 1429 | return 0; |
| 1430 | } | 1430 | } |
| 1431 | 1431 | ||
| 1432 | static void moxa_poll(unsigned long ignored) | 1432 | static void moxa_poll(struct timer_list *unused) |
| 1433 | { | 1433 | { |
| 1434 | struct moxa_board_conf *brd; | 1434 | struct moxa_board_conf *brd; |
| 1435 | u16 __iomem *ip; | 1435 | u16 __iomem *ip; |
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/rocket.c b/drivers/tty/rocket.c index f7dc9b1ea806..bdd17d2aaafd 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c | |||
| @@ -86,7 +86,7 @@ | |||
| 86 | 86 | ||
| 87 | /****** RocketPort Local Variables ******/ | 87 | /****** RocketPort Local Variables ******/ |
| 88 | 88 | ||
| 89 | static void rp_do_poll(unsigned long dummy); | 89 | static void rp_do_poll(struct timer_list *unused); |
| 90 | 90 | ||
| 91 | static struct tty_driver *rocket_driver; | 91 | static struct tty_driver *rocket_driver; |
| 92 | 92 | ||
| @@ -525,7 +525,7 @@ static void rp_handle_port(struct r_port *info) | |||
| 525 | /* | 525 | /* |
| 526 | * The top level polling routine. Repeats every 1/100 HZ (10ms). | 526 | * The top level polling routine. Repeats every 1/100 HZ (10ms). |
| 527 | */ | 527 | */ |
| 528 | static void rp_do_poll(unsigned long dummy) | 528 | static void rp_do_poll(struct timer_list *unused) |
| 529 | { | 529 | { |
| 530 | CONTROLLER_t *ctlp; | 530 | CONTROLLER_t *ctlp; |
| 531 | int ctrl, aiop, ch, line; | 531 | int ctrl, aiop, ch, line; |
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index d64afdd93872..9342fc2ee7df 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
| @@ -325,7 +325,7 @@ static int univ8250_setup_irq(struct uart_8250_port *up) | |||
| 325 | if (up->bugs & UART_BUG_THRE) { | 325 | if (up->bugs & UART_BUG_THRE) { |
| 326 | pr_debug("ttyS%d - using backup timer\n", serial_index(port)); | 326 | pr_debug("ttyS%d - using backup timer\n", serial_index(port)); |
| 327 | 327 | ||
| 328 | up->timer.function = (TIMER_FUNC_TYPE)serial8250_backup_timeout; | 328 | up->timer.function = serial8250_backup_timeout; |
| 329 | mod_timer(&up->timer, jiffies + | 329 | mod_timer(&up->timer, jiffies + |
| 330 | uart_poll_timeout(port) + HZ / 5); | 330 | uart_poll_timeout(port) + HZ / 5); |
| 331 | } | 331 | } |
| @@ -348,7 +348,7 @@ static void univ8250_release_irq(struct uart_8250_port *up) | |||
| 348 | struct uart_port *port = &up->port; | 348 | struct uart_port *port = &up->port; |
| 349 | 349 | ||
| 350 | del_timer_sync(&up->timer); | 350 | del_timer_sync(&up->timer); |
| 351 | up->timer.function = (TIMER_FUNC_TYPE)serial8250_timeout; | 351 | up->timer.function = serial8250_timeout; |
| 352 | if (port->irq) | 352 | if (port->irq) |
| 353 | serial_unlink_irq_chain(up); | 353 | serial_unlink_irq_chain(up); |
| 354 | } | 354 | } |
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/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index c8d90d7e7e37..5d412df8e943 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c | |||
| @@ -244,7 +244,7 @@ static int kd_sound_helper(struct input_handle *handle, void *data) | |||
| 244 | return 0; | 244 | return 0; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | static void kd_nosound(unsigned long ignored) | 247 | static void kd_nosound(struct timer_list *unused) |
| 248 | { | 248 | { |
| 249 | static unsigned int zero; | 249 | static unsigned int zero; |
| 250 | 250 | ||
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index bce4c71cb338..88b902c525d7 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c | |||
| @@ -158,7 +158,7 @@ static void set_cursor(struct vc_data *vc); | |||
| 158 | static void hide_cursor(struct vc_data *vc); | 158 | static void hide_cursor(struct vc_data *vc); |
| 159 | static void console_callback(struct work_struct *ignored); | 159 | static void console_callback(struct work_struct *ignored); |
| 160 | static void con_driver_unregister_callback(struct work_struct *ignored); | 160 | static void con_driver_unregister_callback(struct work_struct *ignored); |
| 161 | static void blank_screen_t(unsigned long dummy); | 161 | static void blank_screen_t(struct timer_list *unused); |
| 162 | static void set_palette(struct vc_data *vc); | 162 | static void set_palette(struct vc_data *vc); |
| 163 | 163 | ||
| 164 | #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1) | 164 | #define vt_get_kmsg_redirect() vt_kmsg_redirect(-1) |
| @@ -3929,7 +3929,7 @@ void unblank_screen(void) | |||
| 3929 | * (console operations can still happen at irq time, but only from printk which | 3929 | * (console operations can still happen at irq time, but only from printk which |
| 3930 | * has the console mutex. Not perfect yet, but better than no locking | 3930 | * has the console mutex. Not perfect yet, but better than no locking |
| 3931 | */ | 3931 | */ |
| 3932 | static void blank_screen_t(unsigned long dummy) | 3932 | static void blank_screen_t(struct timer_list *unused) |
| 3933 | { | 3933 | { |
| 3934 | blank_timer_expired = 1; | 3934 | blank_timer_expired = 1; |
| 3935 | schedule_work(&console_work); | 3935 | schedule_work(&console_work); |
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 6470d259b7d8..8af797252af2 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c | |||
| @@ -547,21 +547,30 @@ static void cxacru_blocking_completion(struct urb *urb) | |||
| 547 | complete(urb->context); | 547 | complete(urb->context); |
| 548 | } | 548 | } |
| 549 | 549 | ||
| 550 | static void cxacru_timeout_kill(unsigned long data) | 550 | struct cxacru_timer { |
| 551 | struct timer_list timer; | ||
| 552 | struct urb *urb; | ||
| 553 | }; | ||
| 554 | |||
| 555 | static void cxacru_timeout_kill(struct timer_list *t) | ||
| 551 | { | 556 | { |
| 552 | usb_unlink_urb((struct urb *) data); | 557 | struct cxacru_timer *timer = from_timer(timer, t, timer); |
| 558 | |||
| 559 | usb_unlink_urb(timer->urb); | ||
| 553 | } | 560 | } |
| 554 | 561 | ||
| 555 | static int cxacru_start_wait_urb(struct urb *urb, struct completion *done, | 562 | static int cxacru_start_wait_urb(struct urb *urb, struct completion *done, |
| 556 | int *actual_length) | 563 | int *actual_length) |
| 557 | { | 564 | { |
| 558 | struct timer_list timer; | 565 | struct cxacru_timer timer = { |
| 566 | .urb = urb, | ||
| 567 | }; | ||
| 559 | 568 | ||
| 560 | setup_timer(&timer, cxacru_timeout_kill, (unsigned long)urb); | 569 | timer_setup_on_stack(&timer.timer, cxacru_timeout_kill, 0); |
| 561 | timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT); | 570 | mod_timer(&timer.timer, jiffies + msecs_to_jiffies(CMD_TIMEOUT)); |
| 562 | add_timer(&timer); | ||
| 563 | wait_for_completion(done); | 571 | wait_for_completion(done); |
| 564 | del_timer_sync(&timer); | 572 | del_timer_sync(&timer.timer); |
| 573 | destroy_timer_on_stack(&timer.timer); | ||
| 565 | 574 | ||
| 566 | if (actual_length) | 575 | if (actual_length) |
| 567 | *actual_length = urb->actual_length; | 576 | *actual_length = urb->actual_length; |
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 5a5e8c0aaa39..973548b5c15c 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
| @@ -557,9 +557,10 @@ static void speedtch_check_status(struct work_struct *work) | |||
| 557 | } | 557 | } |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | static void speedtch_status_poll(unsigned long data) | 560 | static void speedtch_status_poll(struct timer_list *t) |
| 561 | { | 561 | { |
| 562 | struct speedtch_instance_data *instance = (void *)data; | 562 | struct speedtch_instance_data *instance = from_timer(instance, t, |
| 563 | status_check_timer); | ||
| 563 | 564 | ||
| 564 | schedule_work(&instance->status_check_work); | 565 | schedule_work(&instance->status_check_work); |
| 565 | 566 | ||
| @@ -570,9 +571,10 @@ static void speedtch_status_poll(unsigned long data) | |||
| 570 | atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n"); | 571 | atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n"); |
| 571 | } | 572 | } |
| 572 | 573 | ||
| 573 | static void speedtch_resubmit_int(unsigned long data) | 574 | static void speedtch_resubmit_int(struct timer_list *t) |
| 574 | { | 575 | { |
| 575 | struct speedtch_instance_data *instance = (void *)data; | 576 | struct speedtch_instance_data *instance = from_timer(instance, t, |
| 577 | resubmit_timer); | ||
| 576 | struct urb *int_urb = instance->int_urb; | 578 | struct urb *int_urb = instance->int_urb; |
| 577 | int ret; | 579 | int ret; |
| 578 | 580 | ||
| @@ -860,13 +862,11 @@ static int speedtch_bind(struct usbatm_data *usbatm, | |||
| 860 | usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); | 862 | usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); |
| 861 | 863 | ||
| 862 | INIT_WORK(&instance->status_check_work, speedtch_check_status); | 864 | INIT_WORK(&instance->status_check_work, speedtch_check_status); |
| 863 | setup_timer(&instance->status_check_timer, speedtch_status_poll, | 865 | timer_setup(&instance->status_check_timer, speedtch_status_poll, 0); |
| 864 | (unsigned long)instance); | ||
| 865 | instance->last_status = 0xff; | 866 | instance->last_status = 0xff; |
| 866 | instance->poll_delay = MIN_POLL_DELAY; | 867 | instance->poll_delay = MIN_POLL_DELAY; |
| 867 | 868 | ||
| 868 | setup_timer(&instance->resubmit_timer, speedtch_resubmit_int, | 869 | timer_setup(&instance->resubmit_timer, speedtch_resubmit_int, 0); |
| 869 | (unsigned long)instance); | ||
| 870 | 870 | ||
| 871 | instance->int_urb = usb_alloc_urb(0, GFP_KERNEL); | 871 | instance->int_urb = usb_alloc_urb(0, GFP_KERNEL); |
| 872 | 872 | ||
diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index 044264aa1f96..dbea28495e1d 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c | |||
| @@ -989,18 +989,18 @@ static int usbatm_heavy_init(struct usbatm_data *instance) | |||
| 989 | return 0; | 989 | return 0; |
| 990 | } | 990 | } |
| 991 | 991 | ||
| 992 | static void usbatm_tasklet_schedule(unsigned long data) | 992 | static void usbatm_tasklet_schedule(struct timer_list *t) |
| 993 | { | 993 | { |
| 994 | tasklet_schedule((struct tasklet_struct *) data); | 994 | struct usbatm_channel *channel = from_timer(channel, t, delay); |
| 995 | |||
| 996 | tasklet_schedule(&channel->tasklet); | ||
| 995 | } | 997 | } |
| 996 | 998 | ||
| 997 | static void usbatm_init_channel(struct usbatm_channel *channel) | 999 | static void usbatm_init_channel(struct usbatm_channel *channel) |
| 998 | { | 1000 | { |
| 999 | spin_lock_init(&channel->lock); | 1001 | spin_lock_init(&channel->lock); |
| 1000 | INIT_LIST_HEAD(&channel->list); | 1002 | INIT_LIST_HEAD(&channel->list); |
| 1001 | channel->delay.function = usbatm_tasklet_schedule; | 1003 | timer_setup(&channel->delay, usbatm_tasklet_schedule, 0); |
| 1002 | channel->delay.data = (unsigned long) &channel->tasklet; | ||
| 1003 | init_timer(&channel->delay); | ||
| 1004 | } | 1004 | } |
| 1005 | 1005 | ||
| 1006 | int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, | 1006 | int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, |
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 fc7f810baef7..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,9 +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 | init_timer(&ep->timer); | 2545 | timer_setup(&ep->timer, pio_out_timer, 0); |
| 2546 | ep->timer.function = pio_out_timer; | ||
| 2547 | ep->timer.data = (unsigned long) ep; | ||
| 2548 | } | 2546 | } |
| 2549 | if (addr) | 2547 | if (addr) |
| 2550 | 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/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c index 18e896eeca62..12f7ea62dddd 100644 --- a/drivers/watchdog/alim7101_wdt.c +++ b/drivers/watchdog/alim7101_wdt.c | |||
| @@ -70,7 +70,7 @@ module_param(use_gpio, int, 0); | |||
| 70 | MODULE_PARM_DESC(use_gpio, | 70 | MODULE_PARM_DESC(use_gpio, |
| 71 | "Use the gpio watchdog (required by old cobalt boards)."); | 71 | "Use the gpio watchdog (required by old cobalt boards)."); |
| 72 | 72 | ||
| 73 | static void wdt_timer_ping(unsigned long); | 73 | static void wdt_timer_ping(struct timer_list *); |
| 74 | static DEFINE_TIMER(timer, wdt_timer_ping); | 74 | static DEFINE_TIMER(timer, wdt_timer_ping); |
| 75 | static unsigned long next_heartbeat; | 75 | static unsigned long next_heartbeat; |
| 76 | static unsigned long wdt_is_open; | 76 | static unsigned long wdt_is_open; |
| @@ -87,7 +87,7 @@ MODULE_PARM_DESC(nowayout, | |||
| 87 | * Whack the dog | 87 | * Whack the dog |
| 88 | */ | 88 | */ |
| 89 | 89 | ||
| 90 | static void wdt_timer_ping(unsigned long unused) | 90 | static void wdt_timer_ping(struct timer_list *unused) |
| 91 | { | 91 | { |
| 92 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL | 92 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL |
| 93 | * we agree to ping the WDT | 93 | * we agree to ping the WDT |
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/machzwd.c b/drivers/watchdog/machzwd.c index 8a616a57bb90..88d823d87a4b 100644 --- a/drivers/watchdog/machzwd.c +++ b/drivers/watchdog/machzwd.c | |||
| @@ -121,7 +121,7 @@ module_param(action, int, 0); | |||
| 121 | MODULE_PARM_DESC(action, "after watchdog resets, generate: " | 121 | MODULE_PARM_DESC(action, "after watchdog resets, generate: " |
| 122 | "0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI"); | 122 | "0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI"); |
| 123 | 123 | ||
| 124 | static void zf_ping(unsigned long data); | 124 | static void zf_ping(struct timer_list *unused); |
| 125 | 125 | ||
| 126 | static int zf_action = GEN_RESET; | 126 | static int zf_action = GEN_RESET; |
| 127 | static unsigned long zf_is_open; | 127 | static unsigned long zf_is_open; |
| @@ -237,7 +237,7 @@ static void zf_timer_on(void) | |||
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | 239 | ||
| 240 | static void zf_ping(unsigned long data) | 240 | static void zf_ping(struct timer_list *unused) |
| 241 | { | 241 | { |
| 242 | unsigned int ctrl_reg = 0; | 242 | unsigned int ctrl_reg = 0; |
| 243 | unsigned long flags; | 243 | unsigned long flags; |
diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c index c9e38096ea91..3cc07447c655 100644 --- a/drivers/watchdog/mixcomwd.c +++ b/drivers/watchdog/mixcomwd.c | |||
| @@ -99,7 +99,7 @@ static struct { | |||
| 99 | {0x0000, 0}, | 99 | {0x0000, 0}, |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | static void mixcomwd_timerfun(unsigned long d); | 102 | static void mixcomwd_timerfun(struct timer_list *unused); |
| 103 | 103 | ||
| 104 | static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */ | 104 | static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */ |
| 105 | 105 | ||
| @@ -120,7 +120,7 @@ static void mixcomwd_ping(void) | |||
| 120 | return; | 120 | return; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | static void mixcomwd_timerfun(unsigned long d) | 123 | static void mixcomwd_timerfun(struct timer_list *unused) |
| 124 | { | 124 | { |
| 125 | mixcomwd_ping(); | 125 | mixcomwd_ping(); |
| 126 | mod_timer(&mixcomwd_timer, jiffies + 5 * HZ); | 126 | mod_timer(&mixcomwd_timer, jiffies + 5 * HZ); |
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/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c index 8d589939bc84..87333a41f753 100644 --- a/drivers/watchdog/sbc60xxwdt.c +++ b/drivers/watchdog/sbc60xxwdt.c | |||
| @@ -112,7 +112,7 @@ MODULE_PARM_DESC(nowayout, | |||
| 112 | "Watchdog cannot be stopped once started (default=" | 112 | "Watchdog cannot be stopped once started (default=" |
| 113 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 113 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
| 114 | 114 | ||
| 115 | static void wdt_timer_ping(unsigned long); | 115 | static void wdt_timer_ping(struct timer_list *); |
| 116 | static DEFINE_TIMER(timer, wdt_timer_ping); | 116 | static DEFINE_TIMER(timer, wdt_timer_ping); |
| 117 | static unsigned long next_heartbeat; | 117 | static unsigned long next_heartbeat; |
| 118 | static unsigned long wdt_is_open; | 118 | static unsigned long wdt_is_open; |
| @@ -122,7 +122,7 @@ static char wdt_expect_close; | |||
| 122 | * Whack the dog | 122 | * Whack the dog |
| 123 | */ | 123 | */ |
| 124 | 124 | ||
| 125 | static void wdt_timer_ping(unsigned long data) | 125 | static void wdt_timer_ping(struct timer_list *unused) |
| 126 | { | 126 | { |
| 127 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL | 127 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL |
| 128 | * we agree to ping the WDT | 128 | * we agree to ping the WDT |
diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c index 3e9bbaa37bf4..6aadb56e7faa 100644 --- a/drivers/watchdog/sc520_wdt.c +++ b/drivers/watchdog/sc520_wdt.c | |||
| @@ -123,7 +123,7 @@ MODULE_PARM_DESC(nowayout, | |||
| 123 | 123 | ||
| 124 | static __u16 __iomem *wdtmrctl; | 124 | static __u16 __iomem *wdtmrctl; |
| 125 | 125 | ||
| 126 | static void wdt_timer_ping(unsigned long); | 126 | static void wdt_timer_ping(struct timer_list *); |
| 127 | static DEFINE_TIMER(timer, wdt_timer_ping); | 127 | static DEFINE_TIMER(timer, wdt_timer_ping); |
| 128 | static unsigned long next_heartbeat; | 128 | static unsigned long next_heartbeat; |
| 129 | static unsigned long wdt_is_open; | 129 | static unsigned long wdt_is_open; |
| @@ -134,7 +134,7 @@ static DEFINE_SPINLOCK(wdt_spinlock); | |||
| 134 | * Whack the dog | 134 | * Whack the dog |
| 135 | */ | 135 | */ |
| 136 | 136 | ||
| 137 | static void wdt_timer_ping(unsigned long data) | 137 | static void wdt_timer_ping(struct timer_list *unused) |
| 138 | { | 138 | { |
| 139 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL | 139 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL |
| 140 | * we agree to ping the WDT | 140 | * we agree to ping the WDT |
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/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c index ad3c3be13b40..b085ef1084ec 100644 --- a/drivers/watchdog/via_wdt.c +++ b/drivers/watchdog/via_wdt.c | |||
| @@ -67,7 +67,7 @@ static struct watchdog_device wdt_dev; | |||
| 67 | static struct resource wdt_res; | 67 | static struct resource wdt_res; |
| 68 | static void __iomem *wdt_mem; | 68 | static void __iomem *wdt_mem; |
| 69 | static unsigned int mmio; | 69 | static unsigned int mmio; |
| 70 | static void wdt_timer_tick(unsigned long data); | 70 | static void wdt_timer_tick(struct timer_list *unused); |
| 71 | static DEFINE_TIMER(timer, wdt_timer_tick); | 71 | static DEFINE_TIMER(timer, wdt_timer_tick); |
| 72 | /* The timer that pings the watchdog */ | 72 | /* The timer that pings the watchdog */ |
| 73 | static unsigned long next_heartbeat; /* the next_heartbeat for the timer */ | 73 | static unsigned long next_heartbeat; /* the next_heartbeat for the timer */ |
| @@ -88,7 +88,7 @@ static inline void wdt_reset(void) | |||
| 88 | * then the external/userspace heartbeat). | 88 | * then the external/userspace heartbeat). |
| 89 | * 2) the watchdog timer has been stopped by userspace. | 89 | * 2) the watchdog timer has been stopped by userspace. |
| 90 | */ | 90 | */ |
| 91 | static void wdt_timer_tick(unsigned long data) | 91 | static void wdt_timer_tick(struct timer_list *unused) |
| 92 | { | 92 | { |
| 93 | if (time_before(jiffies, next_heartbeat) || | 93 | if (time_before(jiffies, next_heartbeat) || |
| 94 | (!watchdog_active(&wdt_dev))) { | 94 | (!watchdog_active(&wdt_dev))) { |
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c index ba6b680af100..05658ecc0aa4 100644 --- a/drivers/watchdog/w83877f_wdt.c +++ b/drivers/watchdog/w83877f_wdt.c | |||
| @@ -97,7 +97,7 @@ MODULE_PARM_DESC(nowayout, | |||
| 97 | "Watchdog cannot be stopped once started (default=" | 97 | "Watchdog cannot be stopped once started (default=" |
| 98 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 98 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); |
| 99 | 99 | ||
| 100 | static void wdt_timer_ping(unsigned long); | 100 | static void wdt_timer_ping(struct timer_list *); |
| 101 | static DEFINE_TIMER(timer, wdt_timer_ping); | 101 | static DEFINE_TIMER(timer, wdt_timer_ping); |
| 102 | static unsigned long next_heartbeat; | 102 | static unsigned long next_heartbeat; |
| 103 | static unsigned long wdt_is_open; | 103 | static unsigned long wdt_is_open; |
| @@ -108,7 +108,7 @@ static DEFINE_SPINLOCK(wdt_spinlock); | |||
| 108 | * Whack the dog | 108 | * Whack the dog |
| 109 | */ | 109 | */ |
| 110 | 110 | ||
| 111 | static void wdt_timer_ping(unsigned long data) | 111 | static void wdt_timer_ping(struct timer_list *unused) |
| 112 | { | 112 | { |
| 113 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL | 113 | /* If we got a heartbeat pulse within the WDT_US_INTERVAL |
| 114 | * we agree to ping the WDT | 114 | * we agree to ping the WDT |
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 139e018a82b0..f45114fd8e1e 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
| @@ -358,10 +358,10 @@ struct deferred_entry { | |||
| 358 | struct page *page; | 358 | struct page *page; |
| 359 | }; | 359 | }; |
| 360 | static LIST_HEAD(deferred_list); | 360 | static LIST_HEAD(deferred_list); |
| 361 | static void gnttab_handle_deferred(unsigned long); | 361 | static void gnttab_handle_deferred(struct timer_list *); |
| 362 | static DEFINE_TIMER(deferred_timer, gnttab_handle_deferred); | 362 | static DEFINE_TIMER(deferred_timer, gnttab_handle_deferred); |
| 363 | 363 | ||
| 364 | static void gnttab_handle_deferred(unsigned long unused) | 364 | static void gnttab_handle_deferred(struct timer_list *unused) |
| 365 | { | 365 | { |
| 366 | unsigned int nr = 10; | 366 | unsigned int nr = 10; |
| 367 | struct deferred_entry *first = NULL; | 367 | struct deferred_entry *first = NULL; |
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/fs/pstore/platform.c b/fs/pstore/platform.c index 423159abd501..691032107f8c 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c | |||
| @@ -61,7 +61,7 @@ MODULE_PARM_DESC(update_ms, "milliseconds before pstore updates its content " | |||
| 61 | 61 | ||
| 62 | static int pstore_new_entry; | 62 | static int pstore_new_entry; |
| 63 | 63 | ||
| 64 | static void pstore_timefunc(unsigned long); | 64 | static void pstore_timefunc(struct timer_list *); |
| 65 | static DEFINE_TIMER(pstore_timer, pstore_timefunc); | 65 | static DEFINE_TIMER(pstore_timer, pstore_timefunc); |
| 66 | 66 | ||
| 67 | static void pstore_dowork(struct work_struct *); | 67 | static void pstore_dowork(struct work_struct *); |
| @@ -890,7 +890,7 @@ static void pstore_dowork(struct work_struct *work) | |||
| 890 | pstore_get_records(1); | 890 | pstore_get_records(1); |
| 891 | } | 891 | } |
| 892 | 892 | ||
| 893 | static void pstore_timefunc(unsigned long dummy) | 893 | static void pstore_timefunc(struct timer_list *unused) |
| 894 | { | 894 | { |
| 895 | if (pstore_new_entry) { | 895 | if (pstore_new_entry) { |
| 896 | pstore_new_entry = 0; | 896 | pstore_new_entry = 0; |
diff --git a/include/linux/kthread.h b/include/linux/kthread.h index 3203e36b2ee8..c1961761311d 100644 --- a/include/linux/kthread.h +++ b/include/linux/kthread.h | |||
| @@ -118,8 +118,7 @@ struct kthread_delayed_work { | |||
| 118 | 118 | ||
| 119 | #define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \ | 119 | #define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \ |
| 120 | .work = KTHREAD_WORK_INIT((dwork).work, (fn)), \ | 120 | .work = KTHREAD_WORK_INIT((dwork).work, (fn)), \ |
| 121 | .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn,\ | 121 | .timer = __TIMER_INITIALIZER(kthread_delayed_work_timer_fn,\ |
| 122 | (TIMER_DATA_TYPE)&(dwork.timer), \ | ||
| 123 | TIMER_IRQSAFE), \ | 122 | TIMER_IRQSAFE), \ |
| 124 | } | 123 | } |
| 125 | 124 | ||
| @@ -165,10 +164,9 @@ extern void __kthread_init_worker(struct kthread_worker *worker, | |||
| 165 | #define kthread_init_delayed_work(dwork, fn) \ | 164 | #define kthread_init_delayed_work(dwork, fn) \ |
| 166 | do { \ | 165 | do { \ |
| 167 | kthread_init_work(&(dwork)->work, (fn)); \ | 166 | kthread_init_work(&(dwork)->work, (fn)); \ |
| 168 | __setup_timer(&(dwork)->timer, \ | 167 | __init_timer(&(dwork)->timer, \ |
| 169 | (TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn,\ | 168 | kthread_delayed_work_timer_fn, \ |
| 170 | (TIMER_DATA_TYPE)&(dwork)->timer, \ | 169 | TIMER_IRQSAFE); \ |
| 171 | TIMER_IRQSAFE); \ | ||
| 172 | } while (0) | 170 | } while (0) |
| 173 | 171 | ||
| 174 | int kthread_worker_fn(void *worker_ptr); | 172 | int kthread_worker_fn(void *worker_ptr); |
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h index 7e9011101cb0..d315c3d6725c 100644 --- a/include/linux/timekeeper_internal.h +++ b/include/linux/timekeeper_internal.h | |||
| @@ -136,13 +136,6 @@ struct timekeeper { | |||
| 136 | extern void update_vsyscall(struct timekeeper *tk); | 136 | extern void update_vsyscall(struct timekeeper *tk); |
| 137 | extern void update_vsyscall_tz(void); | 137 | extern void update_vsyscall_tz(void); |
| 138 | 138 | ||
| 139 | #elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD) | ||
| 140 | |||
| 141 | extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm, | ||
| 142 | struct clocksource *c, u32 mult, | ||
| 143 | u64 cycle_last); | ||
| 144 | extern void update_vsyscall_tz(void); | ||
| 145 | |||
| 146 | #else | 139 | #else |
| 147 | 140 | ||
| 148 | static inline void update_vsyscall(struct timekeeper *tk) | 141 | static inline void update_vsyscall(struct timekeeper *tk) |
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index c198ab40c04f..b17bcce58bc4 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
| @@ -143,12 +143,6 @@ extern bool timekeeping_rtc_skipresume(void); | |||
| 143 | extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); | 143 | extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); |
| 144 | 144 | ||
| 145 | /* | 145 | /* |
| 146 | * PPS accessor | ||
| 147 | */ | ||
| 148 | extern void ktime_get_raw_and_real_ts64(struct timespec64 *ts_raw, | ||
| 149 | struct timespec64 *ts_real); | ||
| 150 | |||
| 151 | /* | ||
| 152 | * struct system_time_snapshot - simultaneous raw/real time capture with | 146 | * struct system_time_snapshot - simultaneous raw/real time capture with |
| 153 | * counter value | 147 | * counter value |
| 154 | * @cycles: Clocksource counter value to produce the system times | 148 | * @cycles: Clocksource counter value to produce the system times |
diff --git a/include/linux/timer.h b/include/linux/timer.h index bf781acfc6d8..04af640ea95b 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
| @@ -17,8 +17,7 @@ struct timer_list { | |||
| 17 | */ | 17 | */ |
| 18 | struct hlist_node entry; | 18 | struct hlist_node entry; |
| 19 | unsigned long expires; | 19 | unsigned long expires; |
| 20 | void (*function)(unsigned long); | 20 | void (*function)(struct timer_list *); |
| 21 | unsigned long data; | ||
| 22 | u32 flags; | 21 | u32 flags; |
| 23 | 22 | ||
| 24 | #ifdef CONFIG_LOCKDEP | 23 | #ifdef CONFIG_LOCKDEP |
| @@ -64,13 +63,9 @@ struct timer_list { | |||
| 64 | 63 | ||
| 65 | #define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) | 64 | #define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE) |
| 66 | 65 | ||
| 67 | #define TIMER_DATA_TYPE unsigned long | 66 | #define __TIMER_INITIALIZER(_function, _flags) { \ |
| 68 | #define TIMER_FUNC_TYPE void (*)(TIMER_DATA_TYPE) | ||
| 69 | |||
| 70 | #define __TIMER_INITIALIZER(_function, _data, _flags) { \ | ||
| 71 | .entry = { .next = TIMER_ENTRY_STATIC }, \ | 67 | .entry = { .next = TIMER_ENTRY_STATIC }, \ |
| 72 | .function = (_function), \ | 68 | .function = (_function), \ |
| 73 | .data = (_data), \ | ||
| 74 | .flags = (_flags), \ | 69 | .flags = (_flags), \ |
| 75 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ | 70 | __TIMER_LOCKDEP_MAP_INITIALIZER( \ |
| 76 | __FILE__ ":" __stringify(__LINE__)) \ | 71 | __FILE__ ":" __stringify(__LINE__)) \ |
| @@ -78,108 +73,71 @@ struct timer_list { | |||
| 78 | 73 | ||
| 79 | #define DEFINE_TIMER(_name, _function) \ | 74 | #define DEFINE_TIMER(_name, _function) \ |
| 80 | struct timer_list _name = \ | 75 | struct timer_list _name = \ |
| 81 | __TIMER_INITIALIZER((TIMER_FUNC_TYPE)_function, 0, 0) | 76 | __TIMER_INITIALIZER(_function, 0) |
| 82 | 77 | ||
| 83 | void init_timer_key(struct timer_list *timer, unsigned int flags, | 78 | /* |
| 79 | * LOCKDEP and DEBUG timer interfaces. | ||
| 80 | */ | ||
| 81 | void init_timer_key(struct timer_list *timer, | ||
| 82 | void (*func)(struct timer_list *), unsigned int flags, | ||
| 84 | const char *name, struct lock_class_key *key); | 83 | const char *name, struct lock_class_key *key); |
| 85 | 84 | ||
| 86 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS | 85 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS |
| 87 | extern void init_timer_on_stack_key(struct timer_list *timer, | 86 | extern void init_timer_on_stack_key(struct timer_list *timer, |
| 87 | void (*func)(struct timer_list *), | ||
| 88 | unsigned int flags, const char *name, | 88 | unsigned int flags, const char *name, |
| 89 | struct lock_class_key *key); | 89 | struct lock_class_key *key); |
| 90 | extern void destroy_timer_on_stack(struct timer_list *timer); | ||
| 91 | #else | 90 | #else |
| 92 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } | ||
| 93 | static inline void init_timer_on_stack_key(struct timer_list *timer, | 91 | static inline void init_timer_on_stack_key(struct timer_list *timer, |
| 94 | unsigned int flags, const char *name, | 92 | void (*func)(struct timer_list *), |
| 93 | unsigned int flags, | ||
| 94 | const char *name, | ||
| 95 | struct lock_class_key *key) | 95 | struct lock_class_key *key) |
| 96 | { | 96 | { |
| 97 | init_timer_key(timer, flags, name, key); | 97 | init_timer_key(timer, func, flags, name, key); |
| 98 | } | 98 | } |
| 99 | #endif | 99 | #endif |
| 100 | 100 | ||
| 101 | #ifdef CONFIG_LOCKDEP | 101 | #ifdef CONFIG_LOCKDEP |
| 102 | #define __init_timer(_timer, _flags) \ | 102 | #define __init_timer(_timer, _fn, _flags) \ |
| 103 | do { \ | 103 | do { \ |
| 104 | static struct lock_class_key __key; \ | 104 | static struct lock_class_key __key; \ |
| 105 | init_timer_key((_timer), (_flags), #_timer, &__key); \ | 105 | init_timer_key((_timer), (_fn), (_flags), #_timer, &__key);\ |
| 106 | } while (0) | 106 | } while (0) |
| 107 | 107 | ||
| 108 | #define __init_timer_on_stack(_timer, _flags) \ | 108 | #define __init_timer_on_stack(_timer, _fn, _flags) \ |
| 109 | do { \ | 109 | do { \ |
| 110 | static struct lock_class_key __key; \ | 110 | static struct lock_class_key __key; \ |
| 111 | init_timer_on_stack_key((_timer), (_flags), #_timer, &__key); \ | 111 | init_timer_on_stack_key((_timer), (_fn), (_flags), \ |
| 112 | #_timer, &__key); \ | ||
| 112 | } while (0) | 113 | } while (0) |
| 113 | #else | 114 | #else |
| 114 | #define __init_timer(_timer, _flags) \ | 115 | #define __init_timer(_timer, _fn, _flags) \ |
| 115 | init_timer_key((_timer), (_flags), NULL, NULL) | 116 | init_timer_key((_timer), (_fn), (_flags), NULL, NULL) |
| 116 | #define __init_timer_on_stack(_timer, _flags) \ | 117 | #define __init_timer_on_stack(_timer, _fn, _flags) \ |
| 117 | init_timer_on_stack_key((_timer), (_flags), NULL, NULL) | 118 | init_timer_on_stack_key((_timer), (_fn), (_flags), NULL, NULL) |
| 118 | #endif | 119 | #endif |
| 119 | 120 | ||
| 120 | #define init_timer(timer) \ | 121 | /** |
| 121 | __init_timer((timer), 0) | 122 | * timer_setup - prepare a timer for first use |
| 122 | 123 | * @timer: the timer in question | |
| 123 | #define __setup_timer(_timer, _fn, _data, _flags) \ | 124 | * @callback: the function to call when timer expires |
| 124 | do { \ | 125 | * @flags: any TIMER_* flags |
| 125 | __init_timer((_timer), (_flags)); \ | 126 | * |
| 126 | (_timer)->function = (_fn); \ | 127 | * Regular timer initialization should use either DEFINE_TIMER() above, |
| 127 | (_timer)->data = (_data); \ | 128 | * or timer_setup(). For timers on the stack, timer_setup_on_stack() must |
| 128 | } while (0) | 129 | * be used and must be balanced with a call to destroy_timer_on_stack(). |
| 129 | 130 | */ | |
| 130 | #define __setup_timer_on_stack(_timer, _fn, _data, _flags) \ | 131 | #define timer_setup(timer, callback, flags) \ |
| 131 | do { \ | 132 | __init_timer((timer), (callback), (flags)) |
| 132 | __init_timer_on_stack((_timer), (_flags)); \ | ||
| 133 | (_timer)->function = (_fn); \ | ||
| 134 | (_timer)->data = (_data); \ | ||
| 135 | } while (0) | ||
| 136 | |||
| 137 | #define setup_timer(timer, fn, data) \ | ||
| 138 | __setup_timer((timer), (fn), (data), 0) | ||
| 139 | #define setup_pinned_timer(timer, fn, data) \ | ||
| 140 | __setup_timer((timer), (fn), (data), TIMER_PINNED) | ||
| 141 | #define setup_deferrable_timer(timer, fn, data) \ | ||
| 142 | __setup_timer((timer), (fn), (data), TIMER_DEFERRABLE) | ||
| 143 | #define setup_pinned_deferrable_timer(timer, fn, data) \ | ||
| 144 | __setup_timer((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED) | ||
| 145 | #define setup_timer_on_stack(timer, fn, data) \ | ||
| 146 | __setup_timer_on_stack((timer), (fn), (data), 0) | ||
| 147 | #define setup_pinned_timer_on_stack(timer, fn, data) \ | ||
| 148 | __setup_timer_on_stack((timer), (fn), (data), TIMER_PINNED) | ||
| 149 | #define setup_deferrable_timer_on_stack(timer, fn, data) \ | ||
| 150 | __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE) | ||
| 151 | #define setup_pinned_deferrable_timer_on_stack(timer, fn, data) \ | ||
| 152 | __setup_timer_on_stack((timer), (fn), (data), TIMER_DEFERRABLE | TIMER_PINNED) | ||
| 153 | 133 | ||
| 154 | #ifndef CONFIG_LOCKDEP | 134 | #define timer_setup_on_stack(timer, callback, flags) \ |
| 155 | static inline void timer_setup(struct timer_list *timer, | 135 | __init_timer_on_stack((timer), (callback), (flags)) |
| 156 | void (*callback)(struct timer_list *), | ||
| 157 | unsigned int flags) | ||
| 158 | { | ||
| 159 | __setup_timer(timer, (TIMER_FUNC_TYPE)callback, | ||
| 160 | (TIMER_DATA_TYPE)timer, flags); | ||
| 161 | } | ||
| 162 | 136 | ||
| 163 | static inline void timer_setup_on_stack(struct timer_list *timer, | 137 | #ifdef CONFIG_DEBUG_OBJECTS_TIMERS |
| 164 | void (*callback)(struct timer_list *), | 138 | extern void destroy_timer_on_stack(struct timer_list *timer); |
| 165 | unsigned int flags) | ||
| 166 | { | ||
| 167 | __setup_timer_on_stack(timer, (TIMER_FUNC_TYPE)callback, | ||
| 168 | (TIMER_DATA_TYPE)timer, flags); | ||
| 169 | } | ||
| 170 | #else | 139 | #else |
| 171 | /* | 140 | static inline void destroy_timer_on_stack(struct timer_list *timer) { } |
| 172 | * Under LOCKDEP, the timer lock_class_key (set up in __init_timer) needs | ||
| 173 | * to be tied to the caller's context, so an inline (above) won't work. We | ||
| 174 | * do want to keep the inline for argument type checking, though. | ||
| 175 | */ | ||
| 176 | # define timer_setup(timer, callback, flags) \ | ||
| 177 | __setup_timer((timer), (TIMER_FUNC_TYPE)(callback), \ | ||
| 178 | (TIMER_DATA_TYPE)(timer), (flags)) | ||
| 179 | # define timer_setup_on_stack(timer, callback, flags) \ | ||
| 180 | __setup_timer_on_stack((timer), \ | ||
| 181 | (TIMER_FUNC_TYPE)(callback), \ | ||
| 182 | (TIMER_DATA_TYPE)(timer), (flags)) | ||
| 183 | #endif | 141 | #endif |
| 184 | 142 | ||
| 185 | #define from_timer(var, callback_timer, timer_fieldname) \ | 143 | #define from_timer(var, callback_timer, timer_fieldname) \ |
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 01a050fc6650..4a54ef96aff5 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
| @@ -176,8 +176,7 @@ struct execute_work { | |||
| 176 | 176 | ||
| 177 | #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ | 177 | #define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \ |
| 178 | .work = __WORK_INITIALIZER((n).work, (f)), \ | 178 | .work = __WORK_INITIALIZER((n).work, (f)), \ |
| 179 | .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)delayed_work_timer_fn,\ | 179 | .timer = __TIMER_INITIALIZER(delayed_work_timer_fn,\ |
| 180 | (TIMER_DATA_TYPE)&(n.timer), \ | ||
| 181 | (tflags) | TIMER_IRQSAFE), \ | 180 | (tflags) | TIMER_IRQSAFE), \ |
| 182 | } | 181 | } |
| 183 | 182 | ||
| @@ -242,19 +241,17 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; } | |||
| 242 | #define __INIT_DELAYED_WORK(_work, _func, _tflags) \ | 241 | #define __INIT_DELAYED_WORK(_work, _func, _tflags) \ |
| 243 | do { \ | 242 | do { \ |
| 244 | INIT_WORK(&(_work)->work, (_func)); \ | 243 | INIT_WORK(&(_work)->work, (_func)); \ |
| 245 | __setup_timer(&(_work)->timer, \ | 244 | __init_timer(&(_work)->timer, \ |
| 246 | (TIMER_FUNC_TYPE)delayed_work_timer_fn, \ | 245 | delayed_work_timer_fn, \ |
| 247 | (TIMER_DATA_TYPE)&(_work)->timer, \ | 246 | (_tflags) | TIMER_IRQSAFE); \ |
| 248 | (_tflags) | TIMER_IRQSAFE); \ | ||
| 249 | } while (0) | 247 | } while (0) |
| 250 | 248 | ||
| 251 | #define __INIT_DELAYED_WORK_ONSTACK(_work, _func, _tflags) \ | 249 | #define __INIT_DELAYED_WORK_ONSTACK(_work, _func, _tflags) \ |
| 252 | do { \ | 250 | do { \ |
| 253 | INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ | 251 | INIT_WORK_ONSTACK(&(_work)->work, (_func)); \ |
| 254 | __setup_timer_on_stack(&(_work)->timer, \ | 252 | __init_timer_on_stack(&(_work)->timer, \ |
| 255 | (TIMER_FUNC_TYPE)delayed_work_timer_fn,\ | 253 | delayed_work_timer_fn, \ |
| 256 | (TIMER_DATA_TYPE)&(_work)->timer,\ | 254 | (_tflags) | TIMER_IRQSAFE); \ |
| 257 | (_tflags) | TIMER_IRQSAFE); \ | ||
| 258 | } while (0) | 255 | } while (0) |
| 259 | 256 | ||
| 260 | #define INIT_DELAYED_WORK(_work, _func) \ | 257 | #define INIT_DELAYED_WORK(_work, _func) \ |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index f42d85631d17..fdfd04e348f6 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
| @@ -308,7 +308,7 @@ static inline void cgroup_writeback_umount(void) | |||
| 308 | void laptop_io_completion(struct backing_dev_info *info); | 308 | void laptop_io_completion(struct backing_dev_info *info); |
| 309 | void laptop_sync_completion(void); | 309 | void laptop_sync_completion(void); |
| 310 | void laptop_mode_sync(struct work_struct *work); | 310 | void laptop_mode_sync(struct work_struct *work); |
| 311 | void laptop_mode_timer_fn(unsigned long data); | 311 | void laptop_mode_timer_fn(struct timer_list *t); |
| 312 | #else | 312 | #else |
| 313 | static inline void laptop_sync_completion(void) { } | 313 | static inline void laptop_sync_completion(void) { } |
| 314 | #endif | 314 | #endif |
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index 1215229d1c12..ef2a47e0eab6 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | static int irqfixup __read_mostly; | 20 | static int irqfixup __read_mostly; |
| 21 | 21 | ||
| 22 | #define POLL_SPURIOUS_IRQ_INTERVAL (HZ/10) | 22 | #define POLL_SPURIOUS_IRQ_INTERVAL (HZ/10) |
| 23 | static void poll_spurious_irqs(unsigned long dummy); | 23 | static void poll_spurious_irqs(struct timer_list *unused); |
| 24 | static DEFINE_TIMER(poll_spurious_irq_timer, poll_spurious_irqs); | 24 | static DEFINE_TIMER(poll_spurious_irq_timer, poll_spurious_irqs); |
| 25 | static int irq_poll_cpu; | 25 | static int irq_poll_cpu; |
| 26 | static atomic_t irq_poll_active; | 26 | static atomic_t irq_poll_active; |
| @@ -143,7 +143,7 @@ out: | |||
| 143 | return ok; | 143 | return ok; |
| 144 | } | 144 | } |
| 145 | 145 | ||
| 146 | static void poll_spurious_irqs(unsigned long dummy) | 146 | static void poll_spurious_irqs(struct timer_list *unused) |
| 147 | { | 147 | { |
| 148 | struct irq_desc *desc; | 148 | struct irq_desc *desc; |
| 149 | int i; | 149 | int i; |
diff --git a/kernel/kthread.c b/kernel/kthread.c index 8af313081b0d..cd50e99202b0 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
| @@ -843,7 +843,7 @@ void __kthread_queue_delayed_work(struct kthread_worker *worker, | |||
| 843 | struct timer_list *timer = &dwork->timer; | 843 | struct timer_list *timer = &dwork->timer; |
| 844 | struct kthread_work *work = &dwork->work; | 844 | struct kthread_work *work = &dwork->work; |
| 845 | 845 | ||
| 846 | WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn); | 846 | WARN_ON_ONCE(timer->function != kthread_delayed_work_timer_fn); |
| 847 | 847 | ||
| 848 | /* | 848 | /* |
| 849 | * If @delay is 0, queue @dwork->work immediately. This is for | 849 | * If @delay is 0, queue @dwork->work immediately. This is for |
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/Kconfig b/kernel/time/Kconfig index d689a9557e17..e776fc8cc1df 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig | |||
| @@ -21,10 +21,6 @@ config CLOCKSOURCE_VALIDATE_LAST_CYCLE | |||
| 21 | config GENERIC_TIME_VSYSCALL | 21 | config GENERIC_TIME_VSYSCALL |
| 22 | bool | 22 | bool |
| 23 | 23 | ||
| 24 | # Timekeeping vsyscall support | ||
| 25 | config GENERIC_TIME_VSYSCALL_OLD | ||
| 26 | bool | ||
| 27 | |||
| 28 | # Old style timekeeping | 24 | # Old style timekeeping |
| 29 | config ARCH_USES_GETTIMEOFFSET | 25 | config ARCH_USES_GETTIMEOFFSET |
| 30 | bool | 26 | bool |
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 03918a19cf2d..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,8 +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 | init_timer(&watchdog_timer); | 293 | timer_setup(&watchdog_timer, clocksource_watchdog, 0); |
| 294 | watchdog_timer.function = clocksource_watchdog; | ||
| 295 | watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; | 294 | watchdog_timer.expires = jiffies + WATCHDOG_INTERVAL; |
| 296 | add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask)); | 295 | add_timer_on(&watchdog_timer, cpumask_first(cpu_online_mask)); |
| 297 | watchdog_running = 1; | 296 | watchdog_running = 1; |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 198afa78bf69..cd03317e7b57 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
| @@ -557,45 +557,6 @@ static void halt_fast_timekeeper(struct timekeeper *tk) | |||
| 557 | update_fast_timekeeper(&tkr_dummy, &tk_fast_raw); | 557 | update_fast_timekeeper(&tkr_dummy, &tk_fast_raw); |
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL_OLD | ||
| 561 | #warning Please contact your maintainers, as GENERIC_TIME_VSYSCALL_OLD compatibity will disappear soon. | ||
| 562 | |||
| 563 | static inline void update_vsyscall(struct timekeeper *tk) | ||
| 564 | { | ||
| 565 | struct timespec xt, wm; | ||
| 566 | |||
| 567 | xt = timespec64_to_timespec(tk_xtime(tk)); | ||
| 568 | wm = timespec64_to_timespec(tk->wall_to_monotonic); | ||
| 569 | update_vsyscall_old(&xt, &wm, tk->tkr_mono.clock, tk->tkr_mono.mult, | ||
| 570 | tk->tkr_mono.cycle_last); | ||
| 571 | } | ||
| 572 | |||
| 573 | static inline void old_vsyscall_fixup(struct timekeeper *tk) | ||
| 574 | { | ||
| 575 | s64 remainder; | ||
| 576 | |||
| 577 | /* | ||
| 578 | * Store only full nanoseconds into xtime_nsec after rounding | ||
| 579 | * it up and add the remainder to the error difference. | ||
| 580 | * XXX - This is necessary to avoid small 1ns inconsistnecies caused | ||
| 581 | * by truncating the remainder in vsyscalls. However, it causes | ||
| 582 | * additional work to be done in timekeeping_adjust(). Once | ||
| 583 | * the vsyscall implementations are converted to use xtime_nsec | ||
| 584 | * (shifted nanoseconds), and CONFIG_GENERIC_TIME_VSYSCALL_OLD | ||
| 585 | * users are removed, this can be killed. | ||
| 586 | */ | ||
| 587 | remainder = tk->tkr_mono.xtime_nsec & ((1ULL << tk->tkr_mono.shift) - 1); | ||
| 588 | if (remainder != 0) { | ||
| 589 | tk->tkr_mono.xtime_nsec -= remainder; | ||
| 590 | tk->tkr_mono.xtime_nsec += 1ULL << tk->tkr_mono.shift; | ||
| 591 | tk->ntp_error += remainder << tk->ntp_error_shift; | ||
| 592 | tk->ntp_error -= (1ULL << tk->tkr_mono.shift) << tk->ntp_error_shift; | ||
| 593 | } | ||
| 594 | } | ||
| 595 | #else | ||
| 596 | #define old_vsyscall_fixup(tk) | ||
| 597 | #endif | ||
| 598 | |||
| 599 | static RAW_NOTIFIER_HEAD(pvclock_gtod_chain); | 560 | static RAW_NOTIFIER_HEAD(pvclock_gtod_chain); |
| 600 | 561 | ||
| 601 | static void update_pvclock_gtod(struct timekeeper *tk, bool was_set) | 562 | static void update_pvclock_gtod(struct timekeeper *tk, bool was_set) |
| @@ -2164,12 +2125,6 @@ void update_wall_time(void) | |||
| 2164 | timekeeping_adjust(tk, offset); | 2125 | timekeeping_adjust(tk, offset); |
| 2165 | 2126 | ||
| 2166 | /* | 2127 | /* |
| 2167 | * XXX This can be killed once everyone converts | ||
| 2168 | * to the new update_vsyscall. | ||
| 2169 | */ | ||
| 2170 | old_vsyscall_fixup(tk); | ||
| 2171 | |||
| 2172 | /* | ||
| 2173 | * Finally, make sure that after the rounding | 2128 | * Finally, make sure that after the rounding |
| 2174 | * xtime_nsec isn't larger than NSEC_PER_SEC | 2129 | * xtime_nsec isn't larger than NSEC_PER_SEC |
| 2175 | */ | 2130 | */ |
diff --git a/kernel/time/timer.c b/kernel/time/timer.c index af0b8bae4502..ffebcf878fba 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c | |||
| @@ -707,14 +707,18 @@ static inline void debug_timer_assert_init(struct timer_list *timer) | |||
| 707 | debug_object_assert_init(timer, &timer_debug_descr); | 707 | debug_object_assert_init(timer, &timer_debug_descr); |
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | static void do_init_timer(struct timer_list *timer, unsigned int flags, | 710 | static void do_init_timer(struct timer_list *timer, |
| 711 | void (*func)(struct timer_list *), | ||
| 712 | unsigned int flags, | ||
| 711 | const char *name, struct lock_class_key *key); | 713 | const char *name, struct lock_class_key *key); |
| 712 | 714 | ||
| 713 | void init_timer_on_stack_key(struct timer_list *timer, unsigned int flags, | 715 | void init_timer_on_stack_key(struct timer_list *timer, |
| 716 | void (*func)(struct timer_list *), | ||
| 717 | unsigned int flags, | ||
| 714 | const char *name, struct lock_class_key *key) | 718 | const char *name, struct lock_class_key *key) |
| 715 | { | 719 | { |
| 716 | debug_object_init_on_stack(timer, &timer_debug_descr); | 720 | debug_object_init_on_stack(timer, &timer_debug_descr); |
| 717 | do_init_timer(timer, flags, name, key); | 721 | do_init_timer(timer, func, flags, name, key); |
| 718 | } | 722 | } |
| 719 | EXPORT_SYMBOL_GPL(init_timer_on_stack_key); | 723 | EXPORT_SYMBOL_GPL(init_timer_on_stack_key); |
| 720 | 724 | ||
| @@ -755,10 +759,13 @@ static inline void debug_assert_init(struct timer_list *timer) | |||
| 755 | debug_timer_assert_init(timer); | 759 | debug_timer_assert_init(timer); |
| 756 | } | 760 | } |
| 757 | 761 | ||
| 758 | static void do_init_timer(struct timer_list *timer, unsigned int flags, | 762 | static void do_init_timer(struct timer_list *timer, |
| 763 | void (*func)(struct timer_list *), | ||
| 764 | unsigned int flags, | ||
| 759 | const char *name, struct lock_class_key *key) | 765 | const char *name, struct lock_class_key *key) |
| 760 | { | 766 | { |
| 761 | timer->entry.pprev = NULL; | 767 | timer->entry.pprev = NULL; |
| 768 | timer->function = func; | ||
| 762 | timer->flags = flags | raw_smp_processor_id(); | 769 | timer->flags = flags | raw_smp_processor_id(); |
| 763 | lockdep_init_map(&timer->lockdep_map, name, key, 0); | 770 | lockdep_init_map(&timer->lockdep_map, name, key, 0); |
| 764 | } | 771 | } |
| @@ -766,6 +773,7 @@ static void do_init_timer(struct timer_list *timer, unsigned int flags, | |||
| 766 | /** | 773 | /** |
| 767 | * init_timer_key - initialize a timer | 774 | * init_timer_key - initialize a timer |
| 768 | * @timer: the timer to be initialized | 775 | * @timer: the timer to be initialized |
| 776 | * @func: timer callback function | ||
| 769 | * @flags: timer flags | 777 | * @flags: timer flags |
| 770 | * @name: name of the timer | 778 | * @name: name of the timer |
| 771 | * @key: lockdep class key of the fake lock used for tracking timer | 779 | * @key: lockdep class key of the fake lock used for tracking timer |
| @@ -774,11 +782,12 @@ static void do_init_timer(struct timer_list *timer, unsigned int flags, | |||
| 774 | * init_timer_key() must be done to a timer prior calling *any* of the | 782 | * init_timer_key() must be done to a timer prior calling *any* of the |
| 775 | * other timer functions. | 783 | * other timer functions. |
| 776 | */ | 784 | */ |
| 777 | void init_timer_key(struct timer_list *timer, unsigned int flags, | 785 | void init_timer_key(struct timer_list *timer, |
| 786 | void (*func)(struct timer_list *), unsigned int flags, | ||
| 778 | const char *name, struct lock_class_key *key) | 787 | const char *name, struct lock_class_key *key) |
| 779 | { | 788 | { |
| 780 | debug_init(timer); | 789 | debug_init(timer); |
| 781 | do_init_timer(timer, flags, name, key); | 790 | do_init_timer(timer, func, flags, name, key); |
| 782 | } | 791 | } |
| 783 | EXPORT_SYMBOL(init_timer_key); | 792 | EXPORT_SYMBOL(init_timer_key); |
| 784 | 793 | ||
| @@ -1107,12 +1116,12 @@ EXPORT_SYMBOL(timer_reduce); | |||
| 1107 | * add_timer - start a timer | 1116 | * add_timer - start a timer |
| 1108 | * @timer: the timer to be added | 1117 | * @timer: the timer to be added |
| 1109 | * | 1118 | * |
| 1110 | * The kernel will do a ->function(->data) callback from the | 1119 | * The kernel will do a ->function(@timer) callback from the |
| 1111 | * timer interrupt at the ->expires point in the future. The | 1120 | * timer interrupt at the ->expires point in the future. The |
| 1112 | * current time is 'jiffies'. | 1121 | * current time is 'jiffies'. |
| 1113 | * | 1122 | * |
| 1114 | * The timer's ->expires, ->function (and if the handler uses it, ->data) | 1123 | * The timer's ->expires, ->function fields must be set prior calling this |
| 1115 | * fields must be set prior calling this function. | 1124 | * function. |
| 1116 | * | 1125 | * |
| 1117 | * Timers with an ->expires field in the past will be executed in the next | 1126 | * Timers with an ->expires field in the past will be executed in the next |
| 1118 | * timer tick. | 1127 | * timer tick. |
| @@ -1284,8 +1293,7 @@ int del_timer_sync(struct timer_list *timer) | |||
| 1284 | EXPORT_SYMBOL(del_timer_sync); | 1293 | EXPORT_SYMBOL(del_timer_sync); |
| 1285 | #endif | 1294 | #endif |
| 1286 | 1295 | ||
| 1287 | static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), | 1296 | static void call_timer_fn(struct timer_list *timer, void (*fn)(struct timer_list *)) |
| 1288 | unsigned long data) | ||
| 1289 | { | 1297 | { |
| 1290 | int count = preempt_count(); | 1298 | int count = preempt_count(); |
| 1291 | 1299 | ||
| @@ -1309,7 +1317,7 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), | |||
| 1309 | lock_map_acquire(&lockdep_map); | 1317 | lock_map_acquire(&lockdep_map); |
| 1310 | 1318 | ||
| 1311 | trace_timer_expire_entry(timer); | 1319 | trace_timer_expire_entry(timer); |
| 1312 | fn(data); | 1320 | fn(timer); |
| 1313 | trace_timer_expire_exit(timer); | 1321 | trace_timer_expire_exit(timer); |
| 1314 | 1322 | ||
| 1315 | lock_map_release(&lockdep_map); | 1323 | lock_map_release(&lockdep_map); |
| @@ -1331,8 +1339,7 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head) | |||
| 1331 | { | 1339 | { |
| 1332 | while (!hlist_empty(head)) { | 1340 | while (!hlist_empty(head)) { |
| 1333 | struct timer_list *timer; | 1341 | struct timer_list *timer; |
| 1334 | void (*fn)(unsigned long); | 1342 | void (*fn)(struct timer_list *); |
| 1335 | unsigned long data; | ||
| 1336 | 1343 | ||
| 1337 | timer = hlist_entry(head->first, struct timer_list, entry); | 1344 | timer = hlist_entry(head->first, struct timer_list, entry); |
| 1338 | 1345 | ||
| @@ -1340,15 +1347,14 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head) | |||
| 1340 | detach_timer(timer, true); | 1347 | detach_timer(timer, true); |
| 1341 | 1348 | ||
| 1342 | fn = timer->function; | 1349 | fn = timer->function; |
| 1343 | data = timer->data; | ||
| 1344 | 1350 | ||
| 1345 | if (timer->flags & TIMER_IRQSAFE) { | 1351 | if (timer->flags & TIMER_IRQSAFE) { |
| 1346 | raw_spin_unlock(&base->lock); | 1352 | raw_spin_unlock(&base->lock); |
| 1347 | call_timer_fn(timer, fn, data); | 1353 | call_timer_fn(timer, fn); |
| 1348 | raw_spin_lock(&base->lock); | 1354 | raw_spin_lock(&base->lock); |
| 1349 | } else { | 1355 | } else { |
| 1350 | raw_spin_unlock_irq(&base->lock); | 1356 | raw_spin_unlock_irq(&base->lock); |
| 1351 | call_timer_fn(timer, fn, data); | 1357 | call_timer_fn(timer, fn); |
| 1352 | raw_spin_lock_irq(&base->lock); | 1358 | raw_spin_lock_irq(&base->lock); |
| 1353 | } | 1359 | } |
| 1354 | } | 1360 | } |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 0e7f5428a148..0ed768b56c60 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
| @@ -389,7 +389,7 @@ static int __init init_timer_list_procfs(void) | |||
| 389 | { | 389 | { |
| 390 | struct proc_dir_entry *pe; | 390 | struct proc_dir_entry *pe; |
| 391 | 391 | ||
| 392 | pe = proc_create("timer_list", 0444, NULL, &timer_list_fops); | 392 | pe = proc_create("timer_list", 0400, NULL, &timer_list_fops); |
| 393 | if (!pe) | 393 | if (!pe) |
| 394 | return -ENOMEM; | 394 | return -ENOMEM; |
| 395 | return 0; | 395 | return 0; |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index dde6298f6b22..8fdb710bfdd7 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
| @@ -1509,7 +1509,7 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq, | |||
| 1509 | struct work_struct *work = &dwork->work; | 1509 | struct work_struct *work = &dwork->work; |
| 1510 | 1510 | ||
| 1511 | WARN_ON_ONCE(!wq); | 1511 | WARN_ON_ONCE(!wq); |
| 1512 | WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)delayed_work_timer_fn); | 1512 | WARN_ON_ONCE(timer->function != delayed_work_timer_fn); |
| 1513 | WARN_ON_ONCE(timer_pending(timer)); | 1513 | WARN_ON_ONCE(timer_pending(timer)); |
| 1514 | WARN_ON_ONCE(!list_empty(&work->entry)); | 1514 | WARN_ON_ONCE(!list_empty(&work->entry)); |
| 1515 | 1515 | ||
diff --git a/lib/random32.c b/lib/random32.c index 65cc018fef40..4aaa76404d56 100644 --- a/lib/random32.c +++ b/lib/random32.c | |||
| @@ -213,11 +213,11 @@ static int __init prandom_init(void) | |||
| 213 | } | 213 | } |
| 214 | core_initcall(prandom_init); | 214 | core_initcall(prandom_init); |
| 215 | 215 | ||
| 216 | static void __prandom_timer(unsigned long dontcare); | 216 | static void __prandom_timer(struct timer_list *unused); |
| 217 | 217 | ||
| 218 | static DEFINE_TIMER(seed_timer, __prandom_timer); | 218 | static DEFINE_TIMER(seed_timer, __prandom_timer); |
| 219 | 219 | ||
| 220 | static void __prandom_timer(unsigned long dontcare) | 220 | static void __prandom_timer(struct timer_list *unused) |
| 221 | { | 221 | { |
| 222 | u32 entropy; | 222 | u32 entropy; |
| 223 | unsigned long expires; | 223 | unsigned long expires; |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 8a1551154285..e7095030aa1f 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
| @@ -1993,11 +1993,12 @@ int dirty_writeback_centisecs_handler(struct ctl_table *table, int write, | |||
| 1993 | } | 1993 | } |
| 1994 | 1994 | ||
| 1995 | #ifdef CONFIG_BLOCK | 1995 | #ifdef CONFIG_BLOCK |
| 1996 | void laptop_mode_timer_fn(unsigned long data) | 1996 | void laptop_mode_timer_fn(struct timer_list *t) |
| 1997 | { | 1997 | { |
| 1998 | struct request_queue *q = (struct request_queue *)data; | 1998 | struct backing_dev_info *backing_dev_info = |
| 1999 | from_timer(backing_dev_info, t, laptop_mode_wb_timer); | ||
| 1999 | 2000 | ||
| 2000 | wakeup_flusher_threads_bdi(q->backing_dev_info, WB_REASON_LAPTOP_TIMER); | 2001 | wakeup_flusher_threads_bdi(backing_dev_info, WB_REASON_LAPTOP_TIMER); |
| 2001 | } | 2002 | } |
| 2002 | 2003 | ||
| 2003 | /* | 2004 | /* |
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/atm/lec.c b/net/atm/lec.c index c976196da3ea..6676e3433261 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
| @@ -1798,7 +1798,7 @@ static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, | |||
| 1798 | else | 1798 | else |
| 1799 | send_to_lecd(priv, l_arp_xmt, mac_to_find, NULL, NULL); | 1799 | send_to_lecd(priv, l_arp_xmt, mac_to_find, NULL, NULL); |
| 1800 | entry->timer.expires = jiffies + (1 * HZ); | 1800 | entry->timer.expires = jiffies + (1 * HZ); |
| 1801 | entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_arp; | 1801 | entry->timer.function = lec_arp_expire_arp; |
| 1802 | add_timer(&entry->timer); | 1802 | add_timer(&entry->timer); |
| 1803 | found = priv->mcast_vcc; | 1803 | found = priv->mcast_vcc; |
| 1804 | } | 1804 | } |
| @@ -1998,7 +1998,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
| 1998 | entry->old_recv_push = old_push; | 1998 | entry->old_recv_push = old_push; |
| 1999 | entry->status = ESI_UNKNOWN; | 1999 | entry->status = ESI_UNKNOWN; |
| 2000 | entry->timer.expires = jiffies + priv->vcc_timeout_period; | 2000 | entry->timer.expires = jiffies + priv->vcc_timeout_period; |
| 2001 | entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_vcc; | 2001 | entry->timer.function = lec_arp_expire_vcc; |
| 2002 | hlist_add_head(&entry->next, &priv->lec_no_forward); | 2002 | hlist_add_head(&entry->next, &priv->lec_no_forward); |
| 2003 | add_timer(&entry->timer); | 2003 | add_timer(&entry->timer); |
| 2004 | dump_arp_table(priv); | 2004 | dump_arp_table(priv); |
| @@ -2082,7 +2082,7 @@ lec_vcc_added(struct lec_priv *priv, const struct atmlec_ioc *ioc_data, | |||
| 2082 | entry->status = ESI_UNKNOWN; | 2082 | entry->status = ESI_UNKNOWN; |
| 2083 | hlist_add_head(&entry->next, &priv->lec_arp_empty_ones); | 2083 | hlist_add_head(&entry->next, &priv->lec_arp_empty_ones); |
| 2084 | entry->timer.expires = jiffies + priv->vcc_timeout_period; | 2084 | entry->timer.expires = jiffies + priv->vcc_timeout_period; |
| 2085 | entry->timer.function = (TIMER_FUNC_TYPE)lec_arp_expire_vcc; | 2085 | entry->timer.function = lec_arp_expire_vcc; |
| 2086 | add_timer(&entry->timer); | 2086 | add_timer(&entry->timer); |
| 2087 | pr_debug("After vcc was added\n"); | 2087 | pr_debug("After vcc was added\n"); |
| 2088 | dump_arp_table(priv); | 2088 | dump_arp_table(priv); |
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index e882d8b5db05..7c6a1cc760a2 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
| @@ -121,7 +121,7 @@ static struct notifier_block mpoa_notifier = { | |||
| 121 | 121 | ||
| 122 | struct mpoa_client *mpcs = NULL; /* FIXME */ | 122 | struct mpoa_client *mpcs = NULL; /* FIXME */ |
| 123 | static struct atm_mpoa_qos *qos_head = NULL; | 123 | static struct atm_mpoa_qos *qos_head = NULL; |
| 124 | static DEFINE_TIMER(mpc_timer, NULL); | 124 | static DEFINE_TIMER(mpc_timer, mpc_cache_check); |
| 125 | 125 | ||
| 126 | 126 | ||
| 127 | static struct mpoa_client *find_mpc_by_itfnum(int itf) | 127 | static struct mpoa_client *find_mpc_by_itfnum(int itf) |
| @@ -1413,7 +1413,6 @@ static void mpc_timer_refresh(void) | |||
| 1413 | { | 1413 | { |
| 1414 | mpc_timer.expires = jiffies + (MPC_P2 * HZ); | 1414 | mpc_timer.expires = jiffies + (MPC_P2 * HZ); |
| 1415 | checking_time = mpc_timer.expires; | 1415 | checking_time = mpc_timer.expires; |
| 1416 | mpc_timer.function = (TIMER_FUNC_TYPE)mpc_cache_check; | ||
| 1417 | add_timer(&mpc_timer); | 1416 | add_timer(&mpc_timer); |
| 1418 | } | 1417 | } |
| 1419 | 1418 | ||
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/can/proc.c b/net/can/proc.c index d979b3dc49a6..0c59f876fe6f 100644 --- a/net/can/proc.c +++ b/net/can/proc.c | |||
| @@ -221,7 +221,7 @@ static int can_stats_proc_show(struct seq_file *m, void *v) | |||
| 221 | 221 | ||
| 222 | seq_putc(m, '\n'); | 222 | seq_putc(m, '\n'); |
| 223 | 223 | ||
| 224 | if (net->can.can_stattimer.function == (TIMER_FUNC_TYPE)can_stat_update) { | 224 | if (net->can.can_stattimer.function == can_stat_update) { |
| 225 | seq_printf(m, " %8ld %% total match ratio (RXMR)\n", | 225 | seq_printf(m, " %8ld %% total match ratio (RXMR)\n", |
| 226 | can_stats->total_rx_match_ratio); | 226 | can_stats->total_rx_match_ratio); |
| 227 | 227 | ||
| @@ -291,7 +291,7 @@ static int can_reset_stats_proc_show(struct seq_file *m, void *v) | |||
| 291 | 291 | ||
| 292 | user_reset = 1; | 292 | user_reset = 1; |
| 293 | 293 | ||
| 294 | if (net->can.can_stattimer.function == (TIMER_FUNC_TYPE)can_stat_update) { | 294 | if (net->can.can_stattimer.function == can_stat_update) { |
| 295 | seq_printf(m, "Scheduled statistic reset #%ld.\n", | 295 | seq_printf(m, "Scheduled statistic reset #%ld.\n", |
| 296 | can_pstats->stats_reset + 1); | 296 | can_pstats->stats_reset + 1); |
| 297 | } else { | 297 | } else { |
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 b36dceab0dc1..324cb9f2f551 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
| @@ -125,7 +125,7 @@ static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, | |||
| 125 | struct sk_buff *skb, | 125 | struct sk_buff *skb, |
| 126 | const void *daddr); | 126 | const void *daddr); |
| 127 | static int dn_route_input(struct sk_buff *); | 127 | static int dn_route_input(struct sk_buff *); |
| 128 | static void dn_run_flush(unsigned long dummy); | 128 | static void dn_run_flush(struct timer_list *unused); |
| 129 | 129 | ||
| 130 | static struct dn_rt_hash_bucket *dn_rt_hash_table; | 130 | static struct dn_rt_hash_bucket *dn_rt_hash_table; |
| 131 | static unsigned int dn_rt_hash_mask; | 131 | static unsigned int dn_rt_hash_mask; |
| @@ -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; |
| @@ -357,7 +357,7 @@ static int dn_insert_route(struct dn_route *rt, unsigned int hash, struct dn_rou | |||
| 357 | return 0; | 357 | return 0; |
| 358 | } | 358 | } |
| 359 | 359 | ||
| 360 | static void dn_run_flush(unsigned long dummy) | 360 | static void dn_run_flush(struct timer_list *unused) |
| 361 | { | 361 | { |
| 362 | int i; | 362 | int i; |
| 363 | struct dn_route *rt, *next; | 363 | struct dn_route *rt, *next; |
| @@ -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/ip6_fib.c b/net/ipv6/ip6_fib.c index 2e2804f5823e..f5285f4e1d08 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
| @@ -70,7 +70,7 @@ static int fib6_walk_continue(struct fib6_walker *w); | |||
| 70 | * result of redirects, path MTU changes, etc. | 70 | * result of redirects, path MTU changes, etc. |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | static void fib6_gc_timer_cb(unsigned long arg); | 73 | static void fib6_gc_timer_cb(struct timer_list *t); |
| 74 | 74 | ||
| 75 | #define FOR_WALKERS(net, w) \ | 75 | #define FOR_WALKERS(net, w) \ |
| 76 | list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh) | 76 | list_for_each_entry(w, &(net)->ipv6.fib6_walkers, lh) |
| @@ -2026,9 +2026,11 @@ void fib6_run_gc(unsigned long expires, struct net *net, bool force) | |||
| 2026 | spin_unlock_bh(&net->ipv6.fib6_gc_lock); | 2026 | spin_unlock_bh(&net->ipv6.fib6_gc_lock); |
| 2027 | } | 2027 | } |
| 2028 | 2028 | ||
| 2029 | static void fib6_gc_timer_cb(unsigned long arg) | 2029 | static void fib6_gc_timer_cb(struct timer_list *t) |
| 2030 | { | 2030 | { |
| 2031 | fib6_run_gc(0, (struct net *)arg, true); | 2031 | struct net *arg = from_timer(arg, t, ipv6.ip6_fib_timer); |
| 2032 | |||
| 2033 | fib6_run_gc(0, arg, true); | ||
| 2032 | } | 2034 | } |
| 2033 | 2035 | ||
| 2034 | static int __net_init fib6_net_init(struct net *net) | 2036 | static int __net_init fib6_net_init(struct net *net) |
| @@ -2043,7 +2045,7 @@ static int __net_init fib6_net_init(struct net *net) | |||
| 2043 | spin_lock_init(&net->ipv6.fib6_gc_lock); | 2045 | spin_lock_init(&net->ipv6.fib6_gc_lock); |
| 2044 | rwlock_init(&net->ipv6.fib6_walker_lock); | 2046 | rwlock_init(&net->ipv6.fib6_walker_lock); |
| 2045 | INIT_LIST_HEAD(&net->ipv6.fib6_walkers); | 2047 | INIT_LIST_HEAD(&net->ipv6.fib6_walkers); |
| 2046 | setup_timer(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, (unsigned long)net); | 2048 | timer_setup(&net->ipv6.ip6_fib_timer, fib6_gc_timer_cb, 0); |
| 2047 | 2049 | ||
| 2048 | net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL); | 2050 | net->ipv6.rt6_stats = kzalloc(sizeof(*net->ipv6.rt6_stats), GFP_KERNEL); |
| 2049 | if (!net->ipv6.rt6_stats) | 2051 | if (!net->ipv6.rt6_stats) |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index 9f2e73c71768..7f59c8fabeeb 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | static atomic_t fl_size = ATOMIC_INIT(0); | 46 | static atomic_t fl_size = ATOMIC_INIT(0); |
| 47 | static struct ip6_flowlabel __rcu *fl_ht[FL_HASH_MASK+1]; | 47 | static struct ip6_flowlabel __rcu *fl_ht[FL_HASH_MASK+1]; |
| 48 | 48 | ||
| 49 | static void ip6_fl_gc(unsigned long dummy); | 49 | static void ip6_fl_gc(struct timer_list *unused); |
| 50 | static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc); | 50 | static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc); |
| 51 | 51 | ||
| 52 | /* FL hash table lock: it protects only of GC */ | 52 | /* FL hash table lock: it protects only of GC */ |
| @@ -127,7 +127,7 @@ static void fl_release(struct ip6_flowlabel *fl) | |||
| 127 | spin_unlock_bh(&ip6_fl_lock); | 127 | spin_unlock_bh(&ip6_fl_lock); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | static void ip6_fl_gc(unsigned long dummy) | 130 | static void ip6_fl_gc(struct timer_list *unused) |
| 131 | { | 131 | { |
| 132 | int i; | 132 | int i; |
| 133 | unsigned long now = jiffies; | 133 | unsigned long now = jiffies; |
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/lapb/lapb_timer.c b/net/lapb/lapb_timer.c index 8bb469cb3abe..5d4ae01951b5 100644 --- a/net/lapb/lapb_timer.c +++ b/net/lapb/lapb_timer.c | |||
| @@ -42,7 +42,7 @@ void lapb_start_t1timer(struct lapb_cb *lapb) | |||
| 42 | { | 42 | { |
| 43 | del_timer(&lapb->t1timer); | 43 | del_timer(&lapb->t1timer); |
| 44 | 44 | ||
| 45 | lapb->t1timer.function = (TIMER_FUNC_TYPE)lapb_t1timer_expiry; | 45 | lapb->t1timer.function = lapb_t1timer_expiry; |
| 46 | lapb->t1timer.expires = jiffies + lapb->t1; | 46 | lapb->t1timer.expires = jiffies + lapb->t1; |
| 47 | 47 | ||
| 48 | add_timer(&lapb->t1timer); | 48 | add_timer(&lapb->t1timer); |
| @@ -52,7 +52,7 @@ void lapb_start_t2timer(struct lapb_cb *lapb) | |||
| 52 | { | 52 | { |
| 53 | del_timer(&lapb->t2timer); | 53 | del_timer(&lapb->t2timer); |
| 54 | 54 | ||
| 55 | lapb->t2timer.function = (TIMER_FUNC_TYPE)lapb_t2timer_expiry; | 55 | lapb->t2timer.function = lapb_t2timer_expiry; |
| 56 | lapb->t2timer.expires = jiffies + lapb->t2; | 56 | lapb->t2timer.expires = jiffies + lapb->t2; |
| 57 | 57 | ||
| 58 | add_timer(&lapb->t2timer); | 58 | add_timer(&lapb->t2timer); |
diff --git a/net/ncsi/ncsi-manage.c b/net/ncsi/ncsi-manage.c index a2b904a718c6..c989211bbabc 100644 --- a/net/ncsi/ncsi-manage.c +++ b/net/ncsi/ncsi-manage.c | |||
| @@ -184,9 +184,9 @@ report: | |||
| 184 | nd->handler(nd); | 184 | nd->handler(nd); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | static void ncsi_channel_monitor(unsigned long data) | 187 | static void ncsi_channel_monitor(struct timer_list *t) |
| 188 | { | 188 | { |
| 189 | struct ncsi_channel *nc = (struct ncsi_channel *)data; | 189 | struct ncsi_channel *nc = from_timer(nc, t, monitor.timer); |
| 190 | struct ncsi_package *np = nc->package; | 190 | struct ncsi_package *np = nc->package; |
| 191 | struct ncsi_dev_priv *ndp = np->ndp; | 191 | struct ncsi_dev_priv *ndp = np->ndp; |
| 192 | struct ncsi_channel_mode *ncm; | 192 | struct ncsi_channel_mode *ncm; |
| @@ -313,8 +313,7 @@ struct ncsi_channel *ncsi_add_channel(struct ncsi_package *np, unsigned char id) | |||
| 313 | nc->package = np; | 313 | nc->package = np; |
| 314 | nc->state = NCSI_CHANNEL_INACTIVE; | 314 | nc->state = NCSI_CHANNEL_INACTIVE; |
| 315 | nc->monitor.enabled = false; | 315 | nc->monitor.enabled = false; |
| 316 | setup_timer(&nc->monitor.timer, | 316 | timer_setup(&nc->monitor.timer, ncsi_channel_monitor, 0); |
| 317 | ncsi_channel_monitor, (unsigned long)nc); | ||
| 318 | spin_lock_init(&nc->lock); | 317 | spin_lock_init(&nc->lock); |
| 319 | INIT_LIST_HEAD(&nc->link); | 318 | INIT_LIST_HEAD(&nc->link); |
| 320 | for (index = 0; index < NCSI_CAP_MAX; index++) | 319 | for (index = 0; index < NCSI_CAP_MAX; index++) |
| @@ -529,9 +528,9 @@ struct ncsi_dev *ncsi_find_dev(struct net_device *dev) | |||
| 529 | return NULL; | 528 | return NULL; |
| 530 | } | 529 | } |
| 531 | 530 | ||
| 532 | static void ncsi_request_timeout(unsigned long data) | 531 | static void ncsi_request_timeout(struct timer_list *t) |
| 533 | { | 532 | { |
| 534 | struct ncsi_request *nr = (struct ncsi_request *)data; | 533 | struct ncsi_request *nr = from_timer(nr, t, timer); |
| 535 | struct ncsi_dev_priv *ndp = nr->ndp; | 534 | struct ncsi_dev_priv *ndp = nr->ndp; |
| 536 | unsigned long flags; | 535 | unsigned long flags; |
| 537 | 536 | ||
| @@ -1577,9 +1576,7 @@ struct ncsi_dev *ncsi_register_dev(struct net_device *dev, | |||
| 1577 | for (i = 0; i < ARRAY_SIZE(ndp->requests); i++) { | 1576 | for (i = 0; i < ARRAY_SIZE(ndp->requests); i++) { |
| 1578 | ndp->requests[i].id = i; | 1577 | ndp->requests[i].id = i; |
| 1579 | ndp->requests[i].ndp = ndp; | 1578 | ndp->requests[i].ndp = ndp; |
| 1580 | setup_timer(&ndp->requests[i].timer, | 1579 | timer_setup(&ndp->requests[i].timer, ncsi_request_timeout, 0); |
| 1581 | ncsi_request_timeout, | ||
| 1582 | (unsigned long)&ndp->requests[i]); | ||
| 1583 | } | 1580 | } |
| 1584 | 1581 | ||
| 1585 | spin_lock_irqsave(&ncsi_dev_lock, flags); | 1582 | 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/netrom/af_netrom.c b/net/netrom/af_netrom.c index 2dec3583c97d..7ed9d4422a73 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
| @@ -284,7 +284,7 @@ void nr_destroy_socket(struct sock *sk) | |||
| 284 | 284 | ||
| 285 | if (sk_has_allocations(sk)) { | 285 | if (sk_has_allocations(sk)) { |
| 286 | /* Defer: outstanding buffers */ | 286 | /* Defer: outstanding buffers */ |
| 287 | sk->sk_timer.function = (TIMER_FUNC_TYPE)nr_destroy_timer; | 287 | sk->sk_timer.function = nr_destroy_timer; |
| 288 | sk->sk_timer.expires = jiffies + 2 * HZ; | 288 | sk->sk_timer.expires = jiffies + 2 * HZ; |
| 289 | add_timer(&sk->sk_timer); | 289 | add_timer(&sk->sk_timer); |
| 290 | } else | 290 | } else |
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c index 989ae647825e..215ad22a9647 100644 --- a/net/netrom/nr_loopback.c +++ b/net/netrom/nr_loopback.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include <net/netrom.h> | 15 | #include <net/netrom.h> |
| 16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
| 17 | 17 | ||
| 18 | static void nr_loopback_timer(unsigned long); | 18 | static void nr_loopback_timer(struct timer_list *); |
| 19 | 19 | ||
| 20 | static struct sk_buff_head loopback_queue; | 20 | static struct sk_buff_head loopback_queue; |
| 21 | static DEFINE_TIMER(loopback_timer, nr_loopback_timer); | 21 | static DEFINE_TIMER(loopback_timer, nr_loopback_timer); |
| @@ -48,7 +48,7 @@ int nr_loopback_queue(struct sk_buff *skb) | |||
| 48 | return 1; | 48 | return 1; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | static void nr_loopback_timer(unsigned long param) | 51 | static void nr_loopback_timer(struct timer_list *unused) |
| 52 | { | 52 | { |
| 53 | struct sk_buff *skb; | 53 | struct sk_buff *skb; |
| 54 | ax25_address *nr_dest; | 54 | ax25_address *nr_dest; |
diff --git a/net/netrom/nr_timer.c b/net/netrom/nr_timer.c index 43569aea0f5e..cbd51ed5a2d7 100644 --- a/net/netrom/nr_timer.c +++ b/net/netrom/nr_timer.c | |||
| @@ -45,7 +45,7 @@ void nr_init_timers(struct sock *sk) | |||
| 45 | timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); | 45 | timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); |
| 46 | 46 | ||
| 47 | /* initialized by sock_init_data */ | 47 | /* initialized by sock_init_data */ |
| 48 | sk->sk_timer.function = (TIMER_FUNC_TYPE)nr_heartbeat_expiry; | 48 | sk->sk_timer.function = nr_heartbeat_expiry; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void nr_start_t1timer(struct sock *sk) | 51 | void nr_start_t1timer(struct sock *sk) |
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/rose/rose_link.c b/net/rose/rose_link.c index cda4c6678ef1..62055d3069d2 100644 --- a/net/rose/rose_link.c +++ b/net/rose/rose_link.c | |||
| @@ -37,7 +37,7 @@ void rose_start_ftimer(struct rose_neigh *neigh) | |||
| 37 | { | 37 | { |
| 38 | del_timer(&neigh->ftimer); | 38 | del_timer(&neigh->ftimer); |
| 39 | 39 | ||
| 40 | neigh->ftimer.function = (TIMER_FUNC_TYPE)rose_ftimer_expiry; | 40 | neigh->ftimer.function = rose_ftimer_expiry; |
| 41 | neigh->ftimer.expires = | 41 | neigh->ftimer.expires = |
| 42 | jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout); | 42 | jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout); |
| 43 | 43 | ||
| @@ -48,7 +48,7 @@ static void rose_start_t0timer(struct rose_neigh *neigh) | |||
| 48 | { | 48 | { |
| 49 | del_timer(&neigh->t0timer); | 49 | del_timer(&neigh->t0timer); |
| 50 | 50 | ||
| 51 | neigh->t0timer.function = (TIMER_FUNC_TYPE)rose_t0timer_expiry; | 51 | neigh->t0timer.function = rose_t0timer_expiry; |
| 52 | neigh->t0timer.expires = | 52 | neigh->t0timer.expires = |
| 53 | jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout); | 53 | jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout); |
| 54 | 54 | ||
diff --git a/net/rose/rose_timer.c b/net/rose/rose_timer.c index ea613b2a9735..74555fb95615 100644 --- a/net/rose/rose_timer.c +++ b/net/rose/rose_timer.c | |||
| @@ -36,7 +36,7 @@ void rose_start_heartbeat(struct sock *sk) | |||
| 36 | { | 36 | { |
| 37 | del_timer(&sk->sk_timer); | 37 | del_timer(&sk->sk_timer); |
| 38 | 38 | ||
| 39 | sk->sk_timer.function = (TIMER_FUNC_TYPE)rose_heartbeat_expiry; | 39 | sk->sk_timer.function = rose_heartbeat_expiry; |
| 40 | sk->sk_timer.expires = jiffies + 5 * HZ; | 40 | sk->sk_timer.expires = jiffies + 5 * HZ; |
| 41 | 41 | ||
| 42 | add_timer(&sk->sk_timer); | 42 | add_timer(&sk->sk_timer); |
| @@ -48,7 +48,7 @@ void rose_start_t1timer(struct sock *sk) | |||
| 48 | 48 | ||
| 49 | del_timer(&rose->timer); | 49 | del_timer(&rose->timer); |
| 50 | 50 | ||
| 51 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 51 | rose->timer.function = rose_timer_expiry; |
| 52 | rose->timer.expires = jiffies + rose->t1; | 52 | rose->timer.expires = jiffies + rose->t1; |
| 53 | 53 | ||
| 54 | add_timer(&rose->timer); | 54 | add_timer(&rose->timer); |
| @@ -60,7 +60,7 @@ void rose_start_t2timer(struct sock *sk) | |||
| 60 | 60 | ||
| 61 | del_timer(&rose->timer); | 61 | del_timer(&rose->timer); |
| 62 | 62 | ||
| 63 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 63 | rose->timer.function = rose_timer_expiry; |
| 64 | rose->timer.expires = jiffies + rose->t2; | 64 | rose->timer.expires = jiffies + rose->t2; |
| 65 | 65 | ||
| 66 | add_timer(&rose->timer); | 66 | add_timer(&rose->timer); |
| @@ -72,7 +72,7 @@ void rose_start_t3timer(struct sock *sk) | |||
| 72 | 72 | ||
| 73 | del_timer(&rose->timer); | 73 | del_timer(&rose->timer); |
| 74 | 74 | ||
| 75 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 75 | rose->timer.function = rose_timer_expiry; |
| 76 | rose->timer.expires = jiffies + rose->t3; | 76 | rose->timer.expires = jiffies + rose->t3; |
| 77 | 77 | ||
| 78 | add_timer(&rose->timer); | 78 | add_timer(&rose->timer); |
| @@ -84,7 +84,7 @@ void rose_start_hbtimer(struct sock *sk) | |||
| 84 | 84 | ||
| 85 | del_timer(&rose->timer); | 85 | del_timer(&rose->timer); |
| 86 | 86 | ||
| 87 | rose->timer.function = (TIMER_FUNC_TYPE)rose_timer_expiry; | 87 | rose->timer.function = rose_timer_expiry; |
| 88 | rose->timer.expires = jiffies + rose->hb; | 88 | rose->timer.expires = jiffies + rose->hb; |
| 89 | 89 | ||
| 90 | add_timer(&rose->timer); | 90 | add_timer(&rose->timer); |
| @@ -97,7 +97,7 @@ void rose_start_idletimer(struct sock *sk) | |||
| 97 | del_timer(&rose->idletimer); | 97 | del_timer(&rose->idletimer); |
| 98 | 98 | ||
| 99 | if (rose->idle > 0) { | 99 | if (rose->idle > 0) { |
| 100 | rose->idletimer.function = (TIMER_FUNC_TYPE)rose_idletimer_expiry; | 100 | rose->idletimer.function = rose_idletimer_expiry; |
| 101 | rose->idletimer.expires = jiffies + rose->idle; | 101 | rose->idletimer.expires = jiffies + rose->idle; |
| 102 | 102 | ||
| 103 | add_timer(&rose->idletimer); | 103 | add_timer(&rose->idletimer); |
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/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index e8e0831229cf..f9307bd6644b 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
| @@ -745,7 +745,7 @@ static void svc_add_new_temp_xprt(struct svc_serv *serv, struct svc_xprt *newxpt | |||
| 745 | serv->sv_tmpcnt++; | 745 | serv->sv_tmpcnt++; |
| 746 | if (serv->sv_temptimer.function == NULL) { | 746 | if (serv->sv_temptimer.function == NULL) { |
| 747 | /* setup timer to age temp transports */ | 747 | /* setup timer to age temp transports */ |
| 748 | serv->sv_temptimer.function = (TIMER_FUNC_TYPE)svc_age_temp_xprts; | 748 | serv->sv_temptimer.function = svc_age_temp_xprts; |
| 749 | mod_timer(&serv->sv_temptimer, | 749 | mod_timer(&serv->sv_temptimer, |
| 750 | jiffies + svc_conn_age_period * HZ); | 750 | jiffies + svc_conn_age_period * HZ); |
| 751 | } | 751 | } |
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/af_x25.c b/net/x25/af_x25.c index ea87143314f3..562cc11131f6 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c | |||
| @@ -415,7 +415,7 @@ static void __x25_destroy_socket(struct sock *sk) | |||
| 415 | if (sk_has_allocations(sk)) { | 415 | if (sk_has_allocations(sk)) { |
| 416 | /* Defer: outstanding buffers */ | 416 | /* Defer: outstanding buffers */ |
| 417 | sk->sk_timer.expires = jiffies + 10 * HZ; | 417 | sk->sk_timer.expires = jiffies + 10 * HZ; |
| 418 | sk->sk_timer.function = (TIMER_FUNC_TYPE)x25_destroy_timer; | 418 | sk->sk_timer.function = x25_destroy_timer; |
| 419 | add_timer(&sk->sk_timer); | 419 | add_timer(&sk->sk_timer); |
| 420 | } else { | 420 | } else { |
| 421 | /* drop last reference so sock_put will free */ | 421 | /* drop last reference so sock_put will free */ |
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/x25/x25_timer.c b/net/x25/x25_timer.c index 1dfba3c23459..fa3461002b3e 100644 --- a/net/x25/x25_timer.c +++ b/net/x25/x25_timer.c | |||
| @@ -36,7 +36,7 @@ void x25_init_timers(struct sock *sk) | |||
| 36 | timer_setup(&x25->timer, x25_timer_expiry, 0); | 36 | timer_setup(&x25->timer, x25_timer_expiry, 0); |
| 37 | 37 | ||
| 38 | /* initialized by sock_init_data */ | 38 | /* initialized by sock_init_data */ |
| 39 | sk->sk_timer.function = (TIMER_FUNC_TYPE)x25_heartbeat_expiry; | 39 | sk->sk_timer.function = x25_heartbeat_expiry; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | void x25_start_heartbeat(struct sock *sk) | 42 | void x25_start_heartbeat(struct sock *sk) |
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 | ||
diff --git a/scripts/coccinelle/api/setup_timer.cocci b/scripts/coccinelle/api/setup_timer.cocci deleted file mode 100644 index e4577089dcb9..000000000000 --- a/scripts/coccinelle/api/setup_timer.cocci +++ /dev/null | |||
| @@ -1,277 +0,0 @@ | |||
| 1 | /// Use setup_timer function instead of initializing timer with the function | ||
| 2 | /// and data fields | ||
| 3 | // Confidence: High | ||
| 4 | // Copyright: (C) 2016 Vaishali Thakkar, Oracle. GPLv2 | ||
| 5 | // Copyright: (C) 2017 Kees Cook, Google. GPLv2 | ||
| 6 | // Options: --no-includes --include-headers | ||
| 7 | // Keywords: init_timer, setup_timer | ||
| 8 | |||
| 9 | virtual patch | ||
| 10 | virtual context | ||
| 11 | virtual org | ||
| 12 | virtual report | ||
| 13 | |||
| 14 | // Match the common cases first to avoid Coccinelle parsing loops with | ||
| 15 | // "... when" clauses. | ||
| 16 | |||
| 17 | @match_immediate_function_data_after_init_timer | ||
| 18 | depends on patch && !context && !org && !report@ | ||
| 19 | expression e, func, da; | ||
| 20 | @@ | ||
| 21 | |||
| 22 | -init_timer | ||
| 23 | +setup_timer | ||
| 24 | ( \(&e\|e\) | ||
| 25 | +, func, da | ||
| 26 | ); | ||
| 27 | ( | ||
| 28 | -\(e.function\|e->function\) = func; | ||
| 29 | -\(e.data\|e->data\) = da; | ||
| 30 | | | ||
| 31 | -\(e.data\|e->data\) = da; | ||
| 32 | -\(e.function\|e->function\) = func; | ||
| 33 | ) | ||
| 34 | |||
| 35 | @match_immediate_function_data_before_init_timer | ||
| 36 | depends on patch && !context && !org && !report@ | ||
| 37 | expression e, func, da; | ||
| 38 | @@ | ||
| 39 | |||
| 40 | ( | ||
| 41 | -\(e.function\|e->function\) = func; | ||
| 42 | -\(e.data\|e->data\) = da; | ||
| 43 | | | ||
| 44 | -\(e.data\|e->data\) = da; | ||
| 45 | -\(e.function\|e->function\) = func; | ||
| 46 | ) | ||
| 47 | -init_timer | ||
| 48 | +setup_timer | ||
| 49 | ( \(&e\|e\) | ||
| 50 | +, func, da | ||
| 51 | ); | ||
| 52 | |||
| 53 | @match_function_and_data_after_init_timer | ||
| 54 | depends on patch && !context && !org && !report@ | ||
| 55 | expression e, e2, e3, e4, e5, func, da; | ||
| 56 | @@ | ||
| 57 | |||
| 58 | -init_timer | ||
| 59 | +setup_timer | ||
| 60 | ( \(&e\|e\) | ||
| 61 | +, func, da | ||
| 62 | ); | ||
| 63 | ... when != func = e2 | ||
| 64 | when != da = e3 | ||
| 65 | ( | ||
| 66 | -e.function = func; | ||
| 67 | ... when != da = e4 | ||
| 68 | -e.data = da; | ||
| 69 | | | ||
| 70 | -e->function = func; | ||
| 71 | ... when != da = e4 | ||
| 72 | -e->data = da; | ||
| 73 | | | ||
| 74 | -e.data = da; | ||
| 75 | ... when != func = e5 | ||
| 76 | -e.function = func; | ||
| 77 | | | ||
| 78 | -e->data = da; | ||
| 79 | ... when != func = e5 | ||
| 80 | -e->function = func; | ||
| 81 | ) | ||
| 82 | |||
| 83 | @match_function_and_data_before_init_timer | ||
| 84 | depends on patch && !context && !org && !report@ | ||
| 85 | expression e, e2, e3, e4, e5, func, da; | ||
| 86 | @@ | ||
| 87 | ( | ||
| 88 | -e.function = func; | ||
| 89 | ... when != da = e4 | ||
| 90 | -e.data = da; | ||
| 91 | | | ||
| 92 | -e->function = func; | ||
| 93 | ... when != da = e4 | ||
| 94 | -e->data = da; | ||
| 95 | | | ||
| 96 | -e.data = da; | ||
| 97 | ... when != func = e5 | ||
| 98 | -e.function = func; | ||
| 99 | | | ||
| 100 | -e->data = da; | ||
| 101 | ... when != func = e5 | ||
| 102 | -e->function = func; | ||
| 103 | ) | ||
| 104 | ... when != func = e2 | ||
| 105 | when != da = e3 | ||
| 106 | -init_timer | ||
| 107 | +setup_timer | ||
| 108 | ( \(&e\|e\) | ||
| 109 | +, func, da | ||
| 110 | ); | ||
| 111 | |||
| 112 | @r1 exists@ | ||
| 113 | expression t; | ||
| 114 | identifier f; | ||
| 115 | position p; | ||
| 116 | @@ | ||
| 117 | |||
| 118 | f(...) { ... when any | ||
| 119 | init_timer@p(\(&t\|t\)) | ||
| 120 | ... when any | ||
| 121 | } | ||
| 122 | |||
| 123 | @r2 exists@ | ||
| 124 | expression r1.t; | ||
| 125 | identifier g != r1.f; | ||
| 126 | expression e8; | ||
| 127 | @@ | ||
| 128 | |||
| 129 | g(...) { ... when any | ||
| 130 | \(t.data\|t->data\) = e8 | ||
| 131 | ... when any | ||
| 132 | } | ||
| 133 | |||
| 134 | // It is dangerous to use setup_timer if data field is initialized | ||
| 135 | // in another function. | ||
| 136 | |||
| 137 | @script:python depends on r2@ | ||
| 138 | p << r1.p; | ||
| 139 | @@ | ||
| 140 | |||
| 141 | cocci.include_match(False) | ||
| 142 | |||
| 143 | @r3 depends on patch && !context && !org && !report@ | ||
| 144 | expression r1.t, func, e7; | ||
| 145 | position r1.p; | ||
| 146 | @@ | ||
| 147 | |||
| 148 | ( | ||
| 149 | -init_timer@p(&t); | ||
| 150 | +setup_timer(&t, func, 0UL); | ||
| 151 | ... when != func = e7 | ||
| 152 | -t.function = func; | ||
| 153 | | | ||
| 154 | -t.function = func; | ||
| 155 | ... when != func = e7 | ||
| 156 | -init_timer@p(&t); | ||
| 157 | +setup_timer(&t, func, 0UL); | ||
| 158 | | | ||
| 159 | -init_timer@p(t); | ||
| 160 | +setup_timer(t, func, 0UL); | ||
| 161 | ... when != func = e7 | ||
| 162 | -t->function = func; | ||
| 163 | | | ||
| 164 | -t->function = func; | ||
| 165 | ... when != func = e7 | ||
| 166 | -init_timer@p(t); | ||
| 167 | +setup_timer(t, func, 0UL); | ||
| 168 | ) | ||
| 169 | |||
| 170 | // ---------------------------------------------------------------------------- | ||
| 171 | |||
| 172 | @match_immediate_function_data_after_init_timer_context | ||
| 173 | depends on !patch && (context || org || report)@ | ||
| 174 | expression da, e, func; | ||
| 175 | position j0, j1, j2; | ||
| 176 | @@ | ||
| 177 | |||
| 178 | * init_timer@j0 (&e); | ||
| 179 | ( | ||
| 180 | * e@j1.function = func; | ||
| 181 | * e@j2.data = da; | ||
| 182 | | | ||
| 183 | * e@j1.data = da; | ||
| 184 | * e@j2.function = func; | ||
| 185 | ) | ||
| 186 | |||
| 187 | @match_function_and_data_after_init_timer_context | ||
| 188 | depends on !patch && (context || org || report)@ | ||
| 189 | expression a, b, e1, e2, e3, e4, e5; | ||
| 190 | position j0 != match_immediate_function_data_after_init_timer_context.j0,j1,j2; | ||
| 191 | @@ | ||
| 192 | |||
| 193 | * init_timer@j0 (&e1); | ||
| 194 | ... when != a = e2 | ||
| 195 | when != b = e3 | ||
| 196 | ( | ||
| 197 | * e1@j1.function = a; | ||
| 198 | ... when != b = e4 | ||
| 199 | * e1@j2.data = b; | ||
| 200 | | | ||
| 201 | * e1@j1.data = b; | ||
| 202 | ... when != a = e5 | ||
| 203 | * e1@j2.function = a; | ||
| 204 | ) | ||
| 205 | |||
| 206 | @r3_context depends on !patch && (context || org || report)@ | ||
| 207 | expression c, e6, e7; | ||
| 208 | position r1.p; | ||
| 209 | position j0 != | ||
| 210 | {match_immediate_function_data_after_init_timer_context.j0, | ||
| 211 | match_function_and_data_after_init_timer_context.j0}, j1; | ||
| 212 | @@ | ||
| 213 | |||
| 214 | * init_timer@j0@p (&e6); | ||
| 215 | ... when != c = e7 | ||
| 216 | * e6@j1.function = c; | ||
| 217 | |||
| 218 | // ---------------------------------------------------------------------------- | ||
| 219 | |||
| 220 | @script:python match_immediate_function_data_after_init_timer_org | ||
| 221 | depends on org@ | ||
| 222 | j0 << match_immediate_function_data_after_init_timer_context.j0; | ||
| 223 | j1 << match_immediate_function_data_after_init_timer_context.j1; | ||
| 224 | j2 << match_immediate_function_data_after_init_timer_context.j2; | ||
| 225 | @@ | ||
| 226 | |||
| 227 | msg = "Use setup_timer function." | ||
| 228 | coccilib.org.print_todo(j0[0], msg) | ||
| 229 | coccilib.org.print_link(j1[0], "") | ||
| 230 | coccilib.org.print_link(j2[0], "") | ||
| 231 | |||
| 232 | @script:python match_function_and_data_after_init_timer_org depends on org@ | ||
| 233 | j0 << match_function_and_data_after_init_timer_context.j0; | ||
| 234 | j1 << match_function_and_data_after_init_timer_context.j1; | ||
| 235 | j2 << match_function_and_data_after_init_timer_context.j2; | ||
| 236 | @@ | ||
| 237 | |||
| 238 | msg = "Use setup_timer function." | ||
| 239 | coccilib.org.print_todo(j0[0], msg) | ||
| 240 | coccilib.org.print_link(j1[0], "") | ||
| 241 | coccilib.org.print_link(j2[0], "") | ||
| 242 | |||
| 243 | @script:python r3_org depends on org@ | ||
| 244 | j0 << r3_context.j0; | ||
| 245 | j1 << r3_context.j1; | ||
| 246 | @@ | ||
| 247 | |||
| 248 | msg = "Use setup_timer function." | ||
| 249 | coccilib.org.print_todo(j0[0], msg) | ||
| 250 | coccilib.org.print_link(j1[0], "") | ||
| 251 | |||
| 252 | // ---------------------------------------------------------------------------- | ||
| 253 | |||
| 254 | @script:python match_immediate_function_data_after_init_timer_report | ||
| 255 | depends on report@ | ||
| 256 | j0 << match_immediate_function_data_after_init_timer_context.j0; | ||
| 257 | j1 << match_immediate_function_data_after_init_timer_context.j1; | ||
| 258 | @@ | ||
| 259 | |||
| 260 | msg = "Use setup_timer function for function on line %s." % (j1[0].line) | ||
| 261 | coccilib.report.print_report(j0[0], msg) | ||
| 262 | |||
| 263 | @script:python match_function_and_data_after_init_timer_report depends on report@ | ||
| 264 | j0 << match_function_and_data_after_init_timer_context.j0; | ||
| 265 | j1 << match_function_and_data_after_init_timer_context.j1; | ||
| 266 | @@ | ||
| 267 | |||
| 268 | msg = "Use setup_timer function for function on line %s." % (j1[0].line) | ||
| 269 | coccilib.report.print_report(j0[0], msg) | ||
| 270 | |||
| 271 | @script:python r3_report depends on report@ | ||
| 272 | j0 << r3_context.j0; | ||
| 273 | j1 << r3_context.j1; | ||
| 274 | @@ | ||
| 275 | |||
| 276 | msg = "Use setup_timer function for function on line %s." % (j1[0].line) | ||
| 277 | coccilib.report.print_report(j0[0], msg) | ||
diff --git a/security/keys/gc.c b/security/keys/gc.c index 6713fee893fb..7207e6094dc1 100644 --- a/security/keys/gc.c +++ b/security/keys/gc.c | |||
| @@ -29,7 +29,7 @@ DECLARE_WORK(key_gc_work, key_garbage_collector); | |||
| 29 | /* | 29 | /* |
| 30 | * Reaper for links from keyrings to dead keys. | 30 | * Reaper for links from keyrings to dead keys. |
| 31 | */ | 31 | */ |
| 32 | static void key_gc_timer_func(unsigned long); | 32 | static void key_gc_timer_func(struct timer_list *); |
| 33 | static DEFINE_TIMER(key_gc_timer, key_gc_timer_func); | 33 | static DEFINE_TIMER(key_gc_timer, key_gc_timer_func); |
| 34 | 34 | ||
| 35 | static time64_t key_gc_next_run = TIME64_MAX; | 35 | static time64_t key_gc_next_run = TIME64_MAX; |
| @@ -84,7 +84,7 @@ void key_schedule_gc_links(void) | |||
| 84 | * Some key's cleanup time was met after it expired, so we need to get the | 84 | * Some key's cleanup time was met after it expired, so we need to get the |
| 85 | * reaper to go through a cycle finding expired keys. | 85 | * reaper to go through a cycle finding expired keys. |
| 86 | */ | 86 | */ |
| 87 | static void key_gc_timer_func(unsigned long data) | 87 | static void key_gc_timer_func(struct timer_list *unused) |
| 88 | { | 88 | { |
| 89 | kenter(""); | 89 | kenter(""); |
| 90 | key_gc_next_run = TIME64_MAX; | 90 | key_gc_next_run = TIME64_MAX; |
diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index 4f9613e5fc9e..c1376bfdc90b 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c | |||
| @@ -201,7 +201,7 @@ static int line6_send_raw_message_async_part(struct message *msg, | |||
| 201 | void line6_start_timer(struct timer_list *timer, unsigned long msecs, | 201 | void line6_start_timer(struct timer_list *timer, unsigned long msecs, |
| 202 | void (*function)(struct timer_list *t)) | 202 | void (*function)(struct timer_list *t)) |
| 203 | { | 203 | { |
| 204 | timer->function = (TIMER_FUNC_TYPE)function; | 204 | timer->function = function; |
| 205 | mod_timer(timer, jiffies + msecs_to_jiffies(msecs)); | 205 | mod_timer(timer, jiffies + msecs_to_jiffies(msecs)); |
| 206 | } | 206 | } |
| 207 | EXPORT_SYMBOL_GPL(line6_start_timer); | 207 | EXPORT_SYMBOL_GPL(line6_start_timer); |
