Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner:

 - The final conversion of timer wheel timers to timer_setup().

   A few manual conversions and a large coccinelle assisted sweep and
   the removal of the old initialization mechanisms and the related
   code.

 - Remove the now unused VSYSCALL update code

 - Fix permissions of /proc/timer_list. I still need to get rid of that
   file completely

 - Rename a misnomed clocksource function and remove a stale declaration

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (27 commits)
  m68k/macboing: Fix missed timer callback assignment
  treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts
  timer: Remove redundant __setup_timer*() macros
  timer: Pass function down to initialization routines
  timer: Remove unused data arguments from macros
  timer: Switch callback prototype to take struct timer_list * argument
  timer: Pass timer_list pointer to callbacks unconditionally
  Coccinelle: Remove setup_timer.cocci
  timer: Remove setup_*timer() interface
  timer: Remove init_timer() interface
  treewide: setup_timer() -> timer_setup() (2 field)
  treewide: setup_timer() -> timer_setup()
  treewide: init_timer() -> setup_timer()
  treewide: Switch DEFINE_TIMER callbacks to struct timer_list *
  s390: cmm: Convert timers to use timer_setup()
  lightnvm: Convert timers to use timer_setup()
  drivers/net: cris: Convert timers to use timer_setup()
  drm/vc4: Convert timers to use timer_setup()
  block/laptop_mode: Convert timers to use timer_setup()
  net/atm/mpc: Avoid open-coded assignment of timer callback function
  ...
This commit is contained in:
Linus Torvalds 2017-11-25 08:37:16 -10:00
commit 844056fd74
351 changed files with 1227 additions and 1775 deletions

View File

@ -177,18 +177,14 @@ Here is a sample module which implements a basic per cpu counter using
printk("Read : CPU %d, count %ld\n", cpu, printk("Read : CPU %d, count %ld\n", cpu,
local_read(&per_cpu(counters, cpu))); local_read(&per_cpu(counters, cpu)));
} }
del_timer(&test_timer); mod_timer(&test_timer, jiffies + 1000);
test_timer.expires = jiffies + 1000;
add_timer(&test_timer);
} }
static int __init test_init(void) static int __init test_init(void)
{ {
/* initialize the timer that will increment the counter */ /* initialize the timer that will increment the counter */
init_timer(&test_timer); timer_setup(&test_timer, do_test_timer, 0);
test_timer.function = do_test_timer; mod_timer(&test_timer, jiffies + 1);
test_timer.expires = jiffies + 1;
add_timer(&test_timer);
return 0; return 0;
} }

View File

@ -65,9 +65,9 @@ srmcons_do_receive_chars(struct tty_port *port)
} }
static void static void
srmcons_receive_chars(unsigned long data) srmcons_receive_chars(struct timer_list *t)
{ {
struct srmcons_private *srmconsp = (struct srmcons_private *)data; struct srmcons_private *srmconsp = from_timer(srmconsp, t, timer);
struct tty_port *port = &srmconsp->port; struct tty_port *port = &srmconsp->port;
unsigned long flags; unsigned long flags;
int incr = 10; int incr = 10;
@ -206,8 +206,7 @@ static const struct tty_operations srmcons_ops = {
static int __init static int __init
srmcons_init(void) srmcons_init(void)
{ {
setup_timer(&srmcons_singleton.timer, srmcons_receive_chars, timer_setup(&srmcons_singleton.timer, srmcons_receive_chars, 0);
(unsigned long)&srmcons_singleton);
if (srm_is_registered_console) { if (srm_is_registered_console) {
struct tty_driver *driver; struct tty_driver *driver;
int err; int err;

View File

@ -305,7 +305,7 @@ static void n2100_restart(enum reboot_mode mode, const char *cmd)
static struct timer_list power_button_poll_timer; static struct timer_list power_button_poll_timer;
static void power_button_poll(unsigned long dummy) static void power_button_poll(struct timer_list *unused)
{ {
if (gpio_get_value(N2100_POWER_BUTTON) == 0) { if (gpio_get_value(N2100_POWER_BUTTON) == 0) {
ctrl_alt_del(); ctrl_alt_del();
@ -336,8 +336,7 @@ static int __init n2100_request_gpios(void)
pr_err("could not set power GPIO as input\n"); pr_err("could not set power GPIO as input\n");
} }
/* Set up power button poll timer */ /* Set up power button poll timer */
init_timer(&power_button_poll_timer); timer_setup(&power_button_poll_timer, power_button_poll, 0);
power_button_poll_timer.function = power_button_poll;
power_button_poll_timer.expires = jiffies + (HZ / 10); power_button_poll_timer.expires = jiffies + (HZ / 10);
add_timer(&power_button_poll_timer); add_timer(&power_button_poll_timer);
return 0; return 0;

View File

@ -179,10 +179,10 @@ static int power_button_countdown;
/* Must hold the button down for at least this many counts to be processed */ /* Must hold the button down for at least this many counts to be processed */
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
static void dsmg600_power_handler(unsigned long data); static void dsmg600_power_handler(struct timer_list *unused);
static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler); static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler);
static void dsmg600_power_handler(unsigned long data) static void dsmg600_power_handler(struct timer_list *unused)
{ {
/* This routine is called twice per second to check the /* This routine is called twice per second to check the
* state of the power button. * state of the power button.

View File

@ -202,10 +202,10 @@ static int power_button_countdown;
/* Must hold the button down for at least this many counts to be processed */ /* Must hold the button down for at least this many counts to be processed */
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */ #define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
static void nas100d_power_handler(unsigned long data); static void nas100d_power_handler(struct timer_list *unused);
static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler); static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler);
static void nas100d_power_handler(unsigned long data) static void nas100d_power_handler(struct timer_list *unused)
{ {
/* This routine is called twice per second to check the /* This routine is called twice per second to check the
* state of the power button. * state of the power button.

View File

@ -172,7 +172,7 @@ static struct platform_device db88f5281_nand_flash = {
static void __iomem *db88f5281_7seg; static void __iomem *db88f5281_7seg;
static struct timer_list db88f5281_timer; static struct timer_list db88f5281_timer;
static void db88f5281_7seg_event(unsigned long data) static void db88f5281_7seg_event(struct timer_list *unused)
{ {
static int count = 0; static int count = 0;
writel(0, db88f5281_7seg + (count << 4)); writel(0, db88f5281_7seg + (count << 4));
@ -189,7 +189,7 @@ static int __init db88f5281_7seg_init(void)
printk(KERN_ERR "Failed to ioremap db88f5281_7seg\n"); printk(KERN_ERR "Failed to ioremap db88f5281_7seg\n");
return -EIO; return -EIO;
} }
setup_timer(&db88f5281_timer, db88f5281_7seg_event, 0); timer_setup(&db88f5281_timer, db88f5281_7seg_event, 0);
mod_timer(&db88f5281_timer, jiffies + 2 * HZ); mod_timer(&db88f5281_timer, jiffies + 2 * HZ);
} }

View File

@ -166,7 +166,7 @@ int check_nmi_wdt_touched(void)
return 1; return 1;
} }
static void nmi_wdt_timer(unsigned long data) static void nmi_wdt_timer(struct timer_list *unused)
{ {
if (check_nmi_wdt_touched()) if (check_nmi_wdt_touched())
nmi_wdt_keepalive(); nmi_wdt_keepalive();
@ -180,8 +180,7 @@ static int __init init_nmi_wdt(void)
nmi_wdt_start(); nmi_wdt_start();
nmi_active = true; nmi_active = true;
init_timer(&ntimer); timer_setup(&ntimer, nmi_wdt_timer, 0);
ntimer.function = nmi_wdt_timer;
ntimer.expires = jiffies + NMI_CHECK_TIMEOUT; ntimer.expires = jiffies + NMI_CHECK_TIMEOUT;
add_timer(&ntimer); add_timer(&ntimer);

View File

@ -65,7 +65,7 @@ void __init amiga_init_sound(void)
#endif #endif
} }
static void nosound( unsigned long ignored ); static void nosound(struct timer_list *unused);
static DEFINE_TIMER(sound_timer, nosound); static DEFINE_TIMER(sound_timer, nosound);
void amiga_mksound( unsigned int hz, unsigned int ticks ) void amiga_mksound( unsigned int hz, unsigned int ticks )
@ -107,7 +107,7 @@ void amiga_mksound( unsigned int hz, unsigned int ticks )
} }
static void nosound( unsigned long ignored ) static void nosound(struct timer_list *unused)
{ {
/* turn off DMA for audio channel 2 */ /* turn off DMA for audio channel 2 */
custom.dmacon = DMAF_AUD2; custom.dmacon = DMAF_AUD2;

View File

@ -48,9 +48,9 @@ static unsigned long mac_bell_phasepersample;
* some function protos * some function protos
*/ */
static void mac_init_asc( void ); static void mac_init_asc( void );
static void mac_nosound( unsigned long ); static void mac_nosound(struct timer_list *);
static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int ); static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int );
static void mac_quadra_ring_bell( unsigned long ); static void mac_quadra_ring_bell(struct timer_list *);
static void mac_av_start_bell( unsigned int, unsigned int, unsigned int ); static void mac_av_start_bell( unsigned int, unsigned int, unsigned int );
static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ); static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int );
@ -216,7 +216,7 @@ void mac_mksound( unsigned int freq, unsigned int length )
/* /*
* regular ASC: stop whining .. * regular ASC: stop whining ..
*/ */
static void mac_nosound( unsigned long ignored ) static void mac_nosound(struct timer_list *unused)
{ {
mac_asc_regs[ ASC_ENABLE ] = 0; mac_asc_regs[ ASC_ENABLE ] = 0;
} }
@ -270,7 +270,7 @@ static void mac_quadra_start_bell( unsigned int freq, unsigned int length, unsig
* already load the wave table, or at least call this one... * already load the wave table, or at least call this one...
* This piece keeps reloading the wave table until done. * This piece keeps reloading the wave table until done.
*/ */
static void mac_quadra_ring_bell( unsigned long ignored ) static void mac_quadra_ring_bell(struct timer_list *unused)
{ {
int i, count = mac_asc_samplespersec / HZ; int i, count = mac_asc_samplespersec / HZ;
unsigned long flags; unsigned long flags;

View File

@ -156,7 +156,7 @@ static const struct file_operations pvc_scroll_proc_fops = {
.write = pvc_scroll_proc_write, .write = pvc_scroll_proc_write,
}; };
void pvc_proc_timerfunc(unsigned long data) void pvc_proc_timerfunc(struct timer_list *unused)
{ {
if (scroll_dir < 0) if (scroll_dir < 0)
pvc_move(DISPLAY|RIGHT); pvc_move(DISPLAY|RIGHT);
@ -197,7 +197,7 @@ static int __init pvc_proc_init(void)
if (proc_entry == NULL) if (proc_entry == NULL)
goto error; goto error;
setup_timer(&timer, pvc_proc_timerfunc, 0UL); timer_setup(&timer, pvc_proc_timerfunc, 0);
return 0; return 0;
error: error:

View File

@ -36,10 +36,10 @@ void mips_display_message(const char *str)
} }
} }
static void scroll_display_message(unsigned long unused); static void scroll_display_message(struct timer_list *unused);
static DEFINE_TIMER(mips_scroll_timer, scroll_display_message); static DEFINE_TIMER(mips_scroll_timer, scroll_display_message);
static void scroll_display_message(unsigned long unused) static void scroll_display_message(struct timer_list *unused)
{ {
mips_display_message(&display_string[display_count++]); mips_display_message(&display_string[display_count++]);
if (display_count == max_display_count) if (display_count == max_display_count)

View File

@ -91,7 +91,7 @@ static int pdc_console_setup(struct console *co, char *options)
#define PDC_CONS_POLL_DELAY (30 * HZ / 1000) #define PDC_CONS_POLL_DELAY (30 * HZ / 1000)
static void pdc_console_poll(unsigned long unused); static void pdc_console_poll(struct timer_list *unused);
static DEFINE_TIMER(pdc_console_timer, pdc_console_poll); static DEFINE_TIMER(pdc_console_timer, pdc_console_poll);
static struct tty_port tty_port; static struct tty_port tty_port;
@ -135,7 +135,7 @@ static const struct tty_operations pdc_console_tty_ops = {
.chars_in_buffer = pdc_console_tty_chars_in_buffer, .chars_in_buffer = pdc_console_tty_chars_in_buffer,
}; };
static void pdc_console_poll(unsigned long unused) static void pdc_console_poll(struct timer_list *unused)
{ {
int data, count = 0; int data, count = 0;

View File

@ -188,7 +188,7 @@ static void tau_timeout(void * info)
local_irq_restore(flags); local_irq_restore(flags);
} }
static void tau_timeout_smp(unsigned long unused) static void tau_timeout_smp(struct timer_list *unused)
{ {
/* schedule ourselves to be run again */ /* schedule ourselves to be run again */
@ -230,7 +230,7 @@ int __init TAU_init(void)
/* first, set up the window shrinking timer */ /* first, set up the window shrinking timer */
setup_timer(&tau_timer, tau_timeout_smp, 0UL); timer_setup(&tau_timer, tau_timeout_smp, 0);
tau_timer.expires = jiffies + shrink_timer; tau_timer.expires = jiffies + shrink_timer;
add_timer(&tau_timer); add_timer(&tau_timer);

View File

@ -599,9 +599,9 @@ static void arm_next_watchdog(struct kvm_vcpu *vcpu)
spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags); spin_unlock_irqrestore(&vcpu->arch.wdt_lock, flags);
} }
void kvmppc_watchdog_func(unsigned long data) void kvmppc_watchdog_func(struct timer_list *t)
{ {
struct kvm_vcpu *vcpu = (struct kvm_vcpu *)data; struct kvm_vcpu *vcpu = from_timer(vcpu, t, arch.wdt_timer);
u32 tsr, new_tsr; u32 tsr, new_tsr;
int final; int final;
@ -1412,8 +1412,7 @@ int kvmppc_subarch_vcpu_init(struct kvm_vcpu *vcpu)
{ {
/* setup watchdog timer once */ /* setup watchdog timer once */
spin_lock_init(&vcpu->arch.wdt_lock); spin_lock_init(&vcpu->arch.wdt_lock);
setup_timer(&vcpu->arch.wdt_timer, kvmppc_watchdog_func, timer_setup(&vcpu->arch.wdt_timer, kvmppc_watchdog_func, 0);
(unsigned long)vcpu);
/* /*
* Clear DBSR.MRR to avoid guest debug interrupt as * Clear DBSR.MRR to avoid guest debug interrupt as

View File

@ -451,7 +451,7 @@ static inline void enable_ctr(u32 cpu, u32 ctr, u32 *pm07_cntrl)
* This routine will alternate loading the virtual counters for * This routine will alternate loading the virtual counters for
* virtual CPUs * virtual CPUs
*/ */
static void cell_virtual_cntr(unsigned long data) static void cell_virtual_cntr(struct timer_list *unused)
{ {
int i, prev_hdw_thread, next_hdw_thread; int i, prev_hdw_thread, next_hdw_thread;
u32 cpu; u32 cpu;
@ -555,7 +555,7 @@ static void cell_virtual_cntr(unsigned long data)
static void start_virt_cntrs(void) static void start_virt_cntrs(void)
{ {
setup_timer(&timer_virt_cntr, cell_virtual_cntr, 0UL); timer_setup(&timer_virt_cntr, cell_virtual_cntr, 0);
timer_virt_cntr.expires = jiffies + HZ / 10; timer_virt_cntr.expires = jiffies + HZ / 10;
add_timer(&timer_virt_cntr); add_timer(&timer_virt_cntr);
} }
@ -587,7 +587,7 @@ static int cell_reg_setup_spu_cycles(struct op_counter_config *ctr,
* periodically based on kernel timer to switch which SPU is * periodically based on kernel timer to switch which SPU is
* being monitored in a round robbin fashion. * being monitored in a round robbin fashion.
*/ */
static void spu_evnt_swap(unsigned long data) static void spu_evnt_swap(struct timer_list *unused)
{ {
int node; int node;
int cur_phys_spu, nxt_phys_spu, cur_spu_evnt_phys_spu_indx; 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)
static void start_spu_event_swap(void) static void start_spu_event_swap(void)
{ {
setup_timer(&timer_spu_event_swap, spu_evnt_swap, 0UL); timer_setup(&timer_spu_event_swap, spu_evnt_swap, 0);
timer_spu_event_swap.expires = jiffies + HZ / 25; timer_spu_event_swap.expires = jiffies + HZ / 25;
add_timer(&timer_spu_event_swap); add_timer(&timer_spu_event_swap);
} }

View File

@ -992,13 +992,13 @@ static void spu_calc_load(void)
CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks); CALC_LOAD(spu_avenrun[2], EXP_15, active_tasks);
} }
static void spusched_wake(unsigned long data) static void spusched_wake(struct timer_list *unused)
{ {
mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK); mod_timer(&spusched_timer, jiffies + SPUSCHED_TICK);
wake_up_process(spusched_task); wake_up_process(spusched_task);
} }
static void spuloadavg_wake(unsigned long data) static void spuloadavg_wake(struct timer_list *unused)
{ {
mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ); mod_timer(&spuloadavg_timer, jiffies + LOAD_FREQ);
spu_calc_load(); spu_calc_load();
@ -1124,8 +1124,8 @@ int __init spu_sched_init(void)
} }
spin_lock_init(&spu_prio->runq_lock); spin_lock_init(&spu_prio->runq_lock);
setup_timer(&spusched_timer, spusched_wake, 0); timer_setup(&spusched_timer, spusched_wake, 0);
setup_timer(&spuloadavg_timer, spuloadavg_wake, 0); timer_setup(&spuloadavg_timer, spuloadavg_wake, 0);
spusched_task = kthread_run(spusched_thread, NULL, "spusched"); spusched_task = kthread_run(spusched_thread, NULL, "spusched");
if (IS_ERR(spusched_task)) { if (IS_ERR(spusched_task)) {

View File

@ -361,9 +361,9 @@ static irqreturn_t kw_i2c_irq(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void kw_i2c_timeout(unsigned long data) static void kw_i2c_timeout(struct timer_list *t)
{ {
struct pmac_i2c_host_kw *host = (struct pmac_i2c_host_kw *)data; struct pmac_i2c_host_kw *host = from_timer(host, t, timeout_timer);
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&host->lock, flags); 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)
mutex_init(&host->mutex); mutex_init(&host->mutex);
init_completion(&host->complete); init_completion(&host->complete);
spin_lock_init(&host->lock); spin_lock_init(&host->lock);
setup_timer(&host->timeout_timer, kw_i2c_timeout, (unsigned long)host); timer_setup(&host->timeout_timer, kw_i2c_timeout, 0);
psteps = of_get_property(np, "AAPL,address-step", NULL); psteps = of_get_property(np, "AAPL,address-step", NULL);
steps = psteps ? (*psteps) : 0x10; steps = psteps ? (*psteps) : 0x10;

View File

@ -523,7 +523,7 @@ static void __init stp_reset(void)
} }
} }
static void stp_timeout(unsigned long dummy) static void stp_timeout(struct timer_list *unused)
{ {
queue_work(time_sync_wq, &stp_work); queue_work(time_sync_wq, &stp_work);
} }
@ -532,7 +532,7 @@ static int __init stp_init(void)
{ {
if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags)) if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags))
return 0; return 0;
setup_timer(&stp_timer, stp_timeout, 0UL); timer_setup(&stp_timer, stp_timeout, 0);
time_init_wq(); time_init_wq();
if (!stp_online) if (!stp_online)
return 0; return 0;

View File

@ -56,10 +56,10 @@ static DEFINE_SPINLOCK(cmm_lock);
static struct task_struct *cmm_thread_ptr; static struct task_struct *cmm_thread_ptr;
static DECLARE_WAIT_QUEUE_HEAD(cmm_thread_wait); static DECLARE_WAIT_QUEUE_HEAD(cmm_thread_wait);
static DEFINE_TIMER(cmm_timer, NULL);
static void cmm_timer_fn(unsigned long); static void cmm_timer_fn(struct timer_list *);
static void cmm_set_timer(void); static void cmm_set_timer(void);
static DEFINE_TIMER(cmm_timer, cmm_timer_fn);
static long cmm_alloc_pages(long nr, long *counter, static long cmm_alloc_pages(long nr, long *counter,
struct cmm_page_array **list) struct cmm_page_array **list)
@ -194,13 +194,11 @@ static void cmm_set_timer(void)
if (mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds*HZ)) if (mod_timer(&cmm_timer, jiffies + cmm_timeout_seconds*HZ))
return; return;
} }
cmm_timer.function = cmm_timer_fn;
cmm_timer.data = 0;
cmm_timer.expires = jiffies + cmm_timeout_seconds*HZ; cmm_timer.expires = jiffies + cmm_timeout_seconds*HZ;
add_timer(&cmm_timer); add_timer(&cmm_timer);
} }
static void cmm_timer_fn(unsigned long ignored) static void cmm_timer_fn(struct timer_list *unused)
{ {
long nr; long nr;

View File

@ -59,9 +59,9 @@ static inline void heartbeat_toggle_bit(struct heartbeat_data *hd,
} }
} }
static void heartbeat_timer(unsigned long data) static void heartbeat_timer(struct timer_list *t)
{ {
struct heartbeat_data *hd = (struct heartbeat_data *)data; struct heartbeat_data *hd = from_timer(hd, t, timer);
static unsigned bit = 0, up = 1; static unsigned bit = 0, up = 1;
heartbeat_toggle_bit(hd, bit, hd->flags & HEARTBEAT_INVERTED); heartbeat_toggle_bit(hd, bit, hd->flags & HEARTBEAT_INVERTED);
@ -133,7 +133,7 @@ static int heartbeat_drv_probe(struct platform_device *pdev)
} }
} }
setup_timer(&hd->timer, heartbeat_timer, (unsigned long)hd); timer_setup(&hd->timer, heartbeat_timer, 0);
platform_set_drvdata(pdev, hd); platform_set_drvdata(pdev, hd);
return mod_timer(&hd->timer, jiffies + 1); return mod_timer(&hd->timer, jiffies + 1);

View File

@ -85,18 +85,18 @@ int __init pci_is_66mhz_capable(struct pci_channel *hose,
return cap66 > 0; return cap66 > 0;
} }
static void pcibios_enable_err(unsigned long __data) static void pcibios_enable_err(struct timer_list *t)
{ {
struct pci_channel *hose = (struct pci_channel *)__data; struct pci_channel *hose = from_timer(hose, t, err_timer);
del_timer(&hose->err_timer); del_timer(&hose->err_timer);
printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n"); printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n");
enable_irq(hose->err_irq); enable_irq(hose->err_irq);
} }
static void pcibios_enable_serr(unsigned long __data) static void pcibios_enable_serr(struct timer_list *t)
{ {
struct pci_channel *hose = (struct pci_channel *)__data; struct pci_channel *hose = from_timer(hose, t, serr_timer);
del_timer(&hose->serr_timer); del_timer(&hose->serr_timer);
printk(KERN_DEBUG "PCI: re-enabling system error IRQ.\n"); printk(KERN_DEBUG "PCI: re-enabling system error IRQ.\n");
@ -106,15 +106,11 @@ static void pcibios_enable_serr(unsigned long __data)
void pcibios_enable_timers(struct pci_channel *hose) void pcibios_enable_timers(struct pci_channel *hose)
{ {
if (hose->err_irq) { if (hose->err_irq) {
init_timer(&hose->err_timer); timer_setup(&hose->err_timer, pcibios_enable_err, 0);
hose->err_timer.data = (unsigned long)hose;
hose->err_timer.function = pcibios_enable_err;
} }
if (hose->serr_irq) { if (hose->serr_irq) {
init_timer(&hose->serr_timer); timer_setup(&hose->serr_timer, pcibios_enable_serr, 0);
hose->serr_timer.data = (unsigned long)hose;
hose->serr_timer.function = pcibios_enable_serr;
} }
} }

View File

@ -26,9 +26,9 @@ static ssize_t switch_show(struct device *dev,
} }
static DEVICE_ATTR(switch, S_IRUGO, switch_show, NULL); static DEVICE_ATTR(switch, S_IRUGO, switch_show, NULL);
static void switch_timer(unsigned long data) static void switch_timer(struct timer_list *t)
{ {
struct push_switch *psw = (struct push_switch *)data; struct push_switch *psw = from_timer(psw, t, debounce);
schedule_work(&psw->work); schedule_work(&psw->work);
} }
@ -78,10 +78,7 @@ static int switch_drv_probe(struct platform_device *pdev)
} }
INIT_WORK(&psw->work, switch_work_handler); INIT_WORK(&psw->work, switch_work_handler);
init_timer(&psw->debounce); timer_setup(&psw->debounce, switch_timer, 0);
psw->debounce.function = switch_timer;
psw->debounce.data = (unsigned long)psw;
/* Workqueue API brain-damage */ /* Workqueue API brain-damage */
psw->pdev = pdev; psw->pdev = pdev;

View File

@ -863,9 +863,9 @@ static void blk_queue_usage_counter_release(struct percpu_ref *ref)
wake_up_all(&q->mq_freeze_wq); wake_up_all(&q->mq_freeze_wq);
} }
static void blk_rq_timed_out_timer(unsigned long data) static void blk_rq_timed_out_timer(struct timer_list *t)
{ {
struct request_queue *q = (struct request_queue *)data; struct request_queue *q = from_timer(q, t, timeout);
kblockd_schedule_work(&q->timeout_work); kblockd_schedule_work(&q->timeout_work);
} }
@ -901,9 +901,9 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
q->backing_dev_info->name = "block"; q->backing_dev_info->name = "block";
q->node = node_id; q->node = node_id;
setup_timer(&q->backing_dev_info->laptop_mode_wb_timer, timer_setup(&q->backing_dev_info->laptop_mode_wb_timer,
laptop_mode_timer_fn, (unsigned long) q); laptop_mode_timer_fn, 0);
setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); timer_setup(&q->timeout, blk_rq_timed_out_timer, 0);
INIT_WORK(&q->timeout_work, NULL); INIT_WORK(&q->timeout_work, NULL);
INIT_LIST_HEAD(&q->queue_head); INIT_LIST_HEAD(&q->queue_head);
INIT_LIST_HEAD(&q->timeout_list); INIT_LIST_HEAD(&q->timeout_list);

View File

@ -79,9 +79,9 @@ void blk_stat_add(struct request *rq)
rcu_read_unlock(); rcu_read_unlock();
} }
static void blk_stat_timer_fn(unsigned long data) static void blk_stat_timer_fn(struct timer_list *t)
{ {
struct blk_stat_callback *cb = (void *)data; struct blk_stat_callback *cb = from_timer(cb, t, timer);
unsigned int bucket; unsigned int bucket;
int cpu; int cpu;
@ -130,7 +130,7 @@ blk_stat_alloc_callback(void (*timer_fn)(struct blk_stat_callback *),
cb->bucket_fn = bucket_fn; cb->bucket_fn = bucket_fn;
cb->data = data; cb->data = data;
cb->buckets = buckets; cb->buckets = buckets;
setup_timer(&cb->timer, blk_stat_timer_fn, (unsigned long)cb); timer_setup(&cb->timer, blk_stat_timer_fn, 0);
return cb; return cb;
} }

View File

@ -225,7 +225,7 @@ struct throtl_data
bool track_bio_latency; bool track_bio_latency;
}; };
static void throtl_pending_timer_fn(unsigned long arg); static void throtl_pending_timer_fn(struct timer_list *t);
static inline struct throtl_grp *pd_to_tg(struct blkg_policy_data *pd) static inline struct throtl_grp *pd_to_tg(struct blkg_policy_data *pd)
{ {
@ -478,8 +478,7 @@ static void throtl_service_queue_init(struct throtl_service_queue *sq)
INIT_LIST_HEAD(&sq->queued[0]); INIT_LIST_HEAD(&sq->queued[0]);
INIT_LIST_HEAD(&sq->queued[1]); INIT_LIST_HEAD(&sq->queued[1]);
sq->pending_tree = RB_ROOT; sq->pending_tree = RB_ROOT;
setup_timer(&sq->pending_timer, throtl_pending_timer_fn, timer_setup(&sq->pending_timer, throtl_pending_timer_fn, 0);
(unsigned long)sq);
} }
static struct blkg_policy_data *throtl_pd_alloc(gfp_t gfp, int node) 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,
* the top-level service_tree is reached, throtl_data->dispatch_work is * the top-level service_tree is reached, throtl_data->dispatch_work is
* kicked so that the ready bio's are issued. * kicked so that the ready bio's are issued.
*/ */
static void throtl_pending_timer_fn(unsigned long arg) static void throtl_pending_timer_fn(struct timer_list *t)
{ {
struct throtl_service_queue *sq = (void *)arg; struct throtl_service_queue *sq = from_timer(sq, t, pending_timer);
struct throtl_grp *tg = sq_to_tg(sq); struct throtl_grp *tg = sq_to_tg(sq);
struct throtl_data *td = sq_to_td(sq); struct throtl_data *td = sq_to_td(sq);
struct request_queue *q = td->queue; struct request_queue *q = td->queue;

View File

@ -293,7 +293,7 @@ static inline void __init show_version (void) {
*/ */
static void do_housekeeping (unsigned long arg); static void do_housekeeping (struct timer_list *t);
/********** globals **********/ /********** globals **********/
static unsigned short debug = 0; static unsigned short debug = 0;
@ -1493,8 +1493,8 @@ static const struct atmdev_ops amb_ops = {
}; };
/********** housekeeping **********/ /********** housekeeping **********/
static void do_housekeeping (unsigned long arg) { static void do_housekeeping (struct timer_list *t) {
amb_dev * dev = (amb_dev *) arg; amb_dev * dev = from_timer(dev, t, housekeeping);
// could collect device-specific (not driver/atm-linux) stats here // could collect device-specific (not driver/atm-linux) stats here
@ -2267,8 +2267,7 @@ static int amb_probe(struct pci_dev *pci_dev,
dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS; dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS;
dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS; dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS;
setup_timer(&dev->housekeeping, do_housekeeping, timer_setup(&dev->housekeeping, do_housekeeping, 0);
(unsigned long)dev);
mod_timer(&dev->housekeeping, jiffies); mod_timer(&dev->housekeeping, jiffies);
// enable host interrupts // enable host interrupts

View File

@ -1656,9 +1656,9 @@ static irqreturn_t fs_irq (int irq, void *dev_id)
#ifdef FS_POLL_FREQ #ifdef FS_POLL_FREQ
static void fs_poll (unsigned long data) static void fs_poll (struct timer_list *t)
{ {
struct fs_dev *dev = (struct fs_dev *) data; struct fs_dev *dev = from_timer(dev, t, timer);
fs_irq (0, dev); fs_irq (0, dev);
dev->timer.expires = jiffies + FS_POLL_FREQ; dev->timer.expires = jiffies + FS_POLL_FREQ;
@ -1885,9 +1885,7 @@ static int fs_init(struct fs_dev *dev)
} }
#ifdef FS_POLL_FREQ #ifdef FS_POLL_FREQ
init_timer (&dev->timer); timer_setup(&dev->timer, fs_poll, 0);
dev->timer.data = (unsigned long) dev;
dev->timer.function = fs_poll;
dev->timer.expires = jiffies + FS_POLL_FREQ; dev->timer.expires = jiffies + FS_POLL_FREQ;
add_timer (&dev->timer); add_timer (&dev->timer);
#endif #endif

View File

@ -357,7 +357,7 @@ static inline void __init show_version (void) {
/********** globals **********/ /********** globals **********/
static void do_housekeeping (unsigned long arg); static void do_housekeeping (struct timer_list *t);
static unsigned short debug = 0; static unsigned short debug = 0;
static unsigned short vpi_bits = 0; static unsigned short vpi_bits = 0;
@ -1418,9 +1418,9 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id)
/********** housekeeping **********/ /********** housekeeping **********/
static void do_housekeeping (unsigned long arg) { static void do_housekeeping (struct timer_list *t) {
// just stats at the moment // just stats at the moment
hrz_dev * dev = (hrz_dev *) arg; hrz_dev * dev = from_timer(dev, t, housekeeping);
// collect device-specific (not driver/atm-linux) stats here // collect device-specific (not driver/atm-linux) stats here
dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF);
@ -2796,7 +2796,7 @@ static int hrz_probe(struct pci_dev *pci_dev,
dev->atm_dev->ci_range.vpi_bits = vpi_bits; dev->atm_dev->ci_range.vpi_bits = vpi_bits;
dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; dev->atm_dev->ci_range.vci_bits = 10-vpi_bits;
setup_timer(&dev->housekeeping, do_housekeeping, (unsigned long) dev); timer_setup(&dev->housekeeping, do_housekeeping, 0);
mod_timer(&dev->housekeeping, jiffies); mod_timer(&dev->housekeeping, jiffies);
out: out:

View File

@ -45,8 +45,8 @@ static DEFINE_SPINLOCK(idt77105_priv_lock);
#define PUT(val,reg) dev->ops->phy_put(dev,val,IDT77105_##reg) #define PUT(val,reg) dev->ops->phy_put(dev,val,IDT77105_##reg)
#define GET(reg) dev->ops->phy_get(dev,IDT77105_##reg) #define GET(reg) dev->ops->phy_get(dev,IDT77105_##reg)
static void idt77105_stats_timer_func(unsigned long); static void idt77105_stats_timer_func(struct timer_list *);
static void idt77105_restart_timer_func(unsigned long); static void idt77105_restart_timer_func(struct timer_list *);
static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func); static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func);
@ -80,7 +80,7 @@ static u16 get_counter(struct atm_dev *dev, int counter)
* a separate copy of the stats allows implementation of * a separate copy of the stats allows implementation of
* an ioctl which gathers the stats *without* zero'ing them. * an ioctl which gathers the stats *without* zero'ing them.
*/ */
static void idt77105_stats_timer_func(unsigned long dummy) static void idt77105_stats_timer_func(struct timer_list *unused)
{ {
struct idt77105_priv *walk; struct idt77105_priv *walk;
struct atm_dev *dev; struct atm_dev *dev;
@ -109,7 +109,7 @@ static void idt77105_stats_timer_func(unsigned long dummy)
* interrupts need to be disabled when the cable is pulled out * interrupts need to be disabled when the cable is pulled out
* to avoid lots of spurious cell error interrupts. * to avoid lots of spurious cell error interrupts.
*/ */
static void idt77105_restart_timer_func(unsigned long dummy) static void idt77105_restart_timer_func(struct timer_list *unused)
{ {
struct idt77105_priv *walk; struct idt77105_priv *walk;
struct atm_dev *dev; struct atm_dev *dev;

View File

@ -1528,9 +1528,9 @@ idt77252_tx(struct idt77252_dev *card)
static void static void
tst_timer(unsigned long data) tst_timer(struct timer_list *t)
{ {
struct idt77252_dev *card = (struct idt77252_dev *)data; struct idt77252_dev *card = from_timer(card, t, tst_timer);
unsigned long base, idle, jump; unsigned long base, idle, jump;
unsigned long flags; unsigned long flags;
u32 pc; u32 pc;
@ -3634,7 +3634,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
spin_lock_init(&card->cmd_lock); spin_lock_init(&card->cmd_lock);
spin_lock_init(&card->tst_lock); spin_lock_init(&card->tst_lock);
setup_timer(&card->tst_timer, tst_timer, (unsigned long)card); timer_setup(&card->tst_timer, tst_timer, 0);
/* Do the I/O remapping... */ /* Do the I/O remapping... */
card->membase = ioremap(membase, 1024); card->membase = ioremap(membase, 1024);

View File

@ -75,7 +75,7 @@ static void desc_dbg(IADEV *iadev);
static IADEV *ia_dev[8]; static IADEV *ia_dev[8];
static struct atm_dev *_ia_dev[8]; static struct atm_dev *_ia_dev[8];
static int iadev_count; static int iadev_count;
static void ia_led_timer(unsigned long arg); static void ia_led_timer(struct timer_list *unused);
static DEFINE_TIMER(ia_timer, ia_led_timer); static DEFINE_TIMER(ia_timer, ia_led_timer);
static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ; static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ; 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) {
return; return;
} }
static void ia_led_timer(unsigned long arg) { static void ia_led_timer(struct timer_list *unused) {
unsigned long flags; unsigned long flags;
static u_char blinking[8] = {0, 0, 0, 0, 0, 0, 0, 0}; static u_char blinking[8] = {0, 0, 0, 0, 0, 0, 0, 0};
u_char i; u_char i;

View File

@ -1761,9 +1761,9 @@ static void iter_dequeue(struct lanai_dev *lanai, vci_t vci)
} }
#endif /* !DEBUG_RW */ #endif /* !DEBUG_RW */
static void lanai_timed_poll(unsigned long arg) static void lanai_timed_poll(struct timer_list *t)
{ {
struct lanai_dev *lanai = (struct lanai_dev *) arg; struct lanai_dev *lanai = from_timer(lanai, t, timer);
#ifndef DEBUG_RW #ifndef DEBUG_RW
unsigned long flags; unsigned long flags;
#ifdef USE_POWERDOWN #ifdef USE_POWERDOWN
@ -1790,10 +1790,8 @@ static void lanai_timed_poll(unsigned long arg)
static inline void lanai_timed_poll_start(struct lanai_dev *lanai) static inline void lanai_timed_poll_start(struct lanai_dev *lanai)
{ {
init_timer(&lanai->timer); timer_setup(&lanai->timer, lanai_timed_poll, 0);
lanai->timer.expires = jiffies + LANAI_POLL_PERIOD; lanai->timer.expires = jiffies + LANAI_POLL_PERIOD;
lanai->timer.data = (unsigned long) lanai;
lanai->timer.function = lanai_timed_poll;
add_timer(&lanai->timer); add_timer(&lanai->timer);
} }

View File

@ -145,7 +145,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user * arg);
#ifdef EXTRA_DEBUG #ifdef EXTRA_DEBUG
static void which_list(ns_dev * card, struct sk_buff *skb); static void which_list(ns_dev * card, struct sk_buff *skb);
#endif #endif
static void ns_poll(unsigned long arg); static void ns_poll(struct timer_list *unused);
static void ns_phy_put(struct atm_dev *dev, unsigned char value, static void ns_phy_put(struct atm_dev *dev, unsigned char value,
unsigned long addr); unsigned long addr);
static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr); static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr);
@ -284,10 +284,8 @@ static int __init nicstar_init(void)
XPRINTK("nicstar: nicstar_init() returned.\n"); XPRINTK("nicstar: nicstar_init() returned.\n");
if (!error) { if (!error) {
init_timer(&ns_timer); timer_setup(&ns_timer, ns_poll, 0);
ns_timer.expires = jiffies + NS_POLL_PERIOD; ns_timer.expires = jiffies + NS_POLL_PERIOD;
ns_timer.data = 0UL;
ns_timer.function = ns_poll;
add_timer(&ns_timer); add_timer(&ns_timer);
} }
@ -2681,7 +2679,7 @@ static void which_list(ns_dev * card, struct sk_buff *skb)
} }
#endif /* EXTRA_DEBUG */ #endif /* EXTRA_DEBUG */
static void ns_poll(unsigned long arg) static void ns_poll(struct timer_list *unused)
{ {
int i; int i;
ns_dev *card; ns_dev *card;

View File

@ -481,7 +481,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws)
* Use timer struct to check if the given source is initialized * Use timer struct to check if the given source is initialized
* by wakeup_source_add. * by wakeup_source_add.
*/ */
return ws->timer.function != (TIMER_FUNC_TYPE)pm_wakeup_timer_fn; return ws->timer.function != pm_wakeup_timer_fn;
} }
/* /*

View File

@ -3079,11 +3079,10 @@ DAC960_InitializeController(DAC960_Controller_T *Controller)
/* /*
Initialize the Monitoring Timer. Initialize the Monitoring Timer.
*/ */
init_timer(&Controller->MonitoringTimer); timer_setup(&Controller->MonitoringTimer,
DAC960_MonitoringTimerFunction, 0);
Controller->MonitoringTimer.expires = Controller->MonitoringTimer.expires =
jiffies + DAC960_MonitoringTimerInterval; jiffies + DAC960_MonitoringTimerInterval;
Controller->MonitoringTimer.data = (unsigned long) Controller;
Controller->MonitoringTimer.function = DAC960_MonitoringTimerFunction;
add_timer(&Controller->MonitoringTimer); add_timer(&Controller->MonitoringTimer);
Controller->ControllerInitialized = true; Controller->ControllerInitialized = true;
return true; return true;
@ -5620,9 +5619,9 @@ static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *Command)
the status of DAC960 Controllers. the status of DAC960 Controllers.
*/ */
static void DAC960_MonitoringTimerFunction(unsigned long TimerData) static void DAC960_MonitoringTimerFunction(struct timer_list *t)
{ {
DAC960_Controller_T *Controller = (DAC960_Controller_T *) TimerData; DAC960_Controller_T *Controller = from_timer(Controller, t, MonitoringTimer);
DAC960_Command_T *Command; DAC960_Command_T *Command;
unsigned long flags; unsigned long flags;

View File

@ -4406,7 +4406,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int, void *);
static irqreturn_t DAC960_P_InterruptHandler(int, void *); static irqreturn_t DAC960_P_InterruptHandler(int, void *);
static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *); static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *);
static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *); static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *);
static void DAC960_MonitoringTimerFunction(unsigned long); static void DAC960_MonitoringTimerFunction(struct timer_list *);
static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *, static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *,
DAC960_Controller_T *, ...); DAC960_Controller_T *, ...);
static void DAC960_CreateProcEntries(DAC960_Controller_T *); static void DAC960_CreateProcEntries(DAC960_Controller_T *);

View File

@ -1429,7 +1429,7 @@ aoecmd_ata_id(struct aoedev *d)
d->rttavg = RTTAVG_INIT; d->rttavg = RTTAVG_INIT;
d->rttdev = RTTDEV_INIT; d->rttdev = RTTDEV_INIT;
d->timer.function = (TIMER_FUNC_TYPE)rexmit_timer; d->timer.function = rexmit_timer;
skb = skb_clone(skb, GFP_ATOMIC); skb = skb_clone(skb, GFP_ATOMIC);
if (skb) { if (skb) {

View File

@ -342,8 +342,8 @@ static int NeedSeek = 0;
static void fd_select_side( int side ); static void fd_select_side( int side );
static void fd_select_drive( int drive ); static void fd_select_drive( int drive );
static void fd_deselect( void ); static void fd_deselect( void );
static void fd_motor_off_timer( unsigned long dummy ); static void fd_motor_off_timer(struct timer_list *unused);
static void check_change( unsigned long dummy ); static void check_change(struct timer_list *unused);
static irqreturn_t floppy_irq (int irq, void *dummy); static irqreturn_t floppy_irq (int irq, void *dummy);
static void fd_error( void ); static void fd_error( void );
static int do_format(int drive, int type, struct atari_format_descr *desc); static int do_format(int drive, int type, struct atari_format_descr *desc);
@ -353,12 +353,12 @@ static void fd_calibrate_done( int status );
static void fd_seek( void ); static void fd_seek( void );
static void fd_seek_done( int status ); static void fd_seek_done( int status );
static void fd_rwsec( void ); static void fd_rwsec( void );
static void fd_readtrack_check( unsigned long dummy ); static void fd_readtrack_check(struct timer_list *unused);
static void fd_rwsec_done( int status ); static void fd_rwsec_done( int status );
static void fd_rwsec_done1(int status); static void fd_rwsec_done1(int status);
static void fd_writetrack( void ); static void fd_writetrack( void );
static void fd_writetrack_done( int status ); static void fd_writetrack_done( int status );
static void fd_times_out( unsigned long dummy ); static void fd_times_out(struct timer_list *unused);
static void finish_fdc( void ); static void finish_fdc( void );
static void finish_fdc_done( int dummy ); static void finish_fdc_done( int dummy );
static void setup_req_params( int drive ); static void setup_req_params( int drive );
@ -479,7 +479,7 @@ static void fd_deselect( void )
* counts the index signals, which arrive only if one drive is selected. * counts the index signals, which arrive only if one drive is selected.
*/ */
static void fd_motor_off_timer( unsigned long dummy ) static void fd_motor_off_timer(struct timer_list *unused)
{ {
unsigned char status; unsigned char status;
@ -515,7 +515,7 @@ static void fd_motor_off_timer( unsigned long dummy )
* as possible) and keep track of the current state of the write protection. * as possible) and keep track of the current state of the write protection.
*/ */
static void check_change( unsigned long dummy ) static void check_change(struct timer_list *unused)
{ {
static int drive = 0; static int drive = 0;
@ -966,7 +966,7 @@ static void fd_rwsec( void )
} }
static void fd_readtrack_check( unsigned long dummy ) static void fd_readtrack_check(struct timer_list *unused)
{ {
unsigned long flags, addr, addr2; unsigned long flags, addr, addr2;
@ -1237,7 +1237,7 @@ static void fd_writetrack_done( int status )
fd_error(); fd_error();
} }
static void fd_times_out( unsigned long dummy ) static void fd_times_out(struct timer_list *unused)
{ {
atari_disable_irq( IRQ_MFP_FDC ); atari_disable_irq( IRQ_MFP_FDC );
if (!FloppyIRQHandler) goto end; /* int occurred after timer was fired, but if (!FloppyIRQHandler) goto end; /* int occurred after timer was fired, but

View File

@ -203,9 +203,9 @@ static int creg_queue_cmd(struct rsxx_cardinfo *card,
return 0; return 0;
} }
static void creg_cmd_timed_out(unsigned long data) static void creg_cmd_timed_out(struct timer_list *t)
{ {
struct rsxx_cardinfo *card = (struct rsxx_cardinfo *) data; struct rsxx_cardinfo *card = from_timer(card, t, creg_ctrl.cmd_timer);
struct creg_cmd *cmd; struct creg_cmd *cmd;
spin_lock(&card->creg_ctrl.lock); spin_lock(&card->creg_ctrl.lock);
@ -745,8 +745,7 @@ int rsxx_creg_setup(struct rsxx_cardinfo *card)
mutex_init(&card->creg_ctrl.reset_lock); mutex_init(&card->creg_ctrl.reset_lock);
INIT_LIST_HEAD(&card->creg_ctrl.queue); INIT_LIST_HEAD(&card->creg_ctrl.queue);
spin_lock_init(&card->creg_ctrl.lock); spin_lock_init(&card->creg_ctrl.lock);
setup_timer(&card->creg_ctrl.cmd_timer, creg_cmd_timed_out, timer_setup(&card->creg_ctrl.cmd_timer, creg_cmd_timed_out, 0);
(unsigned long) card);
return 0; return 0;
} }

View File

@ -354,9 +354,9 @@ static void rsxx_handle_dma_error(struct rsxx_dma_ctrl *ctrl,
rsxx_complete_dma(ctrl, dma, status); rsxx_complete_dma(ctrl, dma, status);
} }
static void dma_engine_stalled(unsigned long data) static void dma_engine_stalled(struct timer_list *t)
{ {
struct rsxx_dma_ctrl *ctrl = (struct rsxx_dma_ctrl *)data; struct rsxx_dma_ctrl *ctrl = from_timer(ctrl, t, activity_timer);
int cnt; int cnt;
if (atomic_read(&ctrl->stats.hw_q_depth) == 0 || if (atomic_read(&ctrl->stats.hw_q_depth) == 0 ||
@ -838,8 +838,7 @@ static int rsxx_dma_ctrl_init(struct pci_dev *dev,
mutex_init(&ctrl->work_lock); mutex_init(&ctrl->work_lock);
INIT_LIST_HEAD(&ctrl->queue); INIT_LIST_HEAD(&ctrl->queue);
setup_timer(&ctrl->activity_timer, dma_engine_stalled, timer_setup(&ctrl->activity_timer, dma_engine_stalled, 0);
(unsigned long)ctrl);
ctrl->issue_wq = alloc_ordered_workqueue(DRIVER_NAME"_issue", 0); ctrl->issue_wq = alloc_ordered_workqueue(DRIVER_NAME"_issue", 0);
if (!ctrl->issue_wq) if (!ctrl->issue_wq)

View File

@ -707,9 +707,9 @@ static void skd_start_queue(struct work_struct *work)
blk_mq_start_hw_queues(skdev->queue); blk_mq_start_hw_queues(skdev->queue);
} }
static void skd_timer_tick(ulong arg) static void skd_timer_tick(struct timer_list *t)
{ {
struct skd_device *skdev = (struct skd_device *)arg; struct skd_device *skdev = from_timer(skdev, t, timer);
unsigned long reqflags; unsigned long reqflags;
u32 state; u32 state;
@ -857,7 +857,7 @@ static int skd_start_timer(struct skd_device *skdev)
{ {
int rc; int rc;
setup_timer(&skdev->timer, skd_timer_tick, (ulong)skdev); timer_setup(&skdev->timer, skd_timer_tick, 0);
rc = mod_timer(&skdev->timer, (jiffies + HZ)); rc = mod_timer(&skdev->timer, (jiffies + HZ));
if (rc) if (rc)

View File

@ -81,7 +81,7 @@ struct vdc_port {
static void vdc_ldc_reset(struct vdc_port *port); static void vdc_ldc_reset(struct vdc_port *port);
static void vdc_ldc_reset_work(struct work_struct *work); static void vdc_ldc_reset_work(struct work_struct *work);
static void vdc_ldc_reset_timer(unsigned long _arg); static void vdc_ldc_reset_timer(struct timer_list *t);
static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio) static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio)
{ {
@ -974,8 +974,7 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
*/ */
ldc_timeout = mdesc_get_property(hp, vdev->mp, "vdc-timeout", NULL); ldc_timeout = mdesc_get_property(hp, vdev->mp, "vdc-timeout", NULL);
port->ldc_timeout = ldc_timeout ? *ldc_timeout : 0; port->ldc_timeout = ldc_timeout ? *ldc_timeout : 0;
setup_timer(&port->ldc_reset_timer, vdc_ldc_reset_timer, timer_setup(&port->ldc_reset_timer, vdc_ldc_reset_timer, 0);
(unsigned long)port);
INIT_WORK(&port->ldc_reset_work, vdc_ldc_reset_work); INIT_WORK(&port->ldc_reset_work, vdc_ldc_reset_work);
err = vio_driver_init(&port->vio, vdev, VDEV_DISK, err = vio_driver_init(&port->vio, vdev, VDEV_DISK,
@ -1087,9 +1086,9 @@ static void vdc_queue_drain(struct vdc_port *port)
__blk_end_request_all(req, BLK_STS_IOERR); __blk_end_request_all(req, BLK_STS_IOERR);
} }
static void vdc_ldc_reset_timer(unsigned long _arg) static void vdc_ldc_reset_timer(struct timer_list *t)
{ {
struct vdc_port *port = (struct vdc_port *) _arg; struct vdc_port *port = from_timer(port, t, ldc_reset_timer);
struct vio_driver_state *vio = &port->vio; struct vio_driver_state *vio = &port->vio;
unsigned long flags; unsigned long flags;

View File

@ -397,7 +397,7 @@ static void set_timeout(struct floppy_state *fs, int nticks,
if (fs->timeout_pending) if (fs->timeout_pending)
del_timer(&fs->timeout); del_timer(&fs->timeout);
fs->timeout.expires = jiffies + nticks; fs->timeout.expires = jiffies + nticks;
fs->timeout.function = (TIMER_FUNC_TYPE)proc; fs->timeout.function = proc;
add_timer(&fs->timeout); add_timer(&fs->timeout);
fs->timeout_pending = 1; fs->timeout_pending = 1;
} }

View File

@ -718,7 +718,7 @@ static void check_batteries(struct cardinfo *card)
set_fault_to_battery_status(card); set_fault_to_battery_status(card);
} }
static void check_all_batteries(unsigned long ptr) static void check_all_batteries(struct timer_list *unused)
{ {
int i; int i;
@ -738,8 +738,7 @@ static void check_all_batteries(unsigned long ptr)
static void init_battery_timer(void) static void init_battery_timer(void)
{ {
init_timer(&battery_timer); timer_setup(&battery_timer, check_all_batteries, 0);
battery_timer.function = check_all_batteries;
battery_timer.expires = jiffies + (HZ * 60); battery_timer.expires = jiffies + (HZ * 60);
add_timer(&battery_timer); add_timer(&battery_timer);
} }

View File

@ -770,9 +770,9 @@ static void ace_fsm_tasklet(unsigned long data)
spin_unlock_irqrestore(&ace->lock, flags); spin_unlock_irqrestore(&ace->lock, flags);
} }
static void ace_stall_timer(unsigned long data) static void ace_stall_timer(struct timer_list *t)
{ {
struct ace_device *ace = (void *)data; struct ace_device *ace = from_timer(ace, t, stall_timer);
unsigned long flags; unsigned long flags;
dev_warn(ace->dev, dev_warn(ace->dev,
@ -984,7 +984,7 @@ static int ace_setup(struct ace_device *ace)
* Initialize the state machine tasklet and stall timer * Initialize the state machine tasklet and stall timer
*/ */
tasklet_init(&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long)ace); tasklet_init(&ace->fsm_tasklet, ace_fsm_tasklet, (unsigned long)ace);
setup_timer(&ace->stall_timer, ace_stall_timer, (unsigned long)ace); timer_setup(&ace->stall_timer, ace_stall_timer, 0);
/* /*
* Initialize the request queue * Initialize the request queue

View File

@ -74,7 +74,7 @@
#endif /* TRACING */ #endif /* TRACING */
static DEFINE_MUTEX(dtlk_mutex); static DEFINE_MUTEX(dtlk_mutex);
static void dtlk_timer_tick(unsigned long data); static void dtlk_timer_tick(struct timer_list *unused);
static int dtlk_major; static int dtlk_major;
static int dtlk_port_lpc; static int dtlk_port_lpc;
@ -259,7 +259,7 @@ static unsigned int dtlk_poll(struct file *file, poll_table * wait)
return mask; return mask;
} }
static void dtlk_timer_tick(unsigned long data) static void dtlk_timer_tick(struct timer_list *unused)
{ {
TRACE_TEXT(" dtlk_timer_tick"); TRACE_TEXT(" dtlk_timer_tick");
wake_up_interruptible(&dtlk_process_list); wake_up_interruptible(&dtlk_process_list);

View File

@ -122,11 +122,11 @@ __setup("hcheck_dump_tasks", hangcheck_parse_dump_tasks);
/* Last time scheduled */ /* Last time scheduled */
static unsigned long long hangcheck_tsc, hangcheck_tsc_margin; static unsigned long long hangcheck_tsc, hangcheck_tsc_margin;
static void hangcheck_fire(unsigned long); static void hangcheck_fire(struct timer_list *);
static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire); static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire);
static void hangcheck_fire(unsigned long data) static void hangcheck_fire(struct timer_list *unused)
{ {
unsigned long long cur_tsc, tsc_diff; unsigned long long cur_tsc, tsc_diff;

View File

@ -367,9 +367,9 @@ static const struct file_operations bt_bmc_fops = {
.unlocked_ioctl = bt_bmc_ioctl, .unlocked_ioctl = bt_bmc_ioctl,
}; };
static void poll_timer(unsigned long data) static void poll_timer(struct timer_list *t)
{ {
struct bt_bmc *bt_bmc = (void *)data; struct bt_bmc *bt_bmc = from_timer(bt_bmc, t, poll_timer);
bt_bmc->poll_timer.expires += msecs_to_jiffies(500); bt_bmc->poll_timer.expires += msecs_to_jiffies(500);
wake_up(&bt_bmc->queue); wake_up(&bt_bmc->queue);
@ -487,8 +487,7 @@ static int bt_bmc_probe(struct platform_device *pdev)
dev_info(dev, "Using IRQ %d\n", bt_bmc->irq); dev_info(dev, "Using IRQ %d\n", bt_bmc->irq);
} else { } else {
dev_info(dev, "No IRQ; using timer\n"); dev_info(dev, "No IRQ; using timer\n");
setup_timer(&bt_bmc->poll_timer, poll_timer, timer_setup(&bt_bmc->poll_timer, poll_timer, 0);
(unsigned long)bt_bmc);
bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10); bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10);
add_timer(&bt_bmc->poll_timer); add_timer(&bt_bmc->poll_timer);
} }

View File

@ -4766,7 +4766,7 @@ static struct timer_list ipmi_timer;
static atomic_t stop_operation; static atomic_t stop_operation;
static void ipmi_timeout(unsigned long data) static void ipmi_timeout(struct timer_list *unused)
{ {
ipmi_smi_t intf; ipmi_smi_t intf;
int nt = 0; int nt = 0;
@ -5172,7 +5172,7 @@ static int ipmi_init_msghandler(void)
#endif /* CONFIG_IPMI_PROC_INTERFACE */ #endif /* CONFIG_IPMI_PROC_INTERFACE */
setup_timer(&ipmi_timer, ipmi_timeout, 0); timer_setup(&ipmi_timer, ipmi_timeout, 0);
mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES);
atomic_notifier_chain_register(&panic_notifier_list, &panic_block); atomic_notifier_chain_register(&panic_notifier_list, &panic_block);

View File

@ -1091,9 +1091,9 @@ static void set_need_watch(void *send_info, bool enable)
spin_unlock_irqrestore(&smi_info->si_lock, flags); spin_unlock_irqrestore(&smi_info->si_lock, flags);
} }
static void smi_timeout(unsigned long data) static void smi_timeout(struct timer_list *t)
{ {
struct smi_info *smi_info = (struct smi_info *) data; struct smi_info *smi_info = from_timer(smi_info, t, si_timer);
enum si_sm_result smi_result; enum si_sm_result smi_result;
unsigned long flags; unsigned long flags;
unsigned long jiffies_now; unsigned long jiffies_now;
@ -1166,7 +1166,7 @@ static int smi_start_processing(void *send_info,
new_smi->intf = intf; new_smi->intf = intf;
/* Set up the timer that drives the interface. */ /* Set up the timer that drives the interface. */
setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi); timer_setup(&new_smi->si_timer, smi_timeout, 0);
smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES); smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES);
/* Try to claim any interrupts. */ /* Try to claim any interrupts. */

View File

@ -551,9 +551,9 @@ static void start_get(struct ssif_info *ssif_info)
} }
} }
static void retry_timeout(unsigned long data) static void retry_timeout(struct timer_list *t)
{ {
struct ssif_info *ssif_info = (void *) data; struct ssif_info *ssif_info = from_timer(ssif_info, t, retry_timer);
unsigned long oflags, *flags; unsigned long oflags, *flags;
bool waiting; bool waiting;
@ -1691,8 +1691,7 @@ static int ssif_probe(struct i2c_client *client, const struct i2c_device_id *id)
spin_lock_init(&ssif_info->lock); spin_lock_init(&ssif_info->lock);
ssif_info->ssif_state = SSIF_NORMAL; ssif_info->ssif_state = SSIF_NORMAL;
setup_timer(&ssif_info->retry_timer, retry_timeout, timer_setup(&ssif_info->retry_timer, retry_timeout, 0);
(unsigned long)ssif_info);
for (i = 0; i < SSIF_NUM_STATS; i++) for (i = 0; i < SSIF_NUM_STATS; i++)
atomic_set(&ssif_info->stats[i], 0); atomic_set(&ssif_info->stats[i], 0);

View File

@ -23,7 +23,7 @@
#define __NWBUTTON_C /* Tell the header file who we are */ #define __NWBUTTON_C /* Tell the header file who we are */
#include "nwbutton.h" #include "nwbutton.h"
static void button_sequence_finished (unsigned long parameters); static void button_sequence_finished(struct timer_list *unused);
static int button_press_count; /* The count of button presses */ static int button_press_count; /* The count of button presses */
/* Times for the end of a sequence */ /* Times for the end of a sequence */
@ -127,7 +127,7 @@ static void button_consume_callbacks (int bpcount)
* any matching registered function callbacks, initiate reboot, etc.). * any matching registered function callbacks, initiate reboot, etc.).
*/ */
static void button_sequence_finished (unsigned long parameters) static void button_sequence_finished(struct timer_list *unused)
{ {
if (IS_ENABLED(CONFIG_NWBUTTON_REBOOT) && if (IS_ENABLED(CONFIG_NWBUTTON_REBOOT) &&
button_press_count == reboot_count) button_press_count == reboot_count)

View File

@ -25,7 +25,7 @@ struct button_callback {
/* Function prototypes: */ /* Function prototypes: */
static void button_sequence_finished (unsigned long parameters); static void button_sequence_finished(struct timer_list *unused);
static irqreturn_t button_handler (int irq, void *dev_id); static irqreturn_t button_handler (int irq, void *dev_id);
int button_init (void); int button_init (void);
int button_add_callback (void (*callback) (void), int count); int button_add_callback (void (*callback) (void), int count);

View File

@ -135,7 +135,7 @@ static struct fasync_struct *rtc_async_queue;
static DECLARE_WAIT_QUEUE_HEAD(rtc_wait); static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
#ifdef RTC_IRQ #ifdef RTC_IRQ
static void rtc_dropped_irq(unsigned long data); static void rtc_dropped_irq(struct timer_list *unused);
static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq); static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq);
#endif #endif
@ -1171,7 +1171,7 @@ module_exit(rtc_exit);
* for something that requires a steady > 1KHz signal anyways.) * for something that requires a steady > 1KHz signal anyways.)
*/ */
static void rtc_dropped_irq(unsigned long data) static void rtc_dropped_irq(struct timer_list *unused)
{ {
unsigned long freq; unsigned long freq;

View File

@ -22,9 +22,9 @@
#include "tpm.h" #include "tpm.h"
#include "tpm-dev.h" #include "tpm-dev.h"
static void user_reader_timeout(unsigned long ptr) static void user_reader_timeout(struct timer_list *t)
{ {
struct file_priv *priv = (struct file_priv *)ptr; struct file_priv *priv = from_timer(priv, t, user_read_timer);
pr_warn("TPM user space timeout is deprecated (pid=%d)\n", pr_warn("TPM user space timeout is deprecated (pid=%d)\n",
task_tgid_nr(current)); task_tgid_nr(current));
@ -48,8 +48,7 @@ void tpm_common_open(struct file *file, struct tpm_chip *chip,
priv->chip = chip; priv->chip = chip;
atomic_set(&priv->data_pending, 0); atomic_set(&priv->data_pending, 0);
mutex_init(&priv->buffer_mutex); mutex_init(&priv->buffer_mutex);
setup_timer(&priv->user_read_timer, user_reader_timeout, timer_setup(&priv->user_read_timer, user_reader_timeout, 0);
(unsigned long)priv);
INIT_WORK(&priv->work, timeout_work); INIT_WORK(&priv->work, timeout_work);
file->private_data = priv; file->private_data = priv;

View File

@ -177,7 +177,14 @@ out_fail:
return ret; return ret;
} }
void timer_of_exit(struct timer_of *to) /**
* timer_of_cleanup - release timer_of ressources
* @to: timer_of structure
*
* Release the ressources that has been used in timer_of_init().
* This function should be called in init error cases
*/
void __init timer_of_cleanup(struct timer_of *to)
{ {
if (to->flags & TIMER_OF_IRQ) if (to->flags & TIMER_OF_IRQ)
timer_irq_exit(&to->of_irq); timer_irq_exit(&to->of_irq);

View File

@ -68,6 +68,6 @@ static inline unsigned long timer_of_period(struct timer_of *to)
extern int __init timer_of_init(struct device_node *np, extern int __init timer_of_init(struct device_node *np,
struct timer_of *to); struct timer_of *to);
extern void timer_of_exit(struct timer_of *to); extern void __init timer_of_cleanup(struct timer_of *to);
#endif #endif

View File

@ -220,7 +220,7 @@ out_free_cpus:
return err; return err;
} }
static void dummy_callback(unsigned long ignored) {} static void dummy_callback(struct timer_list *unused) {}
static int suspend_cpu(int index, bool broadcast) static int suspend_cpu(int index, bool broadcast)
{ {
@ -287,7 +287,7 @@ static int suspend_test_thread(void *arg)
pr_info("CPU %d entering suspend cycles, states 1 through %d\n", pr_info("CPU %d entering suspend cycles, states 1 through %d\n",
cpu, drv->state_count - 1); cpu, drv->state_count - 1);
setup_timer_on_stack(&wakeup_timer, dummy_callback, 0); timer_setup_on_stack(&wakeup_timer, dummy_callback, 0);
for (i = 0; i < NUM_SUSPEND_CYCLE; ++i) { for (i = 0; i < NUM_SUSPEND_CYCLE; ++i) {
int index; int index;
/* /*

View File

@ -268,9 +268,10 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)
* *
* Checks for fence activity. * Checks for fence activity.
*/ */
static void amdgpu_fence_fallback(unsigned long arg) static void amdgpu_fence_fallback(struct timer_list *t)
{ {
struct amdgpu_ring *ring = (void *)arg; struct amdgpu_ring *ring = from_timer(ring, t,
fence_drv.fallback_timer);
amdgpu_fence_process(ring); amdgpu_fence_process(ring);
} }
@ -422,8 +423,7 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
atomic_set(&ring->fence_drv.last_seq, 0); atomic_set(&ring->fence_drv.last_seq, 0);
ring->fence_drv.initialized = false; ring->fence_drv.initialized = false;
setup_timer(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback, timer_setup(&ring->fence_drv.fallback_timer, amdgpu_fence_fallback, 0);
(unsigned long)ring);
ring->fence_drv.num_fences_mask = num_hw_submission * 2 - 1; ring->fence_drv.num_fences_mask = num_hw_submission * 2 - 1;
spin_lock_init(&ring->fence_drv.lock); spin_lock_init(&ring->fence_drv.lock);

View File

@ -367,9 +367,9 @@ void drm_vblank_disable_and_save(struct drm_device *dev, unsigned int pipe)
spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags); spin_unlock_irqrestore(&dev->vblank_time_lock, irqflags);
} }
static void vblank_disable_fn(unsigned long arg) static void vblank_disable_fn(struct timer_list *t)
{ {
struct drm_vblank_crtc *vblank = (void *)arg; struct drm_vblank_crtc *vblank = from_timer(vblank, t, disable_timer);
struct drm_device *dev = vblank->dev; struct drm_device *dev = vblank->dev;
unsigned int pipe = vblank->pipe; unsigned int pipe = vblank->pipe;
unsigned long irqflags; unsigned long irqflags;
@ -436,8 +436,7 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
vblank->dev = dev; vblank->dev = dev;
vblank->pipe = i; vblank->pipe = i;
init_waitqueue_head(&vblank->queue); init_waitqueue_head(&vblank->queue);
setup_timer(&vblank->disable_timer, vblank_disable_fn, timer_setup(&vblank->disable_timer, vblank_disable_fn, 0);
(unsigned long)vblank);
seqlock_init(&vblank->seqlock); seqlock_init(&vblank->seqlock);
} }
@ -1019,7 +1018,7 @@ static void drm_vblank_put(struct drm_device *dev, unsigned int pipe)
if (drm_vblank_offdelay == 0) if (drm_vblank_offdelay == 0)
return; return;
else if (drm_vblank_offdelay < 0) else if (drm_vblank_offdelay < 0)
vblank_disable_fn((unsigned long)vblank); vblank_disable_fn(&vblank->disable_timer);
else if (!dev->vblank_disable_immediate) else if (!dev->vblank_disable_immediate)
mod_timer(&vblank->disable_timer, mod_timer(&vblank->disable_timer,
jiffies + ((drm_vblank_offdelay * HZ)/1000)); jiffies + ((drm_vblank_offdelay * HZ)/1000));
@ -1650,7 +1649,7 @@ bool drm_handle_vblank(struct drm_device *dev, unsigned int pipe)
spin_unlock_irqrestore(&dev->event_lock, irqflags); spin_unlock_irqrestore(&dev->event_lock, irqflags);
if (disable_irq) if (disable_irq)
vblank_disable_fn((unsigned long)vblank); vblank_disable_fn(&vblank->disable_timer);
return true; return true;
} }

View File

@ -161,9 +161,9 @@ static const struct exynos_drm_crtc_ops vidi_crtc_ops = {
.atomic_flush = exynos_crtc_handle_event, .atomic_flush = exynos_crtc_handle_event,
}; };
static void vidi_fake_vblank_timer(unsigned long arg) static void vidi_fake_vblank_timer(struct timer_list *t)
{ {
struct vidi_context *ctx = (void *)arg; struct vidi_context *ctx = from_timer(ctx, t, timer);
if (drm_crtc_handle_vblank(&ctx->crtc->base)) if (drm_crtc_handle_vblank(&ctx->crtc->base))
mod_timer(&ctx->timer, mod_timer(&ctx->timer,
@ -449,7 +449,7 @@ static int vidi_probe(struct platform_device *pdev)
ctx->pdev = pdev; ctx->pdev = pdev;
setup_timer(&ctx->timer, vidi_fake_vblank_timer, (unsigned long)ctx); timer_setup(&ctx->timer, vidi_fake_vblank_timer, 0);
mutex_init(&ctx->lock); mutex_init(&ctx->lock);

View File

@ -601,9 +601,9 @@ tda998x_reset(struct tda998x_priv *priv)
* we have seen a HPD inactive->active transition. This code implements * we have seen a HPD inactive->active transition. This code implements
* that delay. * that delay.
*/ */
static void tda998x_edid_delay_done(unsigned long data) static void tda998x_edid_delay_done(struct timer_list *t)
{ {
struct tda998x_priv *priv = (struct tda998x_priv *)data; struct tda998x_priv *priv = from_timer(priv, t, edid_delay_timer);
priv->edid_delay_active = false; priv->edid_delay_active = false;
wake_up(&priv->edid_delay_waitq); wake_up(&priv->edid_delay_waitq);
@ -1492,8 +1492,7 @@ static int tda998x_create(struct i2c_client *client, struct tda998x_priv *priv)
mutex_init(&priv->mutex); /* protect the page access */ mutex_init(&priv->mutex); /* protect the page access */
init_waitqueue_head(&priv->edid_delay_waitq); init_waitqueue_head(&priv->edid_delay_waitq);
setup_timer(&priv->edid_delay_timer, tda998x_edid_delay_done, timer_setup(&priv->edid_delay_timer, tda998x_edid_delay_done, 0);
(unsigned long)priv);
INIT_WORK(&priv->detect_work, tda998x_detect_work); INIT_WORK(&priv->detect_work, tda998x_detect_work);
/* wake up the device: */ /* wake up the device: */

View File

@ -49,9 +49,9 @@ void onstack_fence_fini(struct i915_sw_fence *fence)
i915_sw_fence_fini(fence); i915_sw_fence_fini(fence);
} }
static void timed_fence_wake(unsigned long data) static void timed_fence_wake(struct timer_list *t)
{ {
struct timed_fence *tf = (struct timed_fence *)data; struct timed_fence *tf = from_timer(tf, t, timer);
i915_sw_fence_commit(&tf->fence); i915_sw_fence_commit(&tf->fence);
} }
@ -60,7 +60,7 @@ void timed_fence_init(struct timed_fence *tf, unsigned long expires)
{ {
onstack_fence_init(&tf->fence); onstack_fence_init(&tf->fence);
setup_timer_on_stack(&tf->timer, timed_fence_wake, (unsigned long)tf); timer_setup_on_stack(&tf->timer, timed_fence_wake, 0);
if (time_after(expires, jiffies)) if (time_after(expires, jiffies))
mod_timer(&tf->timer, expires); mod_timer(&tf->timer, expires);

View File

@ -82,9 +82,9 @@ static struct msm_ringbuffer *get_next_ring(struct msm_gpu *gpu)
return NULL; return NULL;
} }
static void a5xx_preempt_timer(unsigned long data) static void a5xx_preempt_timer(struct timer_list *t)
{ {
struct a5xx_gpu *a5xx_gpu = (struct a5xx_gpu *) data; struct a5xx_gpu *a5xx_gpu = from_timer(a5xx_gpu, t, preempt_timer);
struct msm_gpu *gpu = &a5xx_gpu->base.base; struct msm_gpu *gpu = &a5xx_gpu->base.base;
struct drm_device *dev = gpu->dev; struct drm_device *dev = gpu->dev;
struct msm_drm_private *priv = dev->dev_private; struct msm_drm_private *priv = dev->dev_private;
@ -300,6 +300,5 @@ void a5xx_preempt_init(struct msm_gpu *gpu)
} }
} }
setup_timer(&a5xx_gpu->preempt_timer, a5xx_preempt_timer, timer_setup(&a5xx_gpu->preempt_timer, a5xx_preempt_timer, 0);
(unsigned long) a5xx_gpu);
} }

View File

@ -353,9 +353,9 @@ static void hangcheck_timer_reset(struct msm_gpu *gpu)
round_jiffies_up(jiffies + DRM_MSM_HANGCHECK_JIFFIES)); round_jiffies_up(jiffies + DRM_MSM_HANGCHECK_JIFFIES));
} }
static void hangcheck_handler(unsigned long data) static void hangcheck_handler(struct timer_list *t)
{ {
struct msm_gpu *gpu = (struct msm_gpu *)data; struct msm_gpu *gpu = from_timer(gpu, t, hangcheck_timer);
struct drm_device *dev = gpu->dev; struct drm_device *dev = gpu->dev;
struct msm_drm_private *priv = dev->dev_private; struct msm_drm_private *priv = dev->dev_private;
struct msm_ringbuffer *ring = gpu->funcs->active_ring(gpu); 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,
INIT_WORK(&gpu->recover_work, recover_worker); INIT_WORK(&gpu->recover_work, recover_worker);
setup_timer(&gpu->hangcheck_timer, hangcheck_handler, timer_setup(&gpu->hangcheck_timer, hangcheck_handler, 0);
(unsigned long)gpu);
spin_lock_init(&gpu->perf_lock); spin_lock_init(&gpu->perf_lock);

View File

@ -4095,7 +4095,7 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev)
} }
#ifdef DSI_CATCH_MISSING_TE #ifdef DSI_CATCH_MISSING_TE
static void dsi_te_timeout(unsigned long arg) static void dsi_te_timeout(struct timer_list *unused)
{ {
DSSERR("TE not received for 250ms!\n"); DSSERR("TE not received for 250ms!\n");
} }
@ -5449,9 +5449,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)
dsi_framedone_timeout_work_callback); dsi_framedone_timeout_work_callback);
#ifdef DSI_CATCH_MISSING_TE #ifdef DSI_CATCH_MISSING_TE
init_timer(&dsi->te_timer); timer_setup(&dsi->te_timer, dsi_te_timeout, 0);
dsi->te_timer.function = dsi_te_timeout;
dsi->te_timer.data = 0;
#endif #endif
dsi_mem = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto"); dsi_mem = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto");

View File

@ -101,9 +101,9 @@ static void psr_set_state(struct psr_drv *psr, enum psr_state state)
spin_unlock_irqrestore(&psr->lock, flags); spin_unlock_irqrestore(&psr->lock, flags);
} }
static void psr_flush_handler(unsigned long data) static void psr_flush_handler(struct timer_list *t)
{ {
struct psr_drv *psr = (struct psr_drv *)data; struct psr_drv *psr = from_timer(psr, t, flush_timer);
unsigned long flags; unsigned long flags;
/* If the state has changed since we initiated the flush, do nothing */ /* 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,
if (!psr) if (!psr)
return -ENOMEM; return -ENOMEM;
setup_timer(&psr->flush_timer, psr_flush_handler, (unsigned long)psr); timer_setup(&psr->flush_timer, psr_flush_handler, 0);
spin_lock_init(&psr->lock); spin_lock_init(&psr->lock);
psr->active = true; psr->active = true;

View File

@ -674,10 +674,9 @@ void vc4_bo_dec_usecnt(struct vc4_bo *bo)
mutex_unlock(&bo->madv_lock); mutex_unlock(&bo->madv_lock);
} }
static void vc4_bo_cache_time_timer(unsigned long data) static void vc4_bo_cache_time_timer(struct timer_list *t)
{ {
struct drm_device *dev = (struct drm_device *)data; struct vc4_dev *vc4 = from_timer(vc4, t, bo_cache.time_timer);
struct vc4_dev *vc4 = to_vc4_dev(dev);
schedule_work(&vc4->bo_cache.time_work); schedule_work(&vc4->bo_cache.time_work);
} }
@ -1039,9 +1038,7 @@ int vc4_bo_cache_init(struct drm_device *dev)
INIT_LIST_HEAD(&vc4->bo_cache.time_list); INIT_LIST_HEAD(&vc4->bo_cache.time_list);
INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work); INIT_WORK(&vc4->bo_cache.time_work, vc4_bo_cache_time_work);
setup_timer(&vc4->bo_cache.time_timer, timer_setup(&vc4->bo_cache.time_timer, vc4_bo_cache_time_timer, 0);
vc4_bo_cache_time_timer,
(unsigned long)dev);
return 0; return 0;
} }

View File

@ -312,10 +312,10 @@ vc4_reset_work(struct work_struct *work)
} }
static void static void
vc4_hangcheck_elapsed(unsigned long data) vc4_hangcheck_elapsed(struct timer_list *t)
{ {
struct drm_device *dev = (struct drm_device *)data; struct vc4_dev *vc4 = from_timer(vc4, t, hangcheck.timer);
struct vc4_dev *vc4 = to_vc4_dev(dev); struct drm_device *dev = vc4->dev;
uint32_t ct0ca, ct1ca; uint32_t ct0ca, ct1ca;
unsigned long irqflags; unsigned long irqflags;
struct vc4_exec_info *bin_exec, *render_exec; struct vc4_exec_info *bin_exec, *render_exec;
@ -1154,9 +1154,7 @@ vc4_gem_init(struct drm_device *dev)
spin_lock_init(&vc4->job_lock); spin_lock_init(&vc4->job_lock);
INIT_WORK(&vc4->hangcheck.reset_work, vc4_reset_work); INIT_WORK(&vc4->hangcheck.reset_work, vc4_reset_work);
setup_timer(&vc4->hangcheck.timer, timer_setup(&vc4->hangcheck.timer, vc4_hangcheck_elapsed, 0);
vc4_hangcheck_elapsed,
(unsigned long)dev);
INIT_WORK(&vc4->job_done_work, vc4_job_done_work); INIT_WORK(&vc4->job_done_work, vc4_job_done_work);

View File

@ -85,9 +85,9 @@ static const struct dma_fence_ops vgem_fence_ops = {
.timeline_value_str = vgem_fence_timeline_value_str, .timeline_value_str = vgem_fence_timeline_value_str,
}; };
static void vgem_fence_timeout(unsigned long data) static void vgem_fence_timeout(struct timer_list *t)
{ {
struct vgem_fence *fence = (struct vgem_fence *)data; struct vgem_fence *fence = from_timer(fence, t, timer);
dma_fence_signal(&fence->base); dma_fence_signal(&fence->base);
} }
@ -105,7 +105,7 @@ static struct dma_fence *vgem_fence_create(struct vgem_file *vfile,
dma_fence_init(&fence->base, &vgem_fence_ops, &fence->lock, dma_fence_init(&fence->base, &vgem_fence_ops, &fence->lock,
dma_fence_context_alloc(1), 1); dma_fence_context_alloc(1), 1);
setup_timer(&fence->timer, vgem_fence_timeout, (unsigned long)fence); timer_setup(&fence->timer, vgem_fence_timeout, 0);
/* We force the fence to expire within 10s to prevent driver hangs */ /* We force the fence to expire within 10s to prevent driver hangs */
mod_timer(&fence->timer, jiffies + VGEM_FENCE_TIMEOUT); mod_timer(&fence->timer, jiffies + VGEM_FENCE_TIMEOUT);

View File

@ -452,9 +452,9 @@ via_dmablit_sync(struct drm_device *dev, uint32_t handle, int engine)
static void static void
via_dmablit_timer(unsigned long data) via_dmablit_timer(struct timer_list *t)
{ {
drm_via_blitq_t *blitq = (drm_via_blitq_t *) data; drm_via_blitq_t *blitq = from_timer(blitq, t, poll_timer);
struct drm_device *dev = blitq->dev; struct drm_device *dev = blitq->dev;
int engine = (int) int engine = (int)
(blitq - ((drm_via_private_t *)dev->dev_private)->blit_queues); (blitq - ((drm_via_private_t *)dev->dev_private)->blit_queues);
@ -559,8 +559,7 @@ via_init_dmablit(struct drm_device *dev)
init_waitqueue_head(blitq->blit_queue + j); init_waitqueue_head(blitq->blit_queue + j);
init_waitqueue_head(&blitq->busy_queue); init_waitqueue_head(&blitq->busy_queue);
INIT_WORK(&blitq->wq, via_dmablit_workqueue); INIT_WORK(&blitq->wq, via_dmablit_workqueue);
setup_timer(&blitq->poll_timer, via_dmablit_timer, timer_setup(&blitq->poll_timer, via_dmablit_timer, 0);
(unsigned long)blitq);
} }
} }

View File

@ -173,9 +173,9 @@ static void battery_flat(struct appleir *appleir)
dev_err(&appleir->input_dev->dev, "possible flat battery?\n"); dev_err(&appleir->input_dev->dev, "possible flat battery?\n");
} }
static void key_up_tick(unsigned long data) static void key_up_tick(struct timer_list *t)
{ {
struct appleir *appleir = (struct appleir *)data; struct appleir *appleir = from_timer(appleir, t, key_up_timer);
struct hid_device *hid = appleir->hid; struct hid_device *hid = appleir->hid;
unsigned long flags; unsigned long flags;
@ -303,8 +303,7 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id)
hid->quirks |= HID_QUIRK_HIDINPUT_FORCE; hid->quirks |= HID_QUIRK_HIDINPUT_FORCE;
spin_lock_init(&appleir->lock); spin_lock_init(&appleir->lock);
setup_timer(&appleir->key_up_timer, timer_setup(&appleir->key_up_timer, key_up_tick, 0);
key_up_tick, (unsigned long) appleir);
hid_set_drvdata(hid, appleir); hid_set_drvdata(hid, appleir);

View File

@ -239,9 +239,9 @@ drop_note:
return; return;
} }
static void pcmidi_sustained_note_release(unsigned long data) static void pcmidi_sustained_note_release(struct timer_list *t)
{ {
struct pcmidi_sustain *pms = (struct pcmidi_sustain *)data; struct pcmidi_sustain *pms = from_timer(pms, t, timer);
pcmidi_send_note(pms->pm, pms->status, pms->note, pms->velocity); pcmidi_send_note(pms->pm, pms->status, pms->note, pms->velocity);
pms->in_use = 0; pms->in_use = 0;
@ -256,8 +256,7 @@ static void init_sustain_timers(struct pcmidi_snd *pm)
pms = &pm->sustained_notes[i]; pms = &pm->sustained_notes[i];
pms->in_use = 0; pms->in_use = 0;
pms->pm = pm; pms->pm = pm;
setup_timer(&pms->timer, pcmidi_sustained_note_release, timer_setup(&pms->timer, pcmidi_sustained_note_release, 0);
(unsigned long)pms);
} }
} }

View File

@ -1226,9 +1226,9 @@ static void wiimote_schedule(struct wiimote_data *wdata)
spin_unlock_irqrestore(&wdata->state.lock, flags); spin_unlock_irqrestore(&wdata->state.lock, flags);
} }
static void wiimote_init_timeout(unsigned long arg) static void wiimote_init_timeout(struct timer_list *t)
{ {
struct wiimote_data *wdata = (void*)arg; struct wiimote_data *wdata = from_timer(wdata, t, timer);
wiimote_schedule(wdata); wiimote_schedule(wdata);
} }
@ -1740,7 +1740,7 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev)
wdata->state.cmd_battery = 0xff; wdata->state.cmd_battery = 0xff;
INIT_WORK(&wdata->init_worker, wiimote_init_worker); INIT_WORK(&wdata->init_worker, wiimote_init_worker);
setup_timer(&wdata->timer, wiimote_init_timeout, (long)wdata); timer_setup(&wdata->timer, wiimote_init_timeout, 0);
return wdata; return wdata;
} }

View File

@ -175,9 +175,9 @@ static void ssp_wdt_work_func(struct work_struct *work)
data->timeout_cnt = 0; data->timeout_cnt = 0;
} }
static void ssp_wdt_timer_func(unsigned long ptr) static void ssp_wdt_timer_func(struct timer_list *t)
{ {
struct ssp_data *data = (struct ssp_data *)ptr; struct ssp_data *data = from_timer(data, t, wdt_timer);
switch (data->fw_dl_state) { switch (data->fw_dl_state) {
case SSP_FW_DL_STATE_FAIL: case SSP_FW_DL_STATE_FAIL:
@ -571,7 +571,7 @@ static int ssp_probe(struct spi_device *spi)
INIT_WORK(&data->work_wdt, ssp_wdt_work_func); INIT_WORK(&data->work_wdt, ssp_wdt_work_func);
INIT_DELAYED_WORK(&data->work_refresh, ssp_refresh_task); INIT_DELAYED_WORK(&data->work_refresh, ssp_refresh_task);
setup_timer(&data->wdt_timer, ssp_wdt_timer_func, (unsigned long)data); timer_setup(&data->wdt_timer, ssp_wdt_timer_func, 0);
ret = request_threaded_irq(data->spi->irq, NULL, ret = request_threaded_irq(data->spi->irq, NULL,
ssp_irq_thread_fn, ssp_irq_thread_fn,

View File

@ -642,9 +642,9 @@ err:
return -ENOMEM; return -ENOMEM;
} }
static void delay_time_func(unsigned long ctx) static void delay_time_func(struct timer_list *t)
{ {
struct mlx5_ib_dev *dev = (struct mlx5_ib_dev *)ctx; struct mlx5_ib_dev *dev = from_timer(dev, t, delay_timer);
dev->fill_delay = 0; dev->fill_delay = 0;
} }
@ -663,7 +663,7 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev)
return -ENOMEM; return -ENOMEM;
} }
setup_timer(&dev->delay_timer, delay_time_func, (unsigned long)dev); timer_setup(&dev->delay_timer, delay_time_func, 0);
for (i = 0; i < MAX_MR_CACHE_ENTRIES; i++) { for (i = 0; i < MAX_MR_CACHE_ENTRIES; i++) {
ent = &cache->ent[i]; ent = &cache->ent[i];
INIT_LIST_HEAD(&ent->head); INIT_LIST_HEAD(&ent->head);

View File

@ -130,9 +130,9 @@ static void handle_catas(struct mthca_dev *dev)
spin_unlock_irqrestore(&catas_lock, flags); spin_unlock_irqrestore(&catas_lock, flags);
} }
static void poll_catas(unsigned long dev_ptr) static void poll_catas(struct timer_list *t)
{ {
struct mthca_dev *dev = (struct mthca_dev *) dev_ptr; struct mthca_dev *dev = from_timer(dev, t, catas_err.timer);
int i; int i;
for (i = 0; i < dev->catas_err.size; ++i) for (i = 0; i < dev->catas_err.size; ++i)
@ -149,7 +149,7 @@ void mthca_start_catas_poll(struct mthca_dev *dev)
{ {
phys_addr_t addr; phys_addr_t addr;
init_timer(&dev->catas_err.timer); timer_setup(&dev->catas_err.timer, poll_catas, 0);
dev->catas_err.map = NULL; dev->catas_err.map = NULL;
addr = pci_resource_start(dev->pdev, 0) + addr = pci_resource_start(dev->pdev, 0) +
@ -164,8 +164,6 @@ void mthca_start_catas_poll(struct mthca_dev *dev)
return; return;
} }
dev->catas_err.timer.data = (unsigned long) dev;
dev->catas_err.timer.function = poll_catas;
dev->catas_err.timer.expires = jiffies + MTHCA_CATAS_POLL_INTERVAL; dev->catas_err.timer.expires = jiffies + MTHCA_CATAS_POLL_INTERVAL;
INIT_LIST_HEAD(&dev->catas_err.list); INIT_LIST_HEAD(&dev->catas_err.list);
add_timer(&dev->catas_err.timer); add_timer(&dev->catas_err.timer);

View File

@ -3819,7 +3819,7 @@ void nes_port_ibevent(struct nes_vnic *nesvnic)
if (!nesvnic->event_timer.function) { if (!nesvnic->event_timer.function) {
ib_dispatch_event(&event); ib_dispatch_event(&event);
nesvnic->last_dispatched_event = event.event; nesvnic->last_dispatched_event = event.event;
nesvnic->event_timer.function = (TIMER_FUNC_TYPE)nes_handle_delayed_event; nesvnic->event_timer.function = nes_handle_delayed_event;
nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY; nesvnic->event_timer.expires = jiffies + NES_EVENT_DELAY;
add_timer(&nesvnic->event_timer); add_timer(&nesvnic->event_timer);
} else { } else {

View File

@ -202,9 +202,9 @@ void gameport_stop_polling(struct gameport *gameport)
} }
EXPORT_SYMBOL(gameport_stop_polling); EXPORT_SYMBOL(gameport_stop_polling);
static void gameport_run_poll_handler(unsigned long d) static void gameport_run_poll_handler(struct timer_list *t)
{ {
struct gameport *gameport = (struct gameport *)d; struct gameport *gameport = from_timer(gameport, t, poll_timer);
gameport->poll_handler(gameport); gameport->poll_handler(gameport);
if (gameport->poll_cnt) if (gameport->poll_cnt)
@ -542,8 +542,7 @@ static void gameport_init_port(struct gameport *gameport)
INIT_LIST_HEAD(&gameport->node); INIT_LIST_HEAD(&gameport->node);
spin_lock_init(&gameport->timer_lock); spin_lock_init(&gameport->timer_lock);
setup_timer(&gameport->poll_timer, gameport_run_poll_handler, timer_setup(&gameport->poll_timer, gameport_run_poll_handler, 0);
(unsigned long)gameport);
} }
/* /*

View File

@ -2047,7 +2047,7 @@ static void devm_input_device_unregister(struct device *dev, void *res)
*/ */
void input_enable_softrepeat(struct input_dev *dev, int delay, int period) void input_enable_softrepeat(struct input_dev *dev, int delay, int period)
{ {
dev->timer.function = (TIMER_FUNC_TYPE)input_repeat_key; dev->timer.function = input_repeat_key;
dev->rep[REP_DELAY] = delay; dev->rep[REP_DELAY] = delay;
dev->rep[REP_PERIOD] = period; dev->rep[REP_PERIOD] = period;
} }

View File

@ -364,9 +364,9 @@ static int db9_saturn(int mode, struct parport *port, struct input_dev *devs[])
return 0; return 0;
} }
static void db9_timer(unsigned long private) static void db9_timer(struct timer_list *t)
{ {
struct db9 *db9 = (void *) private; struct db9 *db9 = from_timer(db9, t, timer);
struct parport *port = db9->pd->port; struct parport *port = db9->pd->port;
struct input_dev *dev = db9->dev[0]; struct input_dev *dev = db9->dev[0];
struct input_dev *dev2 = db9->dev[1]; struct input_dev *dev2 = db9->dev[1];
@ -609,7 +609,7 @@ static void db9_attach(struct parport *pp)
db9->pd = pd; db9->pd = pd;
db9->mode = mode; db9->mode = mode;
db9->parportno = pp->number; db9->parportno = pp->number;
setup_timer(&db9->timer, db9_timer, (long)db9); timer_setup(&db9->timer, db9_timer, 0);
for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) { for (i = 0; i < (min(db9_mode->n_pads, DB9_MAX_DEVICES)); i++) {

View File

@ -743,9 +743,9 @@ static void gc_psx_process_packet(struct gc *gc)
* gc_timer() initiates reads of console pads data. * gc_timer() initiates reads of console pads data.
*/ */
static void gc_timer(unsigned long private) static void gc_timer(struct timer_list *t)
{ {
struct gc *gc = (void *) private; struct gc *gc = from_timer(gc, t, timer);
/* /*
* N64 pads - must be read first, any read confuses them for 200 us * N64 pads - must be read first, any read confuses them for 200 us
@ -974,7 +974,7 @@ static void gc_attach(struct parport *pp)
mutex_init(&gc->mutex); mutex_init(&gc->mutex);
gc->pd = pd; gc->pd = pd;
gc->parportno = pp->number; gc->parportno = pp->number;
setup_timer(&gc->timer, gc_timer, (long) gc); timer_setup(&gc->timer, gc_timer, 0);
for (i = 0; i < n_pads && i < GC_MAX_DEVICES; i++) { for (i = 0; i < n_pads && i < GC_MAX_DEVICES; i++) {
if (!pads[i]) if (!pads[i])

View File

@ -89,9 +89,9 @@ static struct tgfx {
* tgfx_timer() reads and analyzes TurboGraFX joystick data. * tgfx_timer() reads and analyzes TurboGraFX joystick data.
*/ */
static void tgfx_timer(unsigned long private) static void tgfx_timer(struct timer_list *t)
{ {
struct tgfx *tgfx = (void *) private; struct tgfx *tgfx = from_timer(tgfx, t, timer);
struct input_dev *dev; struct input_dev *dev;
int data1, data2, i; int data1, data2, i;
@ -200,7 +200,7 @@ static void tgfx_attach(struct parport *pp)
mutex_init(&tgfx->sem); mutex_init(&tgfx->sem);
tgfx->pd = pd; tgfx->pd = pd;
tgfx->parportno = pp->number; tgfx->parportno = pp->number;
setup_timer(&tgfx->timer, tgfx_timer, (long)tgfx); timer_setup(&tgfx->timer, tgfx_timer, 0);
for (i = 0; i < n_devs; i++) { for (i = 0; i < n_devs; i++) {
if (n_buttons[i] < 1) if (n_buttons[i] < 1)

View File

@ -102,7 +102,7 @@ static inline bool get_down(unsigned long data0, unsigned long data1)
!(data1 & S3C2410_ADCDAT0_UPDOWN)); !(data1 & S3C2410_ADCDAT0_UPDOWN));
} }
static void touch_timer_fire(unsigned long data) static void touch_timer_fire(struct timer_list *unused)
{ {
unsigned long data0; unsigned long data0;
unsigned long data1; unsigned long data1;

View File

@ -36,7 +36,7 @@ static unsigned long iova_rcache_get(struct iova_domain *iovad,
static void init_iova_rcaches(struct iova_domain *iovad); static void init_iova_rcaches(struct iova_domain *iovad);
static void free_iova_rcaches(struct iova_domain *iovad); static void free_iova_rcaches(struct iova_domain *iovad);
static void fq_destroy_all_entries(struct iova_domain *iovad); static void fq_destroy_all_entries(struct iova_domain *iovad);
static void fq_flush_timeout(unsigned long data); static void fq_flush_timeout(struct timer_list *t);
void void
init_iova_domain(struct iova_domain *iovad, unsigned long granule, init_iova_domain(struct iova_domain *iovad, unsigned long granule,
@ -107,7 +107,7 @@ int init_iova_flush_queue(struct iova_domain *iovad,
spin_lock_init(&fq->lock); spin_lock_init(&fq->lock);
} }
setup_timer(&iovad->fq_timer, fq_flush_timeout, (unsigned long)iovad); timer_setup(&iovad->fq_timer, fq_flush_timeout, 0);
atomic_set(&iovad->fq_timer_on, 0); atomic_set(&iovad->fq_timer_on, 0);
return 0; return 0;
@ -519,9 +519,9 @@ static void fq_destroy_all_entries(struct iova_domain *iovad)
} }
} }
static void fq_flush_timeout(unsigned long data) static void fq_flush_timeout(struct timer_list *t)
{ {
struct iova_domain *iovad = (struct iova_domain *)data; struct iova_domain *iovad = from_timer(iovad, t, fq_timer);
int cpu; int cpu;
atomic_set(&iovad->fq_timer_on, 0); atomic_set(&iovad->fq_timer_on, 0);

View File

@ -2235,9 +2235,9 @@ static void send_listen(capidrv_contr *card)
send_message(card, &cmdcmsg); send_message(card, &cmdcmsg);
} }
static void listentimerfunc(unsigned long x) static void listentimerfunc(struct timer_list *t)
{ {
capidrv_contr *card = (capidrv_contr *)x; capidrv_contr *card = from_timer(card, t, listentimer);
if (card->state != ST_LISTEN_NONE && card->state != ST_LISTEN_ACTIVE) if (card->state != ST_LISTEN_NONE && card->state != ST_LISTEN_ACTIVE)
printk(KERN_ERR "%s: controller dead ??\n", card->name); printk(KERN_ERR "%s: controller dead ??\n", card->name);
send_listen(card); send_listen(card);
@ -2264,7 +2264,7 @@ static int capidrv_addcontr(u16 contr, struct capi_profile *profp)
return -1; return -1;
} }
card->owner = THIS_MODULE; card->owner = THIS_MODULE;
setup_timer(&card->listentimer, listentimerfunc, (unsigned long)card); timer_setup(&card->listentimer, listentimerfunc, 0);
strcpy(card->name, id); strcpy(card->name, id);
card->contrnr = contr; card->contrnr = contr;
card->nbchan = profp->nbchannel; card->nbchan = profp->nbchannel;

View File

@ -55,10 +55,10 @@ DEFINE_SPINLOCK(divert_lock);
/***************************/ /***************************/
/* timer callback function */ /* timer callback function */
/***************************/ /***************************/
static void deflect_timer_expire(ulong arg) static void deflect_timer_expire(struct timer_list *t)
{ {
unsigned long flags; unsigned long flags;
struct call_struc *cs = (struct call_struc *) arg; struct call_struc *cs = from_timer(cs, t, timer);
spin_lock_irqsave(&divert_lock, flags); spin_lock_irqsave(&divert_lock, flags);
del_timer(&cs->timer); /* delete active timer */ del_timer(&cs->timer); /* delete active timer */
@ -157,7 +157,7 @@ int cf_command(int drvid, int mode,
/* allocate mem for information struct */ /* allocate mem for information struct */
if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC)))
return (-ENOMEM); /* no memory */ return (-ENOMEM); /* no memory */
setup_timer(&cs->timer, deflect_timer_expire, (ulong)cs); timer_setup(&cs->timer, deflect_timer_expire, 0);
cs->info[0] = '\0'; cs->info[0] = '\0';
cs->ics.driver = drvid; cs->ics.driver = drvid;
cs->ics.command = ISDN_CMD_PROT_IO; /* protocol specific io */ cs->ics.command = ISDN_CMD_PROT_IO; /* protocol specific io */
@ -450,8 +450,7 @@ static int isdn_divert_icall(isdn_ctrl *ic)
return (0); /* no external deflection needed */ return (0); /* no external deflection needed */
if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC))) if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC)))
return (0); /* no memory */ return (0); /* no memory */
setup_timer(&cs->timer, deflect_timer_expire, timer_setup(&cs->timer, deflect_timer_expire, 0);
(ulong)cs);
cs->info[0] = '\0'; cs->info[0] = '\0';
cs->ics = *ic; /* copy incoming data */ cs->ics = *ic; /* copy incoming data */

View File

@ -78,7 +78,7 @@ static unsigned int um_idi_poll(struct file *file, poll_table *wait);
static int um_idi_open(struct inode *inode, struct file *file); static int um_idi_open(struct inode *inode, struct file *file);
static int um_idi_release(struct inode *inode, struct file *file); static int um_idi_release(struct inode *inode, struct file *file);
static int remove_entity(void *entity); static int remove_entity(void *entity);
static void diva_um_timer_function(unsigned long data); static void diva_um_timer_function(struct timer_list *t);
/* /*
* proc entry * proc entry
@ -300,8 +300,7 @@ static int um_idi_open_adapter(struct file *file, int adapter_nr)
p_os = (diva_um_idi_os_context_t *) diva_um_id_get_os_context(e); p_os = (diva_um_idi_os_context_t *) diva_um_id_get_os_context(e);
init_waitqueue_head(&p_os->read_wait); init_waitqueue_head(&p_os->read_wait);
init_waitqueue_head(&p_os->close_wait); init_waitqueue_head(&p_os->close_wait);
setup_timer(&p_os->diva_timer_id, (void *)diva_um_timer_function, timer_setup(&p_os->diva_timer_id, diva_um_timer_function, 0);
(unsigned long)p_os);
p_os->aborted = 0; p_os->aborted = 0;
p_os->adapter_nr = adapter_nr; p_os->adapter_nr = adapter_nr;
return (1); return (1);
@ -457,9 +456,9 @@ void diva_os_wakeup_close(void *os_context)
} }
static static
void diva_um_timer_function(unsigned long data) void diva_um_timer_function(struct timer_list *t)
{ {
diva_um_idi_os_context_t *p_os = (diva_um_idi_os_context_t *) data; diva_um_idi_os_context_t *p_os = from_timer(p_os, t, diva_timer_id);
p_os->aborted = 1; p_os->aborted = 1;
wake_up_interruptible(&p_os->read_wait); wake_up_interruptible(&p_os->read_wait);

View File

@ -2855,7 +2855,7 @@ irq_notforus:
*/ */
static void static void
hfcmulti_dbusy_timer(struct hfc_multi *hc) hfcmulti_dbusy_timer(struct timer_list *t)
{ {
} }
@ -3877,8 +3877,7 @@ hfcmulti_initmode(struct dchannel *dch)
if (hc->dnum[pt]) { if (hc->dnum[pt]) {
mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol, mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
-1, 0, -1, 0); -1, 0, -1, 0);
setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer, timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0);
(long)dch);
} }
for (i = 1; i <= 31; i++) { for (i = 1; i <= 31; i++) {
if (!((1 << i) & hc->bmask[pt])) /* skip unused chan */ if (!((1 << i) & hc->bmask[pt])) /* skip unused chan */
@ -3984,8 +3983,7 @@ hfcmulti_initmode(struct dchannel *dch)
hc->chan[i].slot_rx = -1; hc->chan[i].slot_rx = -1;
hc->chan[i].conf = -1; hc->chan[i].conf = -1;
mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0); mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0);
setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer, timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0);
(long)dch);
hc->chan[i - 2].slot_tx = -1; hc->chan[i - 2].slot_tx = -1;
hc->chan[i - 2].slot_rx = -1; hc->chan[i - 2].slot_rx = -1;
hc->chan[i - 2].conf = -1; hc->chan[i - 2].conf = -1;

View File

@ -301,8 +301,9 @@ reset_hfcpci(struct hfc_pci *hc)
* Timer function called when kernel timer expires * Timer function called when kernel timer expires
*/ */
static void static void
hfcpci_Timer(struct hfc_pci *hc) hfcpci_Timer(struct timer_list *t)
{ {
struct hfc_pci *hc = from_timer(hc, t, hw.timer);
hc->hw.timer.expires = jiffies + 75; hc->hw.timer.expires = jiffies + 75;
/* WD RESET */ /* WD RESET */
/* /*
@ -1241,7 +1242,7 @@ hfcpci_int(int intno, void *dev_id)
* timer callback for D-chan busy resolution. Currently no function * timer callback for D-chan busy resolution. Currently no function
*/ */
static void static void
hfcpci_dbusy_timer(struct hfc_pci *hc) hfcpci_dbusy_timer(struct timer_list *t)
{ {
} }
@ -1717,8 +1718,7 @@ static void
inithfcpci(struct hfc_pci *hc) inithfcpci(struct hfc_pci *hc)
{ {
printk(KERN_DEBUG "inithfcpci: entered\n"); printk(KERN_DEBUG "inithfcpci: entered\n");
setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer, timer_setup(&hc->dch.timer, hfcpci_dbusy_timer, 0);
(long)&hc->dch);
hc->chanlimit = 2; hc->chanlimit = 2;
mode_hfcpci(&hc->bch[0], 1, -1); mode_hfcpci(&hc->bch[0], 1, -1);
mode_hfcpci(&hc->bch[1], 2, -1); mode_hfcpci(&hc->bch[1], 2, -1);
@ -2043,7 +2043,7 @@ setup_hw(struct hfc_pci *hc)
Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1);
/* At this point the needed PCI config is done */ /* At this point the needed PCI config is done */
/* fifos are still not enabled */ /* fifos are still not enabled */
setup_timer(&hc->hw.timer, (void *)hfcpci_Timer, (long)hc); timer_setup(&hc->hw.timer, hfcpci_Timer, 0);
/* default PCM master */ /* default PCM master */
test_and_set_bit(HFC_CFG_MASTER, &hc->cfg); test_and_set_bit(HFC_CFG_MASTER, &hc->cfg);
return 0; return 0;

View File

@ -1146,9 +1146,9 @@ mISDNisar_irq(struct isar_hw *isar)
EXPORT_SYMBOL(mISDNisar_irq); EXPORT_SYMBOL(mISDNisar_irq);
static void static void
ftimer_handler(unsigned long data) ftimer_handler(struct timer_list *t)
{ {
struct isar_ch *ch = (struct isar_ch *)data; struct isar_ch *ch = from_timer(ch, t, ftimer);
pr_debug("%s: ftimer flags %lx\n", ch->is->name, ch->bch.Flags); pr_debug("%s: ftimer flags %lx\n", ch->is->name, ch->bch.Flags);
test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags); test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags);
@ -1635,11 +1635,9 @@ init_isar(struct isar_hw *isar)
} }
if (isar->version != 1) if (isar->version != 1)
return -EINVAL; return -EINVAL;
setup_timer(&isar->ch[0].ftimer, &ftimer_handler, timer_setup(&isar->ch[0].ftimer, ftimer_handler, 0);
(long)&isar->ch[0]);
test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags); test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags);
setup_timer(&isar->ch[1].ftimer, &ftimer_handler, timer_setup(&isar->ch[1].ftimer, ftimer_handler, 0);
(long)&isar->ch[1]);
test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags); test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags);
return 0; return 0;
} }

View File

@ -231,7 +231,7 @@ static int isdn_timer_cnt2 = 0;
static int isdn_timer_cnt3 = 0; static int isdn_timer_cnt3 = 0;
static void static void
isdn_timer_funct(ulong dummy) isdn_timer_funct(struct timer_list *unused)
{ {
int tf = dev->tflags; int tf = dev->tflags;
if (tf & ISDN_TIMER_FAST) { if (tf & ISDN_TIMER_FAST) {
@ -2294,8 +2294,7 @@ static int __init isdn_init(void)
printk(KERN_WARNING "isdn: Could not allocate device-struct.\n"); printk(KERN_WARNING "isdn: Could not allocate device-struct.\n");
return -EIO; return -EIO;
} }
init_timer(&dev->timer); timer_setup(&dev->timer, isdn_timer_funct, 0);
dev->timer.function = isdn_timer_funct;
spin_lock_init(&dev->lock); spin_lock_init(&dev->lock);
spin_lock_init(&dev->timerlock); spin_lock_init(&dev->timerlock);
#ifdef MODULE #ifdef MODULE

View File

@ -1509,9 +1509,9 @@ static int isdn_net_ioctl(struct net_device *dev,
/* called via cisco_timer.function */ /* called via cisco_timer.function */
static void static void
isdn_net_ciscohdlck_slarp_send_keepalive(unsigned long data) isdn_net_ciscohdlck_slarp_send_keepalive(struct timer_list *t)
{ {
isdn_net_local *lp = (isdn_net_local *) data; isdn_net_local *lp = from_timer(lp, t, cisco_timer);
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *p; unsigned char *p;
unsigned long last_cisco_myseq = lp->cisco_myseq; unsigned long last_cisco_myseq = lp->cisco_myseq;
@ -1615,9 +1615,8 @@ isdn_net_ciscohdlck_connected(isdn_net_local *lp)
/* send slarp request because interface/seq.no.s reset */ /* send slarp request because interface/seq.no.s reset */
isdn_net_ciscohdlck_slarp_send_request(lp); isdn_net_ciscohdlck_slarp_send_request(lp);
init_timer(&lp->cisco_timer); timer_setup(&lp->cisco_timer,
lp->cisco_timer.data = (unsigned long) lp; isdn_net_ciscohdlck_slarp_send_keepalive, 0);
lp->cisco_timer.function = isdn_net_ciscohdlck_slarp_send_keepalive;
lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ; lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ;
add_timer(&lp->cisco_timer); add_timer(&lp->cisco_timer);
} }

View File

@ -50,7 +50,7 @@ static struct ippp_ccp_reset *isdn_ppp_ccp_reset_alloc(struct ippp_struct *is);
static void isdn_ppp_ccp_reset_free(struct ippp_struct *is); static void isdn_ppp_ccp_reset_free(struct ippp_struct *is);
static void isdn_ppp_ccp_reset_free_state(struct ippp_struct *is, static void isdn_ppp_ccp_reset_free_state(struct ippp_struct *is,
unsigned char id); unsigned char id);
static void isdn_ppp_ccp_timer_callback(unsigned long closure); static void isdn_ppp_ccp_timer_callback(struct timer_list *t);
static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_struct *is, static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_struct *is,
unsigned char id); unsigned char id);
static void isdn_ppp_ccp_reset_trans(struct ippp_struct *is, 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,
/* The timer callback function which is called when a ResetReq has timed out, /* The timer callback function which is called when a ResetReq has timed out,
aka has never been answered by a ResetAck */ aka has never been answered by a ResetAck */
static void isdn_ppp_ccp_timer_callback(unsigned long closure) static void isdn_ppp_ccp_timer_callback(struct timer_list *t)
{ {
struct ippp_ccp_reset_state *rs = struct ippp_ccp_reset_state *rs =
(struct ippp_ccp_reset_state *)closure; from_timer(rs, t, timer);
if (!rs) { if (!rs) {
printk(KERN_ERR "ippp_ccp: timer cb with zero closure.\n"); 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
rs->state = CCPResetIdle; rs->state = CCPResetIdle;
rs->is = is; rs->is = is;
rs->id = id; rs->id = id;
setup_timer(&rs->timer, isdn_ppp_ccp_timer_callback, timer_setup(&rs->timer, isdn_ppp_ccp_timer_callback, 0);
(unsigned long)rs);
is->reset->rs[id] = rs; is->reset->rs[id] = rs;
} }
return rs; return rs;

View File

@ -541,9 +541,9 @@ isdn_tty_senddown(modem_info *info)
* into the tty's buffer. * into the tty's buffer.
*/ */
static void static void
isdn_tty_modem_do_ncarrier(unsigned long data) isdn_tty_modem_do_ncarrier(struct timer_list *t)
{ {
modem_info *info = (modem_info *) data; modem_info *info = from_timer(info, t, nc_timer);
isdn_tty_modem_result(RESULT_NO_CARRIER, info); isdn_tty_modem_result(RESULT_NO_CARRIER, info);
} }
@ -1812,8 +1812,7 @@ isdn_tty_modem_init(void)
info->isdn_channel = -1; info->isdn_channel = -1;
info->drv_index = -1; info->drv_index = -1;
info->xmit_size = ISDN_SERIAL_XMIT_SIZE; info->xmit_size = ISDN_SERIAL_XMIT_SIZE;
setup_timer(&info->nc_timer, isdn_tty_modem_do_ncarrier, timer_setup(&info->nc_timer, isdn_tty_modem_do_ncarrier, 0);
(unsigned long)info);
skb_queue_head_init(&info->xmit_queue); skb_queue_head_init(&info->xmit_queue);
#ifdef CONFIG_ISDN_AUDIO #ifdef CONFIG_ISDN_AUDIO
skb_queue_head_init(&info->dtmf_queue); skb_queue_head_init(&info->dtmf_queue);

View File

@ -270,9 +270,9 @@ static void pblk_write_kick(struct pblk *pblk)
mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(1000)); mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(1000));
} }
void pblk_write_timer_fn(unsigned long data) void pblk_write_timer_fn(struct timer_list *t)
{ {
struct pblk *pblk = (struct pblk *)data; struct pblk *pblk = from_timer(pblk, t, wtimer);
/* kick the write thread every tick to flush outstanding data */ /* kick the write thread every tick to flush outstanding data */
pblk_write_kick(pblk); pblk_write_kick(pblk);

View File

@ -442,9 +442,9 @@ next_gc_group:
goto next_gc_group; goto next_gc_group;
} }
static void pblk_gc_timer(unsigned long data) static void pblk_gc_timer(struct timer_list *t)
{ {
struct pblk *pblk = (struct pblk *)data; struct pblk *pblk = from_timer(pblk, t, gc.gc_timer);
pblk_gc_kick(pblk); pblk_gc_kick(pblk);
} }
@ -601,7 +601,7 @@ int pblk_gc_init(struct pblk *pblk)
goto fail_free_writer_kthread; goto fail_free_writer_kthread;
} }
setup_timer(&gc->gc_timer, pblk_gc_timer, (unsigned long)pblk); timer_setup(&gc->gc_timer, pblk_gc_timer, 0);
mod_timer(&gc->gc_timer, jiffies + msecs_to_jiffies(GC_TIME_MSECS)); mod_timer(&gc->gc_timer, jiffies + msecs_to_jiffies(GC_TIME_MSECS));
gc->gc_active = 0; gc->gc_active = 0;

View File

@ -866,7 +866,7 @@ fail:
static int pblk_writer_init(struct pblk *pblk) static int pblk_writer_init(struct pblk *pblk)
{ {
setup_timer(&pblk->wtimer, pblk_write_timer_fn, (unsigned long)pblk); timer_setup(&pblk->wtimer, pblk_write_timer_fn, 0);
mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(100)); mod_timer(&pblk->wtimer, jiffies + msecs_to_jiffies(100));
pblk->writer_ts = kthread_create(pblk_write_ts, pblk, "pblk-writer-t"); pblk->writer_ts = kthread_create(pblk_write_ts, pblk, "pblk-writer-t");

View File

@ -158,9 +158,9 @@ int pblk_rl_max_io(struct pblk_rl *rl)
return rl->rb_max_io; return rl->rb_max_io;
} }
static void pblk_rl_u_timer(unsigned long data) static void pblk_rl_u_timer(struct timer_list *t)
{ {
struct pblk_rl *rl = (struct pblk_rl *)data; struct pblk_rl *rl = from_timer(rl, t, u_timer);
/* Release user I/O state. Protect from GC */ /* Release user I/O state. Protect from GC */
smp_store_release(&rl->rb_user_active, 0); smp_store_release(&rl->rb_user_active, 0);
@ -202,7 +202,7 @@ void pblk_rl_init(struct pblk_rl *rl, int budget)
atomic_set(&rl->rb_gc_cnt, 0); atomic_set(&rl->rb_gc_cnt, 0);
atomic_set(&rl->rb_space, -1); atomic_set(&rl->rb_space, -1);
setup_timer(&rl->u_timer, pblk_rl_u_timer, (unsigned long)rl); timer_setup(&rl->u_timer, pblk_rl_u_timer, 0);
rl->rb_user_active = 0; rl->rb_user_active = 0;
rl->rb_gc_active = 0; rl->rb_gc_active = 0;

View File

@ -797,7 +797,7 @@ void pblk_map_rq(struct pblk *pblk, struct nvm_rq *rqd, unsigned int sentry,
* pblk write thread * pblk write thread
*/ */
int pblk_write_ts(void *data); int pblk_write_ts(void *data);
void pblk_write_timer_fn(unsigned long data); void pblk_write_timer_fn(struct timer_list *t);
void pblk_write_should_kick(struct pblk *pblk); void pblk_write_should_kick(struct pblk *pblk);
/* /*

Some files were not shown because too many files have changed in this diff Show More