treewide: setup_timer() -> timer_setup()
This converts all remaining cases of the old setup_timer() API into using timer_setup(), where the callback argument is the structure already holding the struct timer_list. These should have no behavioral changes, since they just change which pointer is passed into the callback with the same available pointers after conversion. It handles the following examples, in addition to some other variations. Casting from unsigned long: void my_callback(unsigned long data) { struct something *ptr = (struct something *)data; ... } ... setup_timer(&ptr->my_timer, my_callback, ptr); and forced object casts: void my_callback(struct something *ptr) { ... } ... setup_timer(&ptr->my_timer, my_callback, (unsigned long)ptr); become: void my_callback(struct timer_list *t) { struct something *ptr = from_timer(ptr, t, my_timer); ... } ... timer_setup(&ptr->my_timer, my_callback, 0); Direct function assignments: void my_callback(unsigned long data) { struct something *ptr = (struct something *)data; ... } ... ptr->my_timer.function = my_callback; have a temporary cast added, along with converting the args: void my_callback(struct timer_list *t) { struct something *ptr = from_timer(ptr, t, my_timer); ... } ... ptr->my_timer.function = (TIMER_FUNC_TYPE)my_callback; And finally, callbacks without a data assignment: void my_callback(unsigned long data) { ... } ... setup_timer(&ptr->my_timer, my_callback, 0); have their argument renamed to verify they're unused during conversion: void my_callback(struct timer_list *unused) { ... } ... timer_setup(&ptr->my_timer, my_callback, 0); The conversion is done with the following Coccinelle script: spatch --very-quiet --all-includes --include-headers \ -I ./arch/x86/include -I ./arch/x86/include/generated \ -I ./include -I ./arch/x86/include/uapi \ -I ./arch/x86/include/generated/uapi -I ./include/uapi \ -I ./include/generated/uapi --include ./include/linux/kconfig.h \ --dir . \ --cocci-file ~/src/data/timer_setup.cocci @fix_address_of@ expression e; @@ setup_timer( -&(e) +&e , ...) // Update any raw setup_timer() usages that have a NULL callback, but // would otherwise match change_timer_function_usage, since the latter // will update all function assignments done in the face of a NULL // function initialization in setup_timer(). @change_timer_function_usage_NULL@ expression _E; identifier _timer; type _cast_data; @@ ( -setup_timer(&_E->_timer, NULL, _E); +timer_setup(&_E->_timer, NULL, 0); | -setup_timer(&_E->_timer, NULL, (_cast_data)_E); +timer_setup(&_E->_timer, NULL, 0); | -setup_timer(&_E._timer, NULL, &_E); +timer_setup(&_E._timer, NULL, 0); | -setup_timer(&_E._timer, NULL, (_cast_data)&_E); +timer_setup(&_E._timer, NULL, 0); ) @change_timer_function_usage@ expression _E; identifier _timer; struct timer_list _stl; identifier _callback; type _cast_func, _cast_data; @@ ( -setup_timer(&_E->_timer, _callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, &_callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, _callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, &_callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)_callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)&_callback, _E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)_callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, (_cast_func)&_callback, (_cast_data)_E); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E._timer, _callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, _callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, &_callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, &_callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)_E); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)&_E); +timer_setup(&_E._timer, _callback, 0); | _E->_timer@_stl.function = _callback; | _E->_timer@_stl.function = &_callback; | _E->_timer@_stl.function = (_cast_func)_callback; | _E->_timer@_stl.function = (_cast_func)&_callback; | _E._timer@_stl.function = _callback; | _E._timer@_stl.function = &_callback; | _E._timer@_stl.function = (_cast_func)_callback; | _E._timer@_stl.function = (_cast_func)&_callback; ) // callback(unsigned long arg) @change_callback_handle_cast depends on change_timer_function_usage@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _origtype; identifier _origarg; type _handletype; identifier _handle; @@ void _callback( -_origtype _origarg +struct timer_list *t ) { ( ... when != _origarg _handletype *_handle = -(_handletype *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg | ... when != _origarg _handletype *_handle = -(void *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg | ... when != _origarg _handletype *_handle; ... when != _handle _handle = -(_handletype *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg | ... when != _origarg _handletype *_handle; ... when != _handle _handle = -(void *)_origarg; +from_timer(_handle, t, _timer); ... when != _origarg ) } // callback(unsigned long arg) without existing variable @change_callback_handle_cast_no_arg depends on change_timer_function_usage && !change_callback_handle_cast@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _origtype; identifier _origarg; type _handletype; @@ void _callback( -_origtype _origarg +struct timer_list *t ) { + _handletype *_origarg = from_timer(_origarg, t, _timer); + ... when != _origarg - (_handletype *)_origarg + _origarg ... when != _origarg } // Avoid already converted callbacks. @match_callback_converted depends on change_timer_function_usage && !change_callback_handle_cast && !change_callback_handle_cast_no_arg@ identifier change_timer_function_usage._callback; identifier t; @@ void _callback(struct timer_list *t) { ... } // callback(struct something *handle) @change_callback_handle_arg depends on change_timer_function_usage && !match_callback_converted && !change_callback_handle_cast && !change_callback_handle_cast_no_arg@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _handletype; identifier _handle; @@ void _callback( -_handletype *_handle +struct timer_list *t ) { + _handletype *_handle = from_timer(_handle, t, _timer); ... } // If change_callback_handle_arg ran on an empty function, remove // the added handler. @unchange_callback_handle_arg depends on change_timer_function_usage && change_callback_handle_arg@ identifier change_timer_function_usage._callback; identifier change_timer_function_usage._timer; type _handletype; identifier _handle; identifier t; @@ void _callback(struct timer_list *t) { - _handletype *_handle = from_timer(_handle, t, _timer); } // We only want to refactor the setup_timer() data argument if we've found // the matching callback. This undoes changes in change_timer_function_usage. @unchange_timer_function_usage depends on change_timer_function_usage && !change_callback_handle_cast && !change_callback_handle_cast_no_arg && !change_callback_handle_arg@ expression change_timer_function_usage._E; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type change_timer_function_usage._cast_data; @@ ( -timer_setup(&_E->_timer, _callback, 0); +setup_timer(&_E->_timer, _callback, (_cast_data)_E); | -timer_setup(&_E._timer, _callback, 0); +setup_timer(&_E._timer, _callback, (_cast_data)&_E); ) // If we fixed a callback from a .function assignment, fix the // assignment cast now. @change_timer_function_assignment depends on change_timer_function_usage && (change_callback_handle_cast || change_callback_handle_cast_no_arg || change_callback_handle_arg)@ expression change_timer_function_usage._E; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type _cast_func; typedef TIMER_FUNC_TYPE; @@ ( _E->_timer.function = -_callback +(TIMER_FUNC_TYPE)_callback ; | _E->_timer.function = -&_callback +(TIMER_FUNC_TYPE)_callback ; | _E->_timer.function = -(_cast_func)_callback; +(TIMER_FUNC_TYPE)_callback ; | _E->_timer.function = -(_cast_func)&_callback +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -_callback +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -&_callback; +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -(_cast_func)_callback +(TIMER_FUNC_TYPE)_callback ; | _E._timer.function = -(_cast_func)&_callback +(TIMER_FUNC_TYPE)_callback ; ) // Sometimes timer functions are called directly. Replace matched args. @change_timer_function_calls depends on change_timer_function_usage && (change_callback_handle_cast || change_callback_handle_cast_no_arg || change_callback_handle_arg)@ expression _E; identifier change_timer_function_usage._timer; identifier change_timer_function_usage._callback; type _cast_data; @@ _callback( ( -(_cast_data)_E +&_E->_timer | -(_cast_data)&_E +&_E._timer | -_E +&_E->_timer ) ) // If a timer has been configured without a data argument, it can be // converted without regard to the callback argument, since it is unused. @match_timer_function_unused_data@ expression _E; identifier _timer; identifier _callback; @@ ( -setup_timer(&_E->_timer, _callback, 0); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, _callback, 0L); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E->_timer, _callback, 0UL); +timer_setup(&_E->_timer, _callback, 0); | -setup_timer(&_E._timer, _callback, 0); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, _callback, 0L); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_E._timer, _callback, 0UL); +timer_setup(&_E._timer, _callback, 0); | -setup_timer(&_timer, _callback, 0); +timer_setup(&_timer, _callback, 0); | -setup_timer(&_timer, _callback, 0L); +timer_setup(&_timer, _callback, 0); | -setup_timer(&_timer, _callback, 0UL); +timer_setup(&_timer, _callback, 0); | -setup_timer(_timer, _callback, 0); +timer_setup(_timer, _callback, 0); | -setup_timer(_timer, _callback, 0L); +timer_setup(_timer, _callback, 0); | -setup_timer(_timer, _callback, 0UL); +timer_setup(_timer, _callback, 0); ) @change_callback_unused_data depends on match_timer_function_unused_data@ identifier match_timer_function_unused_data._callback; type _origtype; identifier _origarg; @@ void _callback( -_origtype _origarg +struct timer_list *unused ) { ... when != _origarg } Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
parent
b9eaf18722
commit
e99e88a9d2
|
@ -65,9 +65,9 @@ srmcons_do_receive_chars(struct tty_port *port)
|
|||
}
|
||||
|
||||
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;
|
||||
unsigned long flags;
|
||||
int incr = 10;
|
||||
|
@ -206,8 +206,7 @@ static const struct tty_operations srmcons_ops = {
|
|||
static int __init
|
||||
srmcons_init(void)
|
||||
{
|
||||
setup_timer(&srmcons_singleton.timer, srmcons_receive_chars,
|
||||
(unsigned long)&srmcons_singleton);
|
||||
timer_setup(&srmcons_singleton.timer, srmcons_receive_chars, 0);
|
||||
if (srm_is_registered_console) {
|
||||
struct tty_driver *driver;
|
||||
int err;
|
||||
|
|
|
@ -305,7 +305,7 @@ static void n2100_restart(enum reboot_mode mode, const char *cmd)
|
|||
|
||||
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) {
|
||||
ctrl_alt_del();
|
||||
|
@ -336,7 +336,7 @@ static int __init n2100_request_gpios(void)
|
|||
pr_err("could not set power GPIO as input\n");
|
||||
}
|
||||
/* Set up power button poll timer */
|
||||
setup_timer(&power_button_poll_timer, power_button_poll, 0UL);
|
||||
timer_setup(&power_button_poll_timer, power_button_poll, 0);
|
||||
power_button_poll_timer.expires = jiffies + (HZ / 10);
|
||||
add_timer(&power_button_poll_timer);
|
||||
return 0;
|
||||
|
|
|
@ -172,7 +172,7 @@ static struct platform_device db88f5281_nand_flash = {
|
|||
static void __iomem *db88f5281_7seg;
|
||||
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;
|
||||
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");
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ int check_nmi_wdt_touched(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void nmi_wdt_timer(unsigned long data)
|
||||
static void nmi_wdt_timer(struct timer_list *unused)
|
||||
{
|
||||
if (check_nmi_wdt_touched())
|
||||
nmi_wdt_keepalive();
|
||||
|
@ -180,7 +180,7 @@ static int __init init_nmi_wdt(void)
|
|||
nmi_wdt_start();
|
||||
nmi_active = true;
|
||||
|
||||
setup_timer(&ntimer, nmi_wdt_timer, 0UL);
|
||||
timer_setup(&ntimer, nmi_wdt_timer, 0);
|
||||
ntimer.expires = jiffies + NMI_CHECK_TIMEOUT;
|
||||
add_timer(&ntimer);
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ static const struct file_operations pvc_scroll_proc_fops = {
|
|||
.write = pvc_scroll_proc_write,
|
||||
};
|
||||
|
||||
void pvc_proc_timerfunc(unsigned long data)
|
||||
void pvc_proc_timerfunc(struct timer_list *unused)
|
||||
{
|
||||
if (scroll_dir < 0)
|
||||
pvc_move(DISPLAY|RIGHT);
|
||||
|
@ -197,7 +197,7 @@ static int __init pvc_proc_init(void)
|
|||
if (proc_entry == NULL)
|
||||
goto error;
|
||||
|
||||
setup_timer(&timer, pvc_proc_timerfunc, 0UL);
|
||||
timer_setup(&timer, pvc_proc_timerfunc, 0);
|
||||
|
||||
return 0;
|
||||
error:
|
||||
|
|
|
@ -188,7 +188,7 @@ static void tau_timeout(void * info)
|
|||
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 */
|
||||
|
@ -230,7 +230,7 @@ int __init TAU_init(void)
|
|||
|
||||
|
||||
/* 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;
|
||||
add_timer(&tau_timer);
|
||||
|
||||
|
|
|
@ -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
|
||||
* 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;
|
||||
u32 cpu;
|
||||
|
@ -555,7 +555,7 @@ static void cell_virtual_cntr(unsigned long data)
|
|||
|
||||
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;
|
||||
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
|
||||
* 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 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)
|
||||
{
|
||||
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;
|
||||
add_timer(&timer_spu_event_swap);
|
||||
}
|
||||
|
|
|
@ -992,13 +992,13 @@ static void spu_calc_load(void)
|
|||
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);
|
||||
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);
|
||||
spu_calc_load();
|
||||
|
@ -1124,8 +1124,8 @@ int __init spu_sched_init(void)
|
|||
}
|
||||
spin_lock_init(&spu_prio->runq_lock);
|
||||
|
||||
setup_timer(&spusched_timer, spusched_wake, 0);
|
||||
setup_timer(&spuloadavg_timer, spuloadavg_wake, 0);
|
||||
timer_setup(&spusched_timer, spusched_wake, 0);
|
||||
timer_setup(&spuloadavg_timer, spuloadavg_wake, 0);
|
||||
|
||||
spusched_task = kthread_run(spusched_thread, NULL, "spusched");
|
||||
if (IS_ERR(spusched_task)) {
|
||||
|
|
|
@ -361,9 +361,9 @@ static irqreturn_t kw_i2c_irq(int irq, void *dev_id)
|
|||
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;
|
||||
|
||||
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);
|
||||
init_completion(&host->complete);
|
||||
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);
|
||||
steps = psteps ? (*psteps) : 0x10;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ static int __init stp_init(void)
|
|||
{
|
||||
if (!test_bit(CLOCK_SYNC_HAS_STP, &clock_sync_flags))
|
||||
return 0;
|
||||
setup_timer(&stp_timer, stp_timeout, 0UL);
|
||||
timer_setup(&stp_timer, stp_timeout, 0);
|
||||
time_init_wq();
|
||||
if (!stp_online)
|
||||
return 0;
|
||||
|
|
|
@ -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;
|
||||
|
||||
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);
|
||||
|
||||
return mod_timer(&hd->timer, jiffies + 1);
|
||||
|
|
|
@ -85,18 +85,18 @@ int __init pci_is_66mhz_capable(struct pci_channel *hose,
|
|||
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);
|
||||
printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n");
|
||||
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);
|
||||
printk(KERN_DEBUG "PCI: re-enabling system error IRQ.\n");
|
||||
|
@ -106,13 +106,11 @@ static void pcibios_enable_serr(unsigned long __data)
|
|||
void pcibios_enable_timers(struct pci_channel *hose)
|
||||
{
|
||||
if (hose->err_irq) {
|
||||
setup_timer(&hose->err_timer, pcibios_enable_err,
|
||||
(unsigned long)hose);
|
||||
timer_setup(&hose->err_timer, pcibios_enable_err, 0);
|
||||
}
|
||||
|
||||
if (hose->serr_irq) {
|
||||
setup_timer(&hose->serr_timer, pcibios_enable_serr,
|
||||
(unsigned long)hose);
|
||||
timer_setup(&hose->serr_timer, pcibios_enable_serr, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,9 @@ static ssize_t switch_show(struct device *dev,
|
|||
}
|
||||
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);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ static int switch_drv_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
INIT_WORK(&psw->work, switch_work_handler);
|
||||
setup_timer(&psw->debounce, switch_timer, (unsigned long)psw);
|
||||
timer_setup(&psw->debounce, switch_timer, 0);
|
||||
|
||||
/* Workqueue API brain-damage */
|
||||
psw->pdev = pdev;
|
||||
|
|
|
@ -79,9 +79,9 @@ void blk_stat_add(struct request *rq)
|
|||
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;
|
||||
int cpu;
|
||||
|
||||
|
@ -130,7 +130,7 @@ blk_stat_alloc_callback(void (*timer_fn)(struct blk_stat_callback *),
|
|||
cb->bucket_fn = bucket_fn;
|
||||
cb->data = data;
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ struct throtl_data
|
|||
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)
|
||||
{
|
||||
|
@ -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[1]);
|
||||
sq->pending_tree = RB_ROOT;
|
||||
setup_timer(&sq->pending_timer, throtl_pending_timer_fn,
|
||||
(unsigned long)sq);
|
||||
timer_setup(&sq->pending_timer, throtl_pending_timer_fn, 0);
|
||||
}
|
||||
|
||||
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
|
||||
* 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_data *td = sq_to_td(sq);
|
||||
struct request_queue *q = td->queue;
|
||||
|
|
|
@ -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 **********/
|
||||
|
||||
static unsigned short debug = 0;
|
||||
|
@ -1493,8 +1493,8 @@ static const struct atmdev_ops amb_ops = {
|
|||
};
|
||||
|
||||
/********** housekeeping **********/
|
||||
static void do_housekeeping (unsigned long arg) {
|
||||
amb_dev * dev = (amb_dev *) arg;
|
||||
static void do_housekeeping (struct timer_list *t) {
|
||||
amb_dev * dev = from_timer(dev, t, housekeeping);
|
||||
|
||||
// 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.vci_bits = NUM_VCI_BITS;
|
||||
|
||||
setup_timer(&dev->housekeeping, do_housekeeping,
|
||||
(unsigned long)dev);
|
||||
timer_setup(&dev->housekeeping, do_housekeeping, 0);
|
||||
mod_timer(&dev->housekeeping, jiffies);
|
||||
|
||||
// enable host interrupts
|
||||
|
|
|
@ -1656,9 +1656,9 @@ static irqreturn_t fs_irq (int irq, void *dev_id)
|
|||
|
||||
|
||||
#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);
|
||||
dev->timer.expires = jiffies + FS_POLL_FREQ;
|
||||
|
@ -1885,7 +1885,7 @@ static int fs_init(struct fs_dev *dev)
|
|||
}
|
||||
|
||||
#ifdef FS_POLL_FREQ
|
||||
setup_timer (&dev->timer, fs_poll, (unsigned long)dev);
|
||||
timer_setup(&dev->timer, fs_poll, 0);
|
||||
dev->timer.expires = jiffies + FS_POLL_FREQ;
|
||||
add_timer (&dev->timer);
|
||||
#endif
|
||||
|
|
|
@ -357,7 +357,7 @@ static inline void __init show_version (void) {
|
|||
|
||||
/********** globals **********/
|
||||
|
||||
static void do_housekeeping (unsigned long arg);
|
||||
static void do_housekeeping (struct timer_list *t);
|
||||
|
||||
static unsigned short debug = 0;
|
||||
static unsigned short vpi_bits = 0;
|
||||
|
@ -1418,9 +1418,9 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id)
|
|||
|
||||
/********** housekeeping **********/
|
||||
|
||||
static void do_housekeeping (unsigned long arg) {
|
||||
static void do_housekeeping (struct timer_list *t) {
|
||||
// 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
|
||||
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.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);
|
||||
|
||||
out:
|
||||
|
|
|
@ -1528,9 +1528,9 @@ idt77252_tx(struct idt77252_dev *card)
|
|||
|
||||
|
||||
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 flags;
|
||||
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->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... */
|
||||
card->membase = ioremap(membase, 1024);
|
||||
|
|
|
@ -1761,9 +1761,9 @@ static void iter_dequeue(struct lanai_dev *lanai, vci_t vci)
|
|||
}
|
||||
#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
|
||||
unsigned long flags;
|
||||
#ifdef USE_POWERDOWN
|
||||
|
@ -1790,7 +1790,7 @@ static void lanai_timed_poll(unsigned long arg)
|
|||
|
||||
static inline void lanai_timed_poll_start(struct lanai_dev *lanai)
|
||||
{
|
||||
setup_timer(&lanai->timer, lanai_timed_poll, (unsigned long)lanai);
|
||||
timer_setup(&lanai->timer, lanai_timed_poll, 0);
|
||||
lanai->timer.expires = jiffies + LANAI_POLL_PERIOD;
|
||||
add_timer(&lanai->timer);
|
||||
}
|
||||
|
|
|
@ -145,7 +145,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user * arg);
|
|||
#ifdef EXTRA_DEBUG
|
||||
static void which_list(ns_dev * card, struct sk_buff *skb);
|
||||
#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,
|
||||
unsigned long addr);
|
||||
static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr);
|
||||
|
@ -284,7 +284,7 @@ static int __init nicstar_init(void)
|
|||
XPRINTK("nicstar: nicstar_init() returned.\n");
|
||||
|
||||
if (!error) {
|
||||
setup_timer(&ns_timer, ns_poll, 0UL);
|
||||
timer_setup(&ns_timer, ns_poll, 0);
|
||||
ns_timer.expires = jiffies + NS_POLL_PERIOD;
|
||||
add_timer(&ns_timer);
|
||||
}
|
||||
|
@ -2679,7 +2679,7 @@ static void which_list(ns_dev * card, struct sk_buff *skb)
|
|||
}
|
||||
#endif /* EXTRA_DEBUG */
|
||||
|
||||
static void ns_poll(unsigned long arg)
|
||||
static void ns_poll(struct timer_list *unused)
|
||||
{
|
||||
int i;
|
||||
ns_dev *card;
|
||||
|
|
|
@ -3079,8 +3079,8 @@ DAC960_InitializeController(DAC960_Controller_T *Controller)
|
|||
/*
|
||||
Initialize the Monitoring Timer.
|
||||
*/
|
||||
setup_timer(&Controller->MonitoringTimer,
|
||||
DAC960_MonitoringTimerFunction, (unsigned long)Controller);
|
||||
timer_setup(&Controller->MonitoringTimer,
|
||||
DAC960_MonitoringTimerFunction, 0);
|
||||
Controller->MonitoringTimer.expires =
|
||||
jiffies + DAC960_MonitoringTimerInterval;
|
||||
add_timer(&Controller->MonitoringTimer);
|
||||
|
@ -5619,9 +5619,9 @@ static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *Command)
|
|||
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;
|
||||
unsigned long flags;
|
||||
|
||||
|
|
|
@ -4406,7 +4406,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int, void *);
|
|||
static irqreturn_t DAC960_P_InterruptHandler(int, void *);
|
||||
static void DAC960_V1_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 *,
|
||||
DAC960_Controller_T *, ...);
|
||||
static void DAC960_CreateProcEntries(DAC960_Controller_T *);
|
||||
|
|
|
@ -354,9 +354,9 @@ static void rsxx_handle_dma_error(struct rsxx_dma_ctrl *ctrl,
|
|||
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;
|
||||
|
||||
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);
|
||||
INIT_LIST_HEAD(&ctrl->queue);
|
||||
|
||||
setup_timer(&ctrl->activity_timer, dma_engine_stalled,
|
||||
(unsigned long)ctrl);
|
||||
timer_setup(&ctrl->activity_timer, dma_engine_stalled, 0);
|
||||
|
||||
ctrl->issue_wq = alloc_ordered_workqueue(DRIVER_NAME"_issue", 0);
|
||||
if (!ctrl->issue_wq)
|
||||
|
|
|
@ -707,9 +707,9 @@ static void skd_start_queue(struct work_struct *work)
|
|||
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;
|
||||
u32 state;
|
||||
|
||||
|
@ -857,7 +857,7 @@ static int skd_start_timer(struct skd_device *skdev)
|
|||
{
|
||||
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));
|
||||
if (rc)
|
||||
|
|
|
@ -81,7 +81,7 @@ struct vdc_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_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)
|
||||
{
|
||||
|
@ -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);
|
||||
port->ldc_timeout = ldc_timeout ? *ldc_timeout : 0;
|
||||
setup_timer(&port->ldc_reset_timer, vdc_ldc_reset_timer,
|
||||
(unsigned long)port);
|
||||
timer_setup(&port->ldc_reset_timer, vdc_ldc_reset_timer, 0);
|
||||
INIT_WORK(&port->ldc_reset_work, vdc_ldc_reset_work);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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;
|
||||
unsigned long flags;
|
||||
|
||||
|
|
|
@ -718,7 +718,7 @@ static void check_batteries(struct cardinfo *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;
|
||||
|
||||
|
@ -738,7 +738,7 @@ static void check_all_batteries(unsigned long ptr)
|
|||
|
||||
static void init_battery_timer(void)
|
||||
{
|
||||
setup_timer(&battery_timer, check_all_batteries, 0UL);
|
||||
timer_setup(&battery_timer, check_all_batteries, 0);
|
||||
battery_timer.expires = jiffies + (HZ * 60);
|
||||
add_timer(&battery_timer);
|
||||
}
|
||||
|
|
|
@ -770,9 +770,9 @@ static void ace_fsm_tasklet(unsigned long data)
|
|||
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;
|
||||
|
||||
dev_warn(ace->dev,
|
||||
|
@ -984,7 +984,7 @@ static int ace_setup(struct ace_device *ace)
|
|||
* Initialize the state machine tasklet and stall timer
|
||||
*/
|
||||
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
|
||||
|
|
|
@ -367,9 +367,9 @@ static const struct file_operations bt_bmc_fops = {
|
|||
.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);
|
||||
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);
|
||||
} else {
|
||||
dev_info(dev, "No IRQ; using timer\n");
|
||||
setup_timer(&bt_bmc->poll_timer, poll_timer,
|
||||
(unsigned long)bt_bmc);
|
||||
timer_setup(&bt_bmc->poll_timer, poll_timer, 0);
|
||||
bt_bmc->poll_timer.expires = jiffies + msecs_to_jiffies(10);
|
||||
add_timer(&bt_bmc->poll_timer);
|
||||
}
|
||||
|
|
|
@ -4766,7 +4766,7 @@ static struct timer_list ipmi_timer;
|
|||
|
||||
static atomic_t stop_operation;
|
||||
|
||||
static void ipmi_timeout(unsigned long data)
|
||||
static void ipmi_timeout(struct timer_list *unused)
|
||||
{
|
||||
ipmi_smi_t intf;
|
||||
int nt = 0;
|
||||
|
@ -5172,7 +5172,7 @@ static int ipmi_init_msghandler(void)
|
|||
|
||||
#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);
|
||||
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
||||
|
|
|
@ -1091,9 +1091,9 @@ static void set_need_watch(void *send_info, bool enable)
|
|||
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;
|
||||
unsigned long flags;
|
||||
unsigned long jiffies_now;
|
||||
|
@ -1166,7 +1166,7 @@ static int smi_start_processing(void *send_info,
|
|||
new_smi->intf = intf;
|
||||
|
||||
/* 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);
|
||||
|
||||
/* Try to claim any interrupts. */
|
||||
|
|
|
@ -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;
|
||||
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);
|
||||
ssif_info->ssif_state = SSIF_NORMAL;
|
||||
setup_timer(&ssif_info->retry_timer, retry_timeout,
|
||||
(unsigned long)ssif_info);
|
||||
timer_setup(&ssif_info->retry_timer, retry_timeout, 0);
|
||||
|
||||
for (i = 0; i < SSIF_NUM_STATS; i++)
|
||||
atomic_set(&ssif_info->stats[i], 0);
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#include "tpm.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",
|
||||
task_tgid_nr(current));
|
||||
|
@ -48,8 +48,7 @@ void tpm_common_open(struct file *file, struct tpm_chip *chip,
|
|||
priv->chip = chip;
|
||||
atomic_set(&priv->data_pending, 0);
|
||||
mutex_init(&priv->buffer_mutex);
|
||||
setup_timer(&priv->user_read_timer, user_reader_timeout,
|
||||
(unsigned long)priv);
|
||||
timer_setup(&priv->user_read_timer, user_reader_timeout, 0);
|
||||
INIT_WORK(&priv->work, timeout_work);
|
||||
|
||||
file->private_data = priv;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
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;
|
||||
unsigned int pipe = vblank->pipe;
|
||||
unsigned long irqflags;
|
||||
|
@ -436,8 +436,7 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs)
|
|||
vblank->dev = dev;
|
||||
vblank->pipe = i;
|
||||
init_waitqueue_head(&vblank->queue);
|
||||
setup_timer(&vblank->disable_timer, vblank_disable_fn,
|
||||
(unsigned long)vblank);
|
||||
timer_setup(&vblank->disable_timer, vblank_disable_fn, 0);
|
||||
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)
|
||||
return;
|
||||
else if (drm_vblank_offdelay < 0)
|
||||
vblank_disable_fn((unsigned long)vblank);
|
||||
vblank_disable_fn(&vblank->disable_timer);
|
||||
else if (!dev->vblank_disable_immediate)
|
||||
mod_timer(&vblank->disable_timer,
|
||||
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);
|
||||
|
||||
if (disable_irq)
|
||||
vblank_disable_fn((unsigned long)vblank);
|
||||
vblank_disable_fn(&vblank->disable_timer);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -161,9 +161,9 @@ static const struct exynos_drm_crtc_ops vidi_crtc_ops = {
|
|||
.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))
|
||||
mod_timer(&ctx->timer,
|
||||
|
@ -449,7 +449,7 @@ static int vidi_probe(struct platform_device *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);
|
||||
|
||||
|
|
|
@ -601,9 +601,9 @@ tda998x_reset(struct tda998x_priv *priv)
|
|||
* we have seen a HPD inactive->active transition. This code implements
|
||||
* 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;
|
||||
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 */
|
||||
init_waitqueue_head(&priv->edid_delay_waitq);
|
||||
setup_timer(&priv->edid_delay_timer, tda998x_edid_delay_done,
|
||||
(unsigned long)priv);
|
||||
timer_setup(&priv->edid_delay_timer, tda998x_edid_delay_done, 0);
|
||||
INIT_WORK(&priv->detect_work, tda998x_detect_work);
|
||||
|
||||
/* wake up the device: */
|
||||
|
|
|
@ -82,9 +82,9 @@ static struct msm_ringbuffer *get_next_ring(struct msm_gpu *gpu)
|
|||
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 drm_device *dev = gpu->dev;
|
||||
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,
|
||||
(unsigned long) a5xx_gpu);
|
||||
timer_setup(&a5xx_gpu->preempt_timer, a5xx_preempt_timer, 0);
|
||||
}
|
||||
|
|
|
@ -353,9 +353,9 @@ static void hangcheck_timer_reset(struct msm_gpu *gpu)
|
|||
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 msm_drm_private *priv = dev->dev_private;
|
||||
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);
|
||||
|
||||
|
||||
setup_timer(&gpu->hangcheck_timer, hangcheck_handler,
|
||||
(unsigned long)gpu);
|
||||
timer_setup(&gpu->hangcheck_timer, hangcheck_handler, 0);
|
||||
|
||||
spin_lock_init(&gpu->perf_lock);
|
||||
|
||||
|
|
|
@ -4095,7 +4095,7 @@ static void dsi_update_screen_dispc(struct platform_device *dsidev)
|
|||
}
|
||||
|
||||
#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");
|
||||
}
|
||||
|
@ -5449,7 +5449,7 @@ static int dsi_bind(struct device *dev, struct device *master, void *data)
|
|||
dsi_framedone_timeout_work_callback);
|
||||
|
||||
#ifdef DSI_CATCH_MISSING_TE
|
||||
setup_timer(&dsi->te_timer, dsi_te_timeout, 0);
|
||||
timer_setup(&dsi->te_timer, dsi_te_timeout, 0);
|
||||
#endif
|
||||
|
||||
dsi_mem = platform_get_resource_byname(dsidev, IORESOURCE_MEM, "proto");
|
||||
|
|
|
@ -101,9 +101,9 @@ static void psr_set_state(struct psr_drv *psr, enum psr_state state)
|
|||
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;
|
||||
|
||||
/* 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)
|
||||
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);
|
||||
|
||||
psr->active = true;
|
||||
|
|
|
@ -85,9 +85,9 @@ static const struct dma_fence_ops vgem_fence_ops = {
|
|||
.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);
|
||||
}
|
||||
|
@ -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_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 */
|
||||
mod_timer(&fence->timer, jiffies + VGEM_FENCE_TIMEOUT);
|
||||
|
|
|
@ -452,9 +452,9 @@ via_dmablit_sync(struct drm_device *dev, uint32_t handle, int engine)
|
|||
|
||||
|
||||
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;
|
||||
int engine = (int)
|
||||
(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->busy_queue);
|
||||
INIT_WORK(&blitq->wq, via_dmablit_workqueue);
|
||||
setup_timer(&blitq->poll_timer, via_dmablit_timer,
|
||||
(unsigned long)blitq);
|
||||
timer_setup(&blitq->poll_timer, via_dmablit_timer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -173,9 +173,9 @@ static void battery_flat(struct appleir *appleir)
|
|||
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;
|
||||
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;
|
||||
|
||||
spin_lock_init(&appleir->lock);
|
||||
setup_timer(&appleir->key_up_timer,
|
||||
key_up_tick, (unsigned long) appleir);
|
||||
timer_setup(&appleir->key_up_timer, key_up_tick, 0);
|
||||
|
||||
hid_set_drvdata(hid, appleir);
|
||||
|
||||
|
|
|
@ -239,9 +239,9 @@ drop_note:
|
|||
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);
|
||||
pms->in_use = 0;
|
||||
|
@ -256,8 +256,7 @@ static void init_sustain_timers(struct pcmidi_snd *pm)
|
|||
pms = &pm->sustained_notes[i];
|
||||
pms->in_use = 0;
|
||||
pms->pm = pm;
|
||||
setup_timer(&pms->timer, pcmidi_sustained_note_release,
|
||||
(unsigned long)pms);
|
||||
timer_setup(&pms->timer, pcmidi_sustained_note_release, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1226,9 +1226,9 @@ static void wiimote_schedule(struct wiimote_data *wdata)
|
|||
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);
|
||||
}
|
||||
|
@ -1740,7 +1740,7 @@ static struct wiimote_data *wiimote_create(struct hid_device *hdev)
|
|||
wdata->state.cmd_battery = 0xff;
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -175,9 +175,9 @@ static void ssp_wdt_work_func(struct work_struct *work)
|
|||
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) {
|
||||
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_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,
|
||||
ssp_irq_thread_fn,
|
||||
|
|
|
@ -642,9 +642,9 @@ err:
|
|||
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;
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev)
|
|||
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++) {
|
||||
ent = &cache->ent[i];
|
||||
INIT_LIST_HEAD(&ent->head);
|
||||
|
|
|
@ -202,9 +202,9 @@ void gameport_stop_polling(struct gameport *gameport)
|
|||
}
|
||||
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);
|
||||
if (gameport->poll_cnt)
|
||||
|
@ -542,8 +542,7 @@ static void gameport_init_port(struct gameport *gameport)
|
|||
|
||||
INIT_LIST_HEAD(&gameport->node);
|
||||
spin_lock_init(&gameport->timer_lock);
|
||||
setup_timer(&gameport->poll_timer, gameport_run_poll_handler,
|
||||
(unsigned long)gameport);
|
||||
timer_setup(&gameport->poll_timer, gameport_run_poll_handler, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -364,9 +364,9 @@ static int db9_saturn(int mode, struct parport *port, struct input_dev *devs[])
|
|||
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 input_dev *dev = db9->dev[0];
|
||||
struct input_dev *dev2 = db9->dev[1];
|
||||
|
@ -609,7 +609,7 @@ static void db9_attach(struct parport *pp)
|
|||
db9->pd = pd;
|
||||
db9->mode = mode;
|
||||
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++) {
|
||||
|
||||
|
|
|
@ -743,9 +743,9 @@ static void gc_psx_process_packet(struct gc *gc)
|
|||
* 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
|
||||
|
@ -974,7 +974,7 @@ static void gc_attach(struct parport *pp)
|
|||
mutex_init(&gc->mutex);
|
||||
gc->pd = pd;
|
||||
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++) {
|
||||
if (!pads[i])
|
||||
|
|
|
@ -89,9 +89,9 @@ static struct tgfx {
|
|||
* 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;
|
||||
int data1, data2, i;
|
||||
|
||||
|
@ -200,7 +200,7 @@ static void tgfx_attach(struct parport *pp)
|
|||
mutex_init(&tgfx->sem);
|
||||
tgfx->pd = pd;
|
||||
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++) {
|
||||
if (n_buttons[i] < 1)
|
||||
|
|
|
@ -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 free_iova_rcaches(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
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
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;
|
||||
|
||||
atomic_set(&iovad->fq_timer_on, 0);
|
||||
|
|
|
@ -2235,9 +2235,9 @@ static void send_listen(capidrv_contr *card)
|
|||
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)
|
||||
printk(KERN_ERR "%s: controller dead ??\n", card->name);
|
||||
send_listen(card);
|
||||
|
@ -2264,7 +2264,7 @@ static int capidrv_addcontr(u16 contr, struct capi_profile *profp)
|
|||
return -1;
|
||||
}
|
||||
card->owner = THIS_MODULE;
|
||||
setup_timer(&card->listentimer, listentimerfunc, (unsigned long)card);
|
||||
timer_setup(&card->listentimer, listentimerfunc, 0);
|
||||
strcpy(card->name, id);
|
||||
card->contrnr = contr;
|
||||
card->nbchan = profp->nbchannel;
|
||||
|
|
|
@ -55,10 +55,10 @@ DEFINE_SPINLOCK(divert_lock);
|
|||
/***************************/
|
||||
/* timer callback function */
|
||||
/***************************/
|
||||
static void deflect_timer_expire(ulong arg)
|
||||
static void deflect_timer_expire(struct timer_list *t)
|
||||
{
|
||||
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);
|
||||
del_timer(&cs->timer); /* delete active timer */
|
||||
|
@ -157,7 +157,7 @@ int cf_command(int drvid, int mode,
|
|||
/* allocate mem for information struct */
|
||||
if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC)))
|
||||
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->ics.driver = drvid;
|
||||
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 */
|
||||
if (!(cs = kmalloc(sizeof(struct call_struc), GFP_ATOMIC)))
|
||||
return (0); /* no memory */
|
||||
setup_timer(&cs->timer, deflect_timer_expire,
|
||||
(ulong)cs);
|
||||
timer_setup(&cs->timer, deflect_timer_expire, 0);
|
||||
cs->info[0] = '\0';
|
||||
|
||||
cs->ics = *ic; /* copy incoming data */
|
||||
|
|
|
@ -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_release(struct inode *inode, struct file *file);
|
||||
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
|
||||
|
@ -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);
|
||||
init_waitqueue_head(&p_os->read_wait);
|
||||
init_waitqueue_head(&p_os->close_wait);
|
||||
setup_timer(&p_os->diva_timer_id, (void *)diva_um_timer_function,
|
||||
(unsigned long)p_os);
|
||||
timer_setup(&p_os->diva_timer_id, diva_um_timer_function, 0);
|
||||
p_os->aborted = 0;
|
||||
p_os->adapter_nr = adapter_nr;
|
||||
return (1);
|
||||
|
@ -457,9 +456,9 @@ void diva_os_wakeup_close(void *os_context)
|
|||
}
|
||||
|
||||
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;
|
||||
wake_up_interruptible(&p_os->read_wait);
|
||||
|
|
|
@ -2855,7 +2855,7 @@ irq_notforus:
|
|||
*/
|
||||
|
||||
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]) {
|
||||
mode_hfcmulti(hc, dch->slot, dch->dev.D.protocol,
|
||||
-1, 0, -1, 0);
|
||||
setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer,
|
||||
(long)dch);
|
||||
timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0);
|
||||
}
|
||||
for (i = 1; i <= 31; i++) {
|
||||
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].conf = -1;
|
||||
mode_hfcmulti(hc, i, dch->dev.D.protocol, -1, 0, -1, 0);
|
||||
setup_timer(&dch->timer, (void *)hfcmulti_dbusy_timer,
|
||||
(long)dch);
|
||||
timer_setup(&dch->timer, hfcmulti_dbusy_timer, 0);
|
||||
hc->chan[i - 2].slot_tx = -1;
|
||||
hc->chan[i - 2].slot_rx = -1;
|
||||
hc->chan[i - 2].conf = -1;
|
||||
|
|
|
@ -1241,7 +1241,7 @@ hfcpci_int(int intno, void *dev_id)
|
|||
* timer callback for D-chan busy resolution. Currently no function
|
||||
*/
|
||||
static void
|
||||
hfcpci_dbusy_timer(struct hfc_pci *hc)
|
||||
hfcpci_dbusy_timer(struct timer_list *t)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1717,8 +1717,7 @@ static void
|
|||
inithfcpci(struct hfc_pci *hc)
|
||||
{
|
||||
printk(KERN_DEBUG "inithfcpci: entered\n");
|
||||
setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer,
|
||||
(long)&hc->dch);
|
||||
timer_setup(&hc->dch.timer, hfcpci_dbusy_timer, 0);
|
||||
hc->chanlimit = 2;
|
||||
mode_hfcpci(&hc->bch[0], 1, -1);
|
||||
mode_hfcpci(&hc->bch[1], 2, -1);
|
||||
|
|
|
@ -1146,9 +1146,9 @@ mISDNisar_irq(struct isar_hw *isar)
|
|||
EXPORT_SYMBOL(mISDNisar_irq);
|
||||
|
||||
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);
|
||||
test_and_clear_bit(FLG_FTI_RUN, &ch->bch.Flags);
|
||||
|
@ -1635,11 +1635,9 @@ init_isar(struct isar_hw *isar)
|
|||
}
|
||||
if (isar->version != 1)
|
||||
return -EINVAL;
|
||||
setup_timer(&isar->ch[0].ftimer, &ftimer_handler,
|
||||
(long)&isar->ch[0]);
|
||||
timer_setup(&isar->ch[0].ftimer, ftimer_handler, 0);
|
||||
test_and_set_bit(FLG_INITIALIZED, &isar->ch[0].bch.Flags);
|
||||
setup_timer(&isar->ch[1].ftimer, &ftimer_handler,
|
||||
(long)&isar->ch[1]);
|
||||
timer_setup(&isar->ch[1].ftimer, ftimer_handler, 0);
|
||||
test_and_set_bit(FLG_INITIALIZED, &isar->ch[1].bch.Flags);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ static int isdn_timer_cnt2 = 0;
|
|||
static int isdn_timer_cnt3 = 0;
|
||||
|
||||
static void
|
||||
isdn_timer_funct(ulong dummy)
|
||||
isdn_timer_funct(struct timer_list *unused)
|
||||
{
|
||||
int tf = dev->tflags;
|
||||
if (tf & ISDN_TIMER_FAST) {
|
||||
|
@ -2294,7 +2294,7 @@ static int __init isdn_init(void)
|
|||
printk(KERN_WARNING "isdn: Could not allocate device-struct.\n");
|
||||
return -EIO;
|
||||
}
|
||||
setup_timer(&dev->timer, isdn_timer_funct, 0UL);
|
||||
timer_setup(&dev->timer, isdn_timer_funct, 0);
|
||||
spin_lock_init(&dev->lock);
|
||||
spin_lock_init(&dev->timerlock);
|
||||
#ifdef MODULE
|
||||
|
|
|
@ -1509,9 +1509,9 @@ static int isdn_net_ioctl(struct net_device *dev,
|
|||
|
||||
/* called via cisco_timer.function */
|
||||
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;
|
||||
unsigned char *p;
|
||||
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 */
|
||||
isdn_net_ciscohdlck_slarp_send_request(lp);
|
||||
|
||||
setup_timer(&lp->cisco_timer,
|
||||
isdn_net_ciscohdlck_slarp_send_keepalive,
|
||||
(unsigned long)lp);
|
||||
timer_setup(&lp->cisco_timer,
|
||||
isdn_net_ciscohdlck_slarp_send_keepalive, 0);
|
||||
lp->cisco_timer.expires = jiffies + lp->cisco_keepalive_period * HZ;
|
||||
add_timer(&lp->cisco_timer);
|
||||
}
|
||||
|
|
|
@ -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_state(struct ippp_struct *is,
|
||||
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,
|
||||
unsigned char id);
|
||||
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,
|
||||
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 *)closure;
|
||||
from_timer(rs, t, timer);
|
||||
|
||||
if (!rs) {
|
||||
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->is = is;
|
||||
rs->id = id;
|
||||
setup_timer(&rs->timer, isdn_ppp_ccp_timer_callback,
|
||||
(unsigned long)rs);
|
||||
timer_setup(&rs->timer, isdn_ppp_ccp_timer_callback, 0);
|
||||
is->reset->rs[id] = rs;
|
||||
}
|
||||
return rs;
|
||||
|
|
|
@ -541,9 +541,9 @@ isdn_tty_senddown(modem_info *info)
|
|||
* into the tty's buffer.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -1812,8 +1812,7 @@ isdn_tty_modem_init(void)
|
|||
info->isdn_channel = -1;
|
||||
info->drv_index = -1;
|
||||
info->xmit_size = ISDN_SERIAL_XMIT_SIZE;
|
||||
setup_timer(&info->nc_timer, isdn_tty_modem_do_ncarrier,
|
||||
(unsigned long)info);
|
||||
timer_setup(&info->nc_timer, isdn_tty_modem_do_ncarrier, 0);
|
||||
skb_queue_head_init(&info->xmit_queue);
|
||||
#ifdef CONFIG_ISDN_AUDIO
|
||||
skb_queue_head_init(&info->dtmf_queue);
|
||||
|
|
|
@ -145,9 +145,9 @@ void s5p_mfc_cleanup_queue(struct list_head *lh, struct vb2_queue *vq)
|
|||
}
|
||||
}
|
||||
|
||||
static void s5p_mfc_watchdog(unsigned long arg)
|
||||
static void s5p_mfc_watchdog(struct timer_list *t)
|
||||
{
|
||||
struct s5p_mfc_dev *dev = (struct s5p_mfc_dev *)arg;
|
||||
struct s5p_mfc_dev *dev = from_timer(dev, t, watchdog_timer);
|
||||
|
||||
if (test_bit(0, &dev->hw_lock))
|
||||
atomic_inc(&dev->watchdog_cnt);
|
||||
|
@ -1314,8 +1314,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
|
|||
dev->hw_lock = 0;
|
||||
INIT_WORK(&dev->watchdog_work, s5p_mfc_watchdog_worker);
|
||||
atomic_set(&dev->watchdog_cnt, 0);
|
||||
setup_timer(&dev->watchdog_timer, s5p_mfc_watchdog,
|
||||
(unsigned long)dev);
|
||||
timer_setup(&dev->watchdog_timer, s5p_mfc_watchdog, 0);
|
||||
|
||||
ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
|
||||
if (ret)
|
||||
|
|
|
@ -61,9 +61,9 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei);
|
|||
|
||||
#define FIFO_LEN 1024
|
||||
|
||||
static void c8sectpfe_timer_interrupt(unsigned long ac8sectpfei)
|
||||
static void c8sectpfe_timer_interrupt(struct timer_list *t)
|
||||
{
|
||||
struct c8sectpfei *fei = (struct c8sectpfei *)ac8sectpfei;
|
||||
struct c8sectpfei *fei = from_timer(fei, t, timer);
|
||||
struct channel_info *channel;
|
||||
int chan_num;
|
||||
|
||||
|
@ -865,8 +865,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Setup timer interrupt */
|
||||
setup_timer(&fei->timer, c8sectpfe_timer_interrupt,
|
||||
(unsigned long)fei);
|
||||
timer_setup(&fei->timer, c8sectpfe_timer_interrupt, 0);
|
||||
|
||||
mutex_init(&fei->lock);
|
||||
|
||||
|
|
|
@ -388,9 +388,9 @@ static void device_run(void *priv)
|
|||
schedule_irq(dev, ctx->transtime);
|
||||
}
|
||||
|
||||
static void device_isr(unsigned long priv)
|
||||
static void device_isr(struct timer_list *t)
|
||||
{
|
||||
struct vim2m_dev *vim2m_dev = (struct vim2m_dev *)priv;
|
||||
struct vim2m_dev *vim2m_dev = from_timer(vim2m_dev, t, timer);
|
||||
struct vim2m_ctx *curr_ctx;
|
||||
struct vb2_v4l2_buffer *src_vb, *dst_vb;
|
||||
unsigned long flags;
|
||||
|
@ -1024,7 +1024,7 @@ static int vim2m_probe(struct platform_device *pdev)
|
|||
v4l2_info(&dev->v4l2_dev,
|
||||
"Device registered as /dev/video%d\n", vfd->num);
|
||||
|
||||
setup_timer(&dev->timer, device_isr, (long)dev);
|
||||
timer_setup(&dev->timer, device_isr, 0);
|
||||
platform_set_drvdata(pdev, dev);
|
||||
|
||||
dev->m2m_dev = v4l2_m2m_init(&m2m_ops);
|
||||
|
|
|
@ -105,9 +105,9 @@ static struct tda18271_config hauppauge_woodbury_tunerconfig = {
|
|||
|
||||
static void au0828_restart_dvb_streaming(struct work_struct *work);
|
||||
|
||||
static void au0828_bulk_timeout(unsigned long data)
|
||||
static void au0828_bulk_timeout(struct timer_list *t)
|
||||
{
|
||||
struct au0828_dev *dev = (struct au0828_dev *) data;
|
||||
struct au0828_dev *dev = from_timer(dev, t, bulk_timeout);
|
||||
|
||||
dprintk(1, "%s called\n", __func__);
|
||||
dev->bulk_timeout_running = 0;
|
||||
|
@ -648,8 +648,7 @@ int au0828_dvb_register(struct au0828_dev *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
setup_timer(&dev->bulk_timeout, au0828_bulk_timeout,
|
||||
(unsigned long)dev);
|
||||
timer_setup(&dev->bulk_timeout, au0828_bulk_timeout, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -954,9 +954,9 @@ int au0828_analog_unregister(struct au0828_dev *dev)
|
|||
/* This function ensures that video frames continue to be delivered even if
|
||||
the ITU-656 input isn't receiving any data (thereby preventing applications
|
||||
such as tvtime from hanging) */
|
||||
static void au0828_vid_buffer_timeout(unsigned long data)
|
||||
static void au0828_vid_buffer_timeout(struct timer_list *t)
|
||||
{
|
||||
struct au0828_dev *dev = (struct au0828_dev *) data;
|
||||
struct au0828_dev *dev = from_timer(dev, t, vid_timeout);
|
||||
struct au0828_dmaqueue *dma_q = &dev->vidq;
|
||||
struct au0828_buffer *buf;
|
||||
unsigned char *vid_data;
|
||||
|
@ -978,9 +978,9 @@ static void au0828_vid_buffer_timeout(unsigned long data)
|
|||
spin_unlock_irqrestore(&dev->slock, flags);
|
||||
}
|
||||
|
||||
static void au0828_vbi_buffer_timeout(unsigned long data)
|
||||
static void au0828_vbi_buffer_timeout(struct timer_list *t)
|
||||
{
|
||||
struct au0828_dev *dev = (struct au0828_dev *) data;
|
||||
struct au0828_dev *dev = from_timer(dev, t, vbi_timeout);
|
||||
struct au0828_dmaqueue *dma_q = &dev->vbiq;
|
||||
struct au0828_buffer *buf;
|
||||
unsigned char *vbi_data;
|
||||
|
@ -1953,10 +1953,8 @@ int au0828_analog_register(struct au0828_dev *dev,
|
|||
INIT_LIST_HEAD(&dev->vidq.active);
|
||||
INIT_LIST_HEAD(&dev->vbiq.active);
|
||||
|
||||
setup_timer(&dev->vid_timeout, au0828_vid_buffer_timeout,
|
||||
(unsigned long)dev);
|
||||
setup_timer(&dev->vbi_timeout, au0828_vbi_buffer_timeout,
|
||||
(unsigned long)dev);
|
||||
timer_setup(&dev->vid_timeout, au0828_vid_buffer_timeout, 0);
|
||||
timer_setup(&dev->vbi_timeout, au0828_vbi_buffer_timeout, 0);
|
||||
|
||||
dev->width = NTSC_STD_W;
|
||||
dev->height = NTSC_STD_H;
|
||||
|
|
|
@ -1492,9 +1492,9 @@ static int msb_ftl_scan(struct msb_data *msb)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void msb_cache_flush_timer(unsigned long data)
|
||||
static void msb_cache_flush_timer(struct timer_list *t)
|
||||
{
|
||||
struct msb_data *msb = (struct msb_data *)data;
|
||||
struct msb_data *msb = from_timer(msb, t, cache_flush_timer);
|
||||
msb->need_flush_cache = true;
|
||||
queue_work(msb->io_queue, &msb->io_work);
|
||||
}
|
||||
|
@ -1514,8 +1514,7 @@ static void msb_cache_discard(struct msb_data *msb)
|
|||
|
||||
static int msb_cache_init(struct msb_data *msb)
|
||||
{
|
||||
setup_timer(&msb->cache_flush_timer, msb_cache_flush_timer,
|
||||
(unsigned long)msb);
|
||||
timer_setup(&msb->cache_flush_timer, msb_cache_flush_timer, 0);
|
||||
|
||||
if (!msb->cache)
|
||||
msb->cache = kzalloc(msb->block_size, GFP_KERNEL);
|
||||
|
|
|
@ -40,9 +40,9 @@ static const struct mfd_cell rtsx_usb_cells[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static void rtsx_usb_sg_timed_out(unsigned long data)
|
||||
static void rtsx_usb_sg_timed_out(struct timer_list *t)
|
||||
{
|
||||
struct rtsx_ucr *ucr = (struct rtsx_ucr *)data;
|
||||
struct rtsx_ucr *ucr = from_timer(ucr, t, sg_timer);
|
||||
|
||||
dev_dbg(&ucr->pusb_intf->dev, "%s: sg transfer timed out", __func__);
|
||||
usb_sg_cancel(&ucr->current_sg);
|
||||
|
@ -663,7 +663,7 @@ static int rtsx_usb_probe(struct usb_interface *intf,
|
|||
goto out_init_fail;
|
||||
|
||||
/* initialize USB SG transfer timer */
|
||||
setup_timer(&ucr->sg_timer, rtsx_usb_sg_timed_out, (unsigned long) ucr);
|
||||
timer_setup(&ucr->sg_timer, rtsx_usb_sg_timed_out, 0);
|
||||
|
||||
ret = mfd_add_hotplug_devices(&intf->dev, rtsx_usb_cells,
|
||||
ARRAY_SIZE(rtsx_usb_cells));
|
||||
|
|
|
@ -160,9 +160,9 @@ out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static void mmc_retune_timer(unsigned long data)
|
||||
static void mmc_retune_timer(struct timer_list *t)
|
||||
{
|
||||
struct mmc_host *host = (struct mmc_host *)data;
|
||||
struct mmc_host *host = from_timer(host, t, retune_timer);
|
||||
|
||||
mmc_retune_needed(host);
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
|
|||
init_waitqueue_head(&host->wq);
|
||||
INIT_DELAYED_WORK(&host->detect, mmc_rescan);
|
||||
INIT_DELAYED_WORK(&host->sdio_irq_work, sdio_irq_work);
|
||||
setup_timer(&host->retune_timer, mmc_retune_timer, (unsigned long)host);
|
||||
timer_setup(&host->retune_timer, mmc_retune_timer, 0);
|
||||
|
||||
/*
|
||||
* By default, hosts do not support SGIO or large requests.
|
||||
|
|
|
@ -989,9 +989,9 @@ restart:
|
|||
|
||||
|
||||
/* flush timer, runs a second after last write */
|
||||
static void sm_cache_flush_timer(unsigned long data)
|
||||
static void sm_cache_flush_timer(struct timer_list *t)
|
||||
{
|
||||
struct sm_ftl *ftl = (struct sm_ftl *)data;
|
||||
struct sm_ftl *ftl = from_timer(ftl, t, timer);
|
||||
queue_work(cache_flush_workqueue, &ftl->flush_work);
|
||||
}
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ static void sm_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
|
|||
|
||||
|
||||
mutex_init(&ftl->mutex);
|
||||
setup_timer(&ftl->timer, sm_cache_flush_timer, (unsigned long)ftl);
|
||||
timer_setup(&ftl->timer, sm_cache_flush_timer, 0);
|
||||
INIT_WORK(&ftl->flush_work, sm_cache_flush_work);
|
||||
init_completion(&ftl->erase_completion);
|
||||
|
||||
|
|
|
@ -66,9 +66,9 @@ static const struct cfhsi_config hsi_default_config = {
|
|||
|
||||
static LIST_HEAD(cfhsi_list);
|
||||
|
||||
static void cfhsi_inactivity_tout(unsigned long arg)
|
||||
static void cfhsi_inactivity_tout(struct timer_list *t)
|
||||
{
|
||||
struct cfhsi *cfhsi = (struct cfhsi *)arg;
|
||||
struct cfhsi *cfhsi = from_timer(cfhsi, t, inactivity_timer);
|
||||
|
||||
netdev_dbg(cfhsi->ndev, "%s.\n",
|
||||
__func__);
|
||||
|
@ -737,9 +737,9 @@ out_of_sync:
|
|||
schedule_work(&cfhsi->out_of_sync_work);
|
||||
}
|
||||
|
||||
static void cfhsi_rx_slowpath(unsigned long arg)
|
||||
static void cfhsi_rx_slowpath(struct timer_list *t)
|
||||
{
|
||||
struct cfhsi *cfhsi = (struct cfhsi *)arg;
|
||||
struct cfhsi *cfhsi = from_timer(cfhsi, t, rx_slowpath_timer);
|
||||
|
||||
netdev_dbg(cfhsi->ndev, "%s.\n",
|
||||
__func__);
|
||||
|
@ -997,9 +997,9 @@ static void cfhsi_wake_down_cb(struct cfhsi_cb_ops *cb_ops)
|
|||
wake_up_interruptible(&cfhsi->wake_down_wait);
|
||||
}
|
||||
|
||||
static void cfhsi_aggregation_tout(unsigned long arg)
|
||||
static void cfhsi_aggregation_tout(struct timer_list *t)
|
||||
{
|
||||
struct cfhsi *cfhsi = (struct cfhsi *)arg;
|
||||
struct cfhsi *cfhsi = from_timer(cfhsi, t, aggregation_timer);
|
||||
|
||||
netdev_dbg(cfhsi->ndev, "%s.\n",
|
||||
__func__);
|
||||
|
@ -1211,14 +1211,11 @@ static int cfhsi_open(struct net_device *ndev)
|
|||
init_waitqueue_head(&cfhsi->flush_fifo_wait);
|
||||
|
||||
/* Setup the inactivity timer. */
|
||||
setup_timer(&cfhsi->inactivity_timer, cfhsi_inactivity_tout,
|
||||
(unsigned long)cfhsi);
|
||||
timer_setup(&cfhsi->inactivity_timer, cfhsi_inactivity_tout, 0);
|
||||
/* Setup the slowpath RX timer. */
|
||||
setup_timer(&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath,
|
||||
(unsigned long)cfhsi);
|
||||
timer_setup(&cfhsi->rx_slowpath_timer, cfhsi_rx_slowpath, 0);
|
||||
/* Setup the aggregation timer. */
|
||||
setup_timer(&cfhsi->aggregation_timer, cfhsi_aggregation_tout,
|
||||
(unsigned long)cfhsi);
|
||||
timer_setup(&cfhsi->aggregation_timer, cfhsi_aggregation_tout, 0);
|
||||
|
||||
/* Activate HSI interface. */
|
||||
res = cfhsi->ops->cfhsi_up(cfhsi->ops);
|
||||
|
|
|
@ -149,9 +149,9 @@ static void mv88e6xxx_phy_ppu_reenable_work(struct work_struct *ugly)
|
|||
mutex_unlock(&chip->reg_lock);
|
||||
}
|
||||
|
||||
static void mv88e6xxx_phy_ppu_reenable_timer(unsigned long _ps)
|
||||
static void mv88e6xxx_phy_ppu_reenable_timer(struct timer_list *t)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = (void *)_ps;
|
||||
struct mv88e6xxx_chip *chip = from_timer(chip, t, ppu_timer);
|
||||
|
||||
schedule_work(&chip->ppu_work);
|
||||
}
|
||||
|
@ -193,8 +193,7 @@ static void mv88e6xxx_phy_ppu_state_init(struct mv88e6xxx_chip *chip)
|
|||
{
|
||||
mutex_init(&chip->ppu_mutex);
|
||||
INIT_WORK(&chip->ppu_work, mv88e6xxx_phy_ppu_reenable_work);
|
||||
setup_timer(&chip->ppu_timer, mv88e6xxx_phy_ppu_reenable_timer,
|
||||
(unsigned long)chip);
|
||||
timer_setup(&chip->ppu_timer, mv88e6xxx_phy_ppu_reenable_timer, 0);
|
||||
}
|
||||
|
||||
static void mv88e6xxx_phy_ppu_state_destroy(struct mv88e6xxx_chip *chip)
|
||||
|
|
|
@ -139,9 +139,9 @@ static netdev_tx_t eql_slave_xmit(struct sk_buff *skb, struct net_device *dev);
|
|||
|
||||
static void eql_kill_one_slave(slave_queue_t *queue, slave_t *slave);
|
||||
|
||||
static void eql_timer(unsigned long param)
|
||||
static void eql_timer(struct timer_list *t)
|
||||
{
|
||||
equalizer_t *eql = (equalizer_t *) param;
|
||||
equalizer_t *eql = from_timer(eql, t, timer);
|
||||
struct list_head *this, *tmp, *head;
|
||||
|
||||
spin_lock(&eql->queue.lock);
|
||||
|
@ -178,7 +178,7 @@ static void __init eql_setup(struct net_device *dev)
|
|||
{
|
||||
equalizer_t *eql = netdev_priv(dev);
|
||||
|
||||
setup_timer(&eql->timer, eql_timer, (unsigned long)eql);
|
||||
timer_setup(&eql->timer, eql_timer, 0);
|
||||
eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL;
|
||||
|
||||
spin_lock_init(&eql->queue.lock);
|
||||
|
|
|
@ -1092,9 +1092,11 @@ static void tx_reclaim_skb(struct bfin_mac_local *lp)
|
|||
return;
|
||||
}
|
||||
|
||||
static void tx_reclaim_skb_timeout(unsigned long lp)
|
||||
static void tx_reclaim_skb_timeout(struct timer_list *t)
|
||||
{
|
||||
tx_reclaim_skb((struct bfin_mac_local *)lp);
|
||||
struct bfin_mac_local *lp = from_timer(lp, t, tx_reclaim_timer);
|
||||
|
||||
tx_reclaim_skb(lp);
|
||||
}
|
||||
|
||||
static int bfin_mac_hard_start_xmit(struct sk_buff *skb,
|
||||
|
@ -1650,8 +1652,7 @@ static int bfin_mac_probe(struct platform_device *pdev)
|
|||
ndev->netdev_ops = &bfin_mac_netdev_ops;
|
||||
ndev->ethtool_ops = &bfin_mac_ethtool_ops;
|
||||
|
||||
setup_timer(&lp->tx_reclaim_timer, tx_reclaim_skb_timeout,
|
||||
(unsigned long)lp);
|
||||
timer_setup(&lp->tx_reclaim_timer, tx_reclaim_skb_timeout, 0);
|
||||
|
||||
lp->flags = 0;
|
||||
netif_napi_add(ndev, &lp->napi, bfin_mac_poll, CONFIG_BFIN_RX_DESC_NUM);
|
||||
|
|
|
@ -3080,9 +3080,9 @@ err_out:
|
|||
* The routine called when the error timer expires, to track the number of
|
||||
* recurring errors.
|
||||
*/
|
||||
static void et131x_error_timer_handler(unsigned long data)
|
||||
static void et131x_error_timer_handler(struct timer_list *t)
|
||||
{
|
||||
struct et131x_adapter *adapter = (struct et131x_adapter *)data;
|
||||
struct et131x_adapter *adapter = from_timer(adapter, t, error_timer);
|
||||
struct phy_device *phydev = adapter->netdev->phydev;
|
||||
|
||||
if (et1310_in_phy_coma(adapter)) {
|
||||
|
@ -3624,8 +3624,7 @@ static int et131x_open(struct net_device *netdev)
|
|||
int result;
|
||||
|
||||
/* Start the timer to track NIC errors */
|
||||
setup_timer(&adapter->error_timer, et131x_error_timer_handler,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->error_timer, et131x_error_timer_handler, 0);
|
||||
adapter->error_timer.expires = jiffies +
|
||||
msecs_to_jiffies(TX_ERROR_PERIOD);
|
||||
add_timer(&adapter->error_timer);
|
||||
|
|
|
@ -2859,9 +2859,9 @@ static void ena_update_host_info(struct ena_admin_host_info *host_info,
|
|||
(netdev->features & GENMASK_ULL(63, 32)) >> 32;
|
||||
}
|
||||
|
||||
static void ena_timer_service(unsigned long data)
|
||||
static void ena_timer_service(struct timer_list *t)
|
||||
{
|
||||
struct ena_adapter *adapter = (struct ena_adapter *)data;
|
||||
struct ena_adapter *adapter = from_timer(adapter, t, timer_service);
|
||||
u8 *debug_area = adapter->ena_dev->host_attr.debug_area_virt_addr;
|
||||
struct ena_admin_host_info *host_info =
|
||||
adapter->ena_dev->host_attr.host_info;
|
||||
|
@ -3278,8 +3278,7 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
ena_update_hints(adapter, &get_feat_ctx.hw_hints);
|
||||
|
||||
setup_timer(&adapter->timer_service, ena_timer_service,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->timer_service, ena_timer_service, 0);
|
||||
mod_timer(&adapter->timer_service, round_jiffies(jiffies + HZ));
|
||||
|
||||
dev_info(&pdev->dev, "%s found at mem %lx, mac addr %pM Queues %d\n",
|
||||
|
|
|
@ -163,9 +163,9 @@ static int aq_nic_update_link_status(struct aq_nic_s *self)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void aq_nic_service_timer_cb(unsigned long param)
|
||||
static void aq_nic_service_timer_cb(struct timer_list *t)
|
||||
{
|
||||
struct aq_nic_s *self = (struct aq_nic_s *)param;
|
||||
struct aq_nic_s *self = from_timer(self, t, service_timer);
|
||||
struct net_device *ndev = aq_nic_get_ndev(self);
|
||||
int err = 0;
|
||||
unsigned int i = 0U;
|
||||
|
@ -201,9 +201,9 @@ err_exit:
|
|||
jiffies + AQ_CFG_SERVICE_TIMER_INTERVAL);
|
||||
}
|
||||
|
||||
static void aq_nic_polling_timer_cb(unsigned long param)
|
||||
static void aq_nic_polling_timer_cb(struct timer_list *t)
|
||||
{
|
||||
struct aq_nic_s *self = (struct aq_nic_s *)param;
|
||||
struct aq_nic_s *self = from_timer(self, t, polling_timer);
|
||||
struct aq_vec_s *aq_vec = NULL;
|
||||
unsigned int i = 0U;
|
||||
|
||||
|
@ -440,14 +440,12 @@ int aq_nic_start(struct aq_nic_s *self)
|
|||
err = aq_nic_update_interrupt_moderation_settings(self);
|
||||
if (err)
|
||||
goto err_exit;
|
||||
setup_timer(&self->service_timer, &aq_nic_service_timer_cb,
|
||||
(unsigned long)self);
|
||||
timer_setup(&self->service_timer, aq_nic_service_timer_cb, 0);
|
||||
mod_timer(&self->service_timer, jiffies +
|
||||
AQ_CFG_SERVICE_TIMER_INTERVAL);
|
||||
|
||||
if (self->aq_nic_cfg.is_polling) {
|
||||
setup_timer(&self->polling_timer, &aq_nic_polling_timer_cb,
|
||||
(unsigned long)self);
|
||||
timer_setup(&self->polling_timer, aq_nic_polling_timer_cb, 0);
|
||||
mod_timer(&self->polling_timer, jiffies +
|
||||
AQ_CFG_POLLING_TIMER_INTERVAL);
|
||||
} else {
|
||||
|
|
|
@ -222,9 +222,10 @@ static u32 atl1c_wait_until_idle(struct atl1c_hw *hw, u32 modu_ctrl)
|
|||
* atl1c_phy_config - Timer Call-back
|
||||
* @data: pointer to netdev cast into an unsigned long
|
||||
*/
|
||||
static void atl1c_phy_config(unsigned long data)
|
||||
static void atl1c_phy_config(struct timer_list *t)
|
||||
{
|
||||
struct atl1c_adapter *adapter = (struct atl1c_adapter *) data;
|
||||
struct atl1c_adapter *adapter = from_timer(adapter, t,
|
||||
phy_config_timer);
|
||||
struct atl1c_hw *hw = &adapter->hw;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -2613,8 +2614,7 @@ static int atl1c_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
adapter->mii.phy_id_mask = 0x1f;
|
||||
adapter->mii.reg_num_mask = MDIO_CTRL_REG_MASK;
|
||||
netif_napi_add(netdev, &adapter->napi, atl1c_clean, 64);
|
||||
setup_timer(&adapter->phy_config_timer, atl1c_phy_config,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->phy_config_timer, atl1c_phy_config, 0);
|
||||
/* setup the private structure */
|
||||
err = atl1c_sw_init(adapter);
|
||||
if (err) {
|
||||
|
|
|
@ -130,9 +130,10 @@ static inline void atl1e_irq_reset(struct atl1e_adapter *adapter)
|
|||
* atl1e_phy_config - Timer Call-back
|
||||
* @data: pointer to netdev cast into an unsigned long
|
||||
*/
|
||||
static void atl1e_phy_config(unsigned long data)
|
||||
static void atl1e_phy_config(struct timer_list *t)
|
||||
{
|
||||
struct atl1e_adapter *adapter = (struct atl1e_adapter *) data;
|
||||
struct atl1e_adapter *adapter = from_timer(adapter, t,
|
||||
phy_config_timer);
|
||||
struct atl1e_hw *hw = &adapter->hw;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -2361,8 +2362,7 @@ static int atl1e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
netif_napi_add(netdev, &adapter->napi, atl1e_clean, 64);
|
||||
|
||||
setup_timer(&adapter->phy_config_timer, atl1e_phy_config,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->phy_config_timer, atl1e_phy_config, 0);
|
||||
|
||||
/* get user settings */
|
||||
atl1e_check_options(adapter);
|
||||
|
|
|
@ -2575,9 +2575,10 @@ static irqreturn_t atl1_intr(int irq, void *data)
|
|||
* atl1_phy_config - Timer Call-back
|
||||
* @data: pointer to netdev cast into an unsigned long
|
||||
*/
|
||||
static void atl1_phy_config(unsigned long data)
|
||||
static void atl1_phy_config(struct timer_list *t)
|
||||
{
|
||||
struct atl1_adapter *adapter = (struct atl1_adapter *)data;
|
||||
struct atl1_adapter *adapter = from_timer(adapter, t,
|
||||
phy_config_timer);
|
||||
struct atl1_hw *hw = &adapter->hw;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -3071,8 +3072,7 @@ static int atl1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
/* assume we have no link for now */
|
||||
netif_carrier_off(netdev);
|
||||
|
||||
setup_timer(&adapter->phy_config_timer, atl1_phy_config,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->phy_config_timer, atl1_phy_config, 0);
|
||||
adapter->phy_timer_pending = false;
|
||||
|
||||
INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task);
|
||||
|
|
|
@ -1028,9 +1028,9 @@ static void atl2_tx_timeout(struct net_device *netdev)
|
|||
* atl2_watchdog - Timer Call-back
|
||||
* @data: pointer to netdev cast into an unsigned long
|
||||
*/
|
||||
static void atl2_watchdog(unsigned long data)
|
||||
static void atl2_watchdog(struct timer_list *t)
|
||||
{
|
||||
struct atl2_adapter *adapter = (struct atl2_adapter *) data;
|
||||
struct atl2_adapter *adapter = from_timer(adapter, t, watchdog_timer);
|
||||
|
||||
if (!test_bit(__ATL2_DOWN, &adapter->flags)) {
|
||||
u32 drop_rxd, drop_rxs;
|
||||
|
@ -1053,9 +1053,10 @@ static void atl2_watchdog(unsigned long data)
|
|||
* atl2_phy_config - Timer Call-back
|
||||
* @data: pointer to netdev cast into an unsigned long
|
||||
*/
|
||||
static void atl2_phy_config(unsigned long data)
|
||||
static void atl2_phy_config(struct timer_list *t)
|
||||
{
|
||||
struct atl2_adapter *adapter = (struct atl2_adapter *) data;
|
||||
struct atl2_adapter *adapter = from_timer(adapter, t,
|
||||
phy_config_timer);
|
||||
struct atl2_hw *hw = &adapter->hw;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -1434,11 +1435,9 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
|
||||
atl2_check_options(adapter);
|
||||
|
||||
setup_timer(&adapter->watchdog_timer, atl2_watchdog,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->watchdog_timer, atl2_watchdog, 0);
|
||||
|
||||
setup_timer(&adapter->phy_config_timer, atl2_phy_config,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->phy_config_timer, atl2_phy_config, 0);
|
||||
|
||||
INIT_WORK(&adapter->reset_task, atl2_reset_task);
|
||||
INIT_WORK(&adapter->link_chg_task, atl2_link_chg_task);
|
||||
|
|
|
@ -599,9 +599,9 @@ static void b44_check_phy(struct b44 *bp)
|
|||
}
|
||||
}
|
||||
|
||||
static void b44_timer(unsigned long __opaque)
|
||||
static void b44_timer(struct timer_list *t)
|
||||
{
|
||||
struct b44 *bp = (struct b44 *) __opaque;
|
||||
struct b44 *bp = from_timer(bp, t, timer);
|
||||
|
||||
spin_lock_irq(&bp->lock);
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ static int b44_open(struct net_device *dev)
|
|||
goto out;
|
||||
}
|
||||
|
||||
setup_timer(&bp->timer, b44_timer, (unsigned long)bp);
|
||||
timer_setup(&bp->timer, b44_timer, 0);
|
||||
bp->timer.expires = jiffies + HZ;
|
||||
add_timer(&bp->timer);
|
||||
|
||||
|
|
|
@ -6183,9 +6183,9 @@ bnx2_5708_serdes_timer(struct bnx2 *bp)
|
|||
}
|
||||
|
||||
static void
|
||||
bnx2_timer(unsigned long data)
|
||||
bnx2_timer(struct timer_list *t)
|
||||
{
|
||||
struct bnx2 *bp = (struct bnx2 *) data;
|
||||
struct bnx2 *bp = from_timer(bp, t, timer);
|
||||
|
||||
if (!netif_running(bp->dev))
|
||||
return;
|
||||
|
@ -8462,7 +8462,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev)
|
|||
bnx2_set_default_link(bp);
|
||||
bp->req_flow_ctrl = FLOW_CTRL_RX | FLOW_CTRL_TX;
|
||||
|
||||
setup_timer(&bp->timer, bnx2_timer, (unsigned long)bp);
|
||||
timer_setup(&bp->timer, bnx2_timer, 0);
|
||||
bp->timer.expires = RUN_AT(BNX2_TIMER_INTERVAL);
|
||||
|
||||
#ifdef BCM_CNIC
|
||||
|
|
|
@ -5761,9 +5761,9 @@ void bnx2x_drv_pulse(struct bnx2x *bp)
|
|||
bp->fw_drv_pulse_wr_seq);
|
||||
}
|
||||
|
||||
static void bnx2x_timer(unsigned long data)
|
||||
static void bnx2x_timer(struct timer_list *t)
|
||||
{
|
||||
struct bnx2x *bp = (struct bnx2x *) data;
|
||||
struct bnx2x *bp = from_timer(bp, t, timer);
|
||||
|
||||
if (!netif_running(bp->dev))
|
||||
return;
|
||||
|
@ -12421,7 +12421,7 @@ static int bnx2x_init_bp(struct bnx2x *bp)
|
|||
|
||||
bp->current_interval = CHIP_REV_IS_SLOW(bp) ? 5*HZ : HZ;
|
||||
|
||||
setup_timer(&bp->timer, bnx2x_timer, (unsigned long)bp);
|
||||
timer_setup(&bp->timer, bnx2x_timer, 0);
|
||||
bp->timer.expires = jiffies + bp->current_interval;
|
||||
|
||||
if (SHMEM2_HAS(bp, dcbx_lldp_params_offset) &&
|
||||
|
|
|
@ -6962,9 +6962,9 @@ static void bnxt_poll_controller(struct net_device *dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void bnxt_timer(unsigned long data)
|
||||
static void bnxt_timer(struct timer_list *t)
|
||||
{
|
||||
struct bnxt *bp = (struct bnxt *)data;
|
||||
struct bnxt *bp = from_timer(bp, t, timer);
|
||||
struct net_device *dev = bp->dev;
|
||||
|
||||
if (!netif_running(dev))
|
||||
|
@ -7236,7 +7236,7 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev)
|
|||
|
||||
bnxt_init_dflt_coal(bp);
|
||||
|
||||
setup_timer(&bp->timer, bnxt_timer, (unsigned long)bp);
|
||||
timer_setup(&bp->timer, bnxt_timer, 0);
|
||||
bp->current_interval = BNXT_TIMER_INTERVAL;
|
||||
|
||||
clear_bit(BNXT_STATE_OPEN, &bp->state);
|
||||
|
|
|
@ -10931,9 +10931,9 @@ static void tg3_chk_missed_msi(struct tg3 *tp)
|
|||
}
|
||||
}
|
||||
|
||||
static void tg3_timer(unsigned long __opaque)
|
||||
static void tg3_timer(struct timer_list *t)
|
||||
{
|
||||
struct tg3 *tp = (struct tg3 *) __opaque;
|
||||
struct tg3 *tp = from_timer(tp, t, timer);
|
||||
|
||||
spin_lock(&tp->lock);
|
||||
|
||||
|
@ -11087,7 +11087,7 @@ static void tg3_timer_init(struct tg3 *tp)
|
|||
tp->asf_multiplier = (HZ / tp->timer_offset) *
|
||||
TG3_FW_UPDATE_FREQ_SEC;
|
||||
|
||||
setup_timer(&tp->timer, tg3_timer, (unsigned long)tp);
|
||||
timer_setup(&tp->timer, tg3_timer, 0);
|
||||
}
|
||||
|
||||
static void tg3_timer_start(struct tg3 *tp)
|
||||
|
|
|
@ -1676,9 +1676,9 @@ static int enic_poll_msix_rq(struct napi_struct *napi, int budget)
|
|||
return work_done;
|
||||
}
|
||||
|
||||
static void enic_notify_timer(unsigned long data)
|
||||
static void enic_notify_timer(struct timer_list *t)
|
||||
{
|
||||
struct enic *enic = (struct enic *)data;
|
||||
struct enic *enic = from_timer(enic, t, notify_timer);
|
||||
|
||||
enic_notify_check(enic);
|
||||
|
||||
|
@ -2846,8 +2846,7 @@ static int enic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
/* Setup notification timer, HW reset task, and wq locks
|
||||
*/
|
||||
|
||||
setup_timer(&enic->notify_timer, enic_notify_timer,
|
||||
(unsigned long)enic);
|
||||
timer_setup(&enic->notify_timer, enic_notify_timer, 0);
|
||||
|
||||
enic_set_rx_coal_setting(enic);
|
||||
INIT_WORK(&enic->reset, enic_reset);
|
||||
|
|
|
@ -1346,9 +1346,9 @@ static void mib_counters_update(struct mv643xx_eth_private *mp)
|
|||
spin_unlock_bh(&mp->mib_counters_lock);
|
||||
}
|
||||
|
||||
static void mib_counters_timer_wrapper(unsigned long _mp)
|
||||
static void mib_counters_timer_wrapper(struct timer_list *t)
|
||||
{
|
||||
struct mv643xx_eth_private *mp = (void *)_mp;
|
||||
struct mv643xx_eth_private *mp = from_timer(mp, t, mib_counters_timer);
|
||||
mib_counters_update(mp);
|
||||
mod_timer(&mp->mib_counters_timer, jiffies + 30 * HZ);
|
||||
}
|
||||
|
@ -2321,9 +2321,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
|
|||
return work_done;
|
||||
}
|
||||
|
||||
static inline void oom_timer_wrapper(unsigned long data)
|
||||
static inline void oom_timer_wrapper(struct timer_list *t)
|
||||
{
|
||||
struct mv643xx_eth_private *mp = (void *)data;
|
||||
struct mv643xx_eth_private *mp = from_timer(mp, t, rx_oom);
|
||||
|
||||
napi_schedule(&mp->napi);
|
||||
}
|
||||
|
@ -3178,8 +3178,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
|
|||
|
||||
mib_counters_clear(mp);
|
||||
|
||||
setup_timer(&mp->mib_counters_timer, mib_counters_timer_wrapper,
|
||||
(unsigned long)mp);
|
||||
timer_setup(&mp->mib_counters_timer, mib_counters_timer_wrapper, 0);
|
||||
mp->mib_counters_timer.expires = jiffies + 30 * HZ;
|
||||
|
||||
spin_lock_init(&mp->mib_counters_lock);
|
||||
|
@ -3188,7 +3187,7 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
|
|||
|
||||
netif_napi_add(dev, &mp->napi, mv643xx_eth_poll, NAPI_POLL_WEIGHT);
|
||||
|
||||
setup_timer(&mp->rx_oom, oom_timer_wrapper, (unsigned long)mp);
|
||||
timer_setup(&mp->rx_oom, oom_timer_wrapper, 0);
|
||||
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
|
|
|
@ -362,9 +362,9 @@ static void rxq_refill(struct net_device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static inline void rxq_refill_timer_wrapper(unsigned long data)
|
||||
static inline void rxq_refill_timer_wrapper(struct timer_list *t)
|
||||
{
|
||||
struct pxa168_eth_private *pep = (void *)data;
|
||||
struct pxa168_eth_private *pep = from_timer(pep, t, timeout);
|
||||
napi_schedule(&pep->napi);
|
||||
}
|
||||
|
||||
|
@ -1496,8 +1496,7 @@ static int pxa168_eth_probe(struct platform_device *pdev)
|
|||
netif_napi_add(dev, &pep->napi, pxa168_rx_poll, pep->rx_ring_size);
|
||||
|
||||
memset(&pep->timeout, 0, sizeof(struct timer_list));
|
||||
setup_timer(&pep->timeout, rxq_refill_timer_wrapper,
|
||||
(unsigned long)pep);
|
||||
timer_setup(&pep->timeout, rxq_refill_timer_wrapper, 0);
|
||||
|
||||
pep->smi_bus = mdiobus_alloc();
|
||||
if (!pep->smi_bus) {
|
||||
|
|
|
@ -1495,9 +1495,9 @@ static int xm_check_link(struct net_device *dev)
|
|||
* get an interrupt when carrier is detected, need to poll for
|
||||
* link coming up.
|
||||
*/
|
||||
static void xm_link_timer(unsigned long arg)
|
||||
static void xm_link_timer(struct timer_list *t)
|
||||
{
|
||||
struct skge_port *skge = (struct skge_port *) arg;
|
||||
struct skge_port *skge = from_timer(skge, t, link_timer);
|
||||
struct net_device *dev = skge->netdev;
|
||||
struct skge_hw *hw = skge->hw;
|
||||
int port = skge->port;
|
||||
|
@ -3897,7 +3897,7 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
|
|||
|
||||
/* Only used for Genesis XMAC */
|
||||
if (is_genesis(hw))
|
||||
setup_timer(&skge->link_timer, xm_link_timer, (unsigned long) skge);
|
||||
timer_setup(&skge->link_timer, xm_link_timer, 0);
|
||||
else {
|
||||
dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG |
|
||||
NETIF_F_RXCSUM;
|
||||
|
|
|
@ -2974,9 +2974,9 @@ static int sky2_rx_hung(struct net_device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static void sky2_watchdog(unsigned long arg)
|
||||
static void sky2_watchdog(struct timer_list *t)
|
||||
{
|
||||
struct sky2_hw *hw = (struct sky2_hw *) arg;
|
||||
struct sky2_hw *hw = from_timer(hw, t, watchdog_timer);
|
||||
|
||||
/* Check for lost IRQ once a second */
|
||||
if (sky2_read32(hw, B0_ISRC)) {
|
||||
|
@ -5083,7 +5083,7 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
sky2_show_addr(dev1);
|
||||
}
|
||||
|
||||
setup_timer(&hw->watchdog_timer, sky2_watchdog, (unsigned long) hw);
|
||||
timer_setup(&hw->watchdog_timer, sky2_watchdog, 0);
|
||||
INIT_WORK(&hw->restart_work, sky2_restart);
|
||||
|
||||
pci_set_drvdata(pdev, hw);
|
||||
|
|
|
@ -3501,7 +3501,7 @@ static void myri10ge_watchdog(struct work_struct *work)
|
|||
* cannot detect a NIC with a parity error in a timely fashion if the
|
||||
* NIC is lightly loaded.
|
||||
*/
|
||||
static void myri10ge_watchdog_timer(unsigned long arg)
|
||||
static void myri10ge_watchdog_timer(struct timer_list *t)
|
||||
{
|
||||
struct myri10ge_priv *mgp;
|
||||
struct myri10ge_slice_state *ss;
|
||||
|
@ -3509,7 +3509,7 @@ static void myri10ge_watchdog_timer(unsigned long arg)
|
|||
u32 rx_pause_cnt;
|
||||
u16 cmd;
|
||||
|
||||
mgp = (struct myri10ge_priv *)arg;
|
||||
mgp = from_timer(mgp, t, watchdog_timer);
|
||||
|
||||
rx_pause_cnt = ntohl(mgp->ss[0].fw_stats->dropped_pause);
|
||||
busy_slice_cnt = 0;
|
||||
|
@ -3930,8 +3930,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
pci_save_state(pdev);
|
||||
|
||||
/* Setup the watchdog timer */
|
||||
setup_timer(&mgp->watchdog_timer, myri10ge_watchdog_timer,
|
||||
(unsigned long)mgp);
|
||||
timer_setup(&mgp->watchdog_timer, myri10ge_watchdog_timer, 0);
|
||||
|
||||
netdev->ethtool_ops = &myri10ge_ethtool_ops;
|
||||
INIT_WORK(&mgp->watchdog_work, myri10ge_watchdog);
|
||||
|
|
|
@ -1089,9 +1089,10 @@ static void pch_gbe_set_mode(struct pch_gbe_adapter *adapter, u16 speed,
|
|||
* pch_gbe_watchdog - Watchdog process
|
||||
* @data: Board private structure
|
||||
*/
|
||||
static void pch_gbe_watchdog(unsigned long data)
|
||||
static void pch_gbe_watchdog(struct timer_list *t)
|
||||
{
|
||||
struct pch_gbe_adapter *adapter = (struct pch_gbe_adapter *)data;
|
||||
struct pch_gbe_adapter *adapter = from_timer(adapter, t,
|
||||
watchdog_timer);
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
struct pch_gbe_hw *hw = &adapter->hw;
|
||||
|
||||
|
@ -2644,8 +2645,7 @@ static int pch_gbe_probe(struct pci_dev *pdev,
|
|||
dev_err(&pdev->dev, "Invalid MAC address, "
|
||||
"interface disabled.\n");
|
||||
}
|
||||
setup_timer(&adapter->watchdog_timer, pch_gbe_watchdog,
|
||||
(unsigned long)adapter);
|
||||
timer_setup(&adapter->watchdog_timer, pch_gbe_watchdog, 0);
|
||||
|
||||
INIT_WORK(&adapter->reset_task, pch_gbe_reset_task);
|
||||
|
||||
|
|
|
@ -943,9 +943,9 @@ static irqreturn_t pasemi_mac_rx_intr(int irq, void *data)
|
|||
|
||||
#define TX_CLEAN_INTERVAL HZ
|
||||
|
||||
static void pasemi_mac_tx_timer(unsigned long data)
|
||||
static void pasemi_mac_tx_timer(struct timer_list *t)
|
||||
{
|
||||
struct pasemi_mac_txring *txring = (struct pasemi_mac_txring *)data;
|
||||
struct pasemi_mac_txring *txring = from_timer(txring, t, clean_timer);
|
||||
struct pasemi_mac *mac = txring->mac;
|
||||
|
||||
pasemi_mac_clean_tx(txring);
|
||||
|
@ -1199,8 +1199,7 @@ static int pasemi_mac_open(struct net_device *dev)
|
|||
if (dev->phydev)
|
||||
phy_start(dev->phydev);
|
||||
|
||||
setup_timer(&mac->tx->clean_timer, pasemi_mac_tx_timer,
|
||||
(unsigned long)mac->tx);
|
||||
timer_setup(&mac->tx->clean_timer, pasemi_mac_tx_timer, 0);
|
||||
mod_timer(&mac->tx->clean_timer, jiffies + HZ);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -3749,9 +3749,9 @@ static void ql_get_board_info(struct ql3_adapter *qdev)
|
|||
qdev->pci_slot = (u8) PCI_SLOT(qdev->pdev->devfn);
|
||||
}
|
||||
|
||||
static void ql3xxx_timer(unsigned long ptr)
|
||||
static void ql3xxx_timer(struct timer_list *t)
|
||||
{
|
||||
struct ql3_adapter *qdev = (struct ql3_adapter *)ptr;
|
||||
struct ql3_adapter *qdev = from_timer(qdev, t, adapter_timer);
|
||||
queue_delayed_work(qdev->workqueue, &qdev->link_state_work, 0);
|
||||
}
|
||||
|
||||
|
@ -3891,7 +3891,7 @@ static int ql3xxx_probe(struct pci_dev *pdev,
|
|||
INIT_DELAYED_WORK(&qdev->tx_timeout_work, ql_tx_timeout_work);
|
||||
INIT_DELAYED_WORK(&qdev->link_state_work, ql_link_state_machine_work);
|
||||
|
||||
setup_timer(&qdev->adapter_timer, ql3xxx_timer, (unsigned long)qdev);
|
||||
timer_setup(&qdev->adapter_timer, ql3xxx_timer, 0);
|
||||
qdev->adapter_timer.expires = jiffies + HZ * 2; /* two second delay */
|
||||
|
||||
if (!cards_found) {
|
||||
|
|
|
@ -1983,9 +1983,9 @@ err_out:
|
|||
return err;
|
||||
}
|
||||
|
||||
static void ofdpa_fdb_cleanup(unsigned long data)
|
||||
static void ofdpa_fdb_cleanup(struct timer_list *t)
|
||||
{
|
||||
struct ofdpa *ofdpa = (struct ofdpa *)data;
|
||||
struct ofdpa *ofdpa = from_timer(ofdpa, t, fdb_cleanup_timer);
|
||||
struct ofdpa_port *ofdpa_port;
|
||||
struct ofdpa_fdb_tbl_entry *entry;
|
||||
struct hlist_node *tmp;
|
||||
|
@ -2368,8 +2368,7 @@ static int ofdpa_init(struct rocker *rocker)
|
|||
hash_init(ofdpa->neigh_tbl);
|
||||
spin_lock_init(&ofdpa->neigh_tbl_lock);
|
||||
|
||||
setup_timer(&ofdpa->fdb_cleanup_timer, ofdpa_fdb_cleanup,
|
||||
(unsigned long) ofdpa);
|
||||
timer_setup(&ofdpa->fdb_cleanup_timer, ofdpa_fdb_cleanup, 0);
|
||||
mod_timer(&ofdpa->fdb_cleanup_timer, jiffies);
|
||||
|
||||
ofdpa->ageing_time = BR_DEFAULT_AGEING_TIME;
|
||||
|
|
|
@ -345,9 +345,9 @@ void stmmac_disable_eee_mode(struct stmmac_priv *priv)
|
|||
* if there is no data transfer and if we are not in LPI state,
|
||||
* then MAC Transmitter can be moved to LPI state.
|
||||
*/
|
||||
static void stmmac_eee_ctrl_timer(unsigned long arg)
|
||||
static void stmmac_eee_ctrl_timer(struct timer_list *t)
|
||||
{
|
||||
struct stmmac_priv *priv = (struct stmmac_priv *)arg;
|
||||
struct stmmac_priv *priv = from_timer(priv, t, eee_ctrl_timer);
|
||||
|
||||
stmmac_enable_eee_mode(priv);
|
||||
mod_timer(&priv->eee_ctrl_timer, STMMAC_LPI_T(eee_timer));
|
||||
|
@ -401,9 +401,8 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
|
|||
spin_lock_irqsave(&priv->lock, flags);
|
||||
if (!priv->eee_active) {
|
||||
priv->eee_active = 1;
|
||||
setup_timer(&priv->eee_ctrl_timer,
|
||||
stmmac_eee_ctrl_timer,
|
||||
(unsigned long)priv);
|
||||
timer_setup(&priv->eee_ctrl_timer,
|
||||
stmmac_eee_ctrl_timer, 0);
|
||||
mod_timer(&priv->eee_ctrl_timer,
|
||||
STMMAC_LPI_T(eee_timer));
|
||||
|
||||
|
@ -2221,9 +2220,9 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv)
|
|||
* Description:
|
||||
* This is the timer handler to directly invoke the stmmac_tx_clean.
|
||||
*/
|
||||
static void stmmac_tx_timer(unsigned long data)
|
||||
static void stmmac_tx_timer(struct timer_list *t)
|
||||
{
|
||||
struct stmmac_priv *priv = (struct stmmac_priv *)data;
|
||||
struct stmmac_priv *priv = from_timer(priv, t, txtimer);
|
||||
u32 tx_queues_count = priv->plat->tx_queues_to_use;
|
||||
u32 queue;
|
||||
|
||||
|
@ -2244,7 +2243,7 @@ static void stmmac_init_tx_coalesce(struct stmmac_priv *priv)
|
|||
{
|
||||
priv->tx_coal_frames = STMMAC_TX_FRAMES;
|
||||
priv->tx_coal_timer = STMMAC_COAL_TX_TIMER;
|
||||
setup_timer(&priv->txtimer, stmmac_tx_timer, (unsigned long)priv);
|
||||
timer_setup(&priv->txtimer, stmmac_tx_timer, 0);
|
||||
priv->txtimer.expires = STMMAC_COAL_TIMER(priv->tx_coal_timer);
|
||||
add_timer(&priv->txtimer);
|
||||
}
|
||||
|
|
|
@ -358,9 +358,9 @@ static irqreturn_t xlgmac_dma_isr(int irq, void *data)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void xlgmac_tx_timer(unsigned long data)
|
||||
static void xlgmac_tx_timer(struct timer_list *t)
|
||||
{
|
||||
struct xlgmac_channel *channel = (struct xlgmac_channel *)data;
|
||||
struct xlgmac_channel *channel = from_timer(channel, t, tx_timer);
|
||||
struct xlgmac_pdata *pdata = channel->pdata;
|
||||
struct napi_struct *napi;
|
||||
|
||||
|
@ -391,8 +391,7 @@ static void xlgmac_init_timers(struct xlgmac_pdata *pdata)
|
|||
if (!channel->tx_ring)
|
||||
break;
|
||||
|
||||
setup_timer(&channel->tx_timer, xlgmac_tx_timer,
|
||||
(unsigned long)channel);
|
||||
timer_setup(&channel->tx_timer, xlgmac_tx_timer, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -765,9 +765,9 @@ int cpsw_ale_control_get(struct cpsw_ale *ale, int port, int control)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(cpsw_ale_control_get);
|
||||
|
||||
static void cpsw_ale_timer(unsigned long arg)
|
||||
static void cpsw_ale_timer(struct timer_list *t)
|
||||
{
|
||||
struct cpsw_ale *ale = (struct cpsw_ale *)arg;
|
||||
struct cpsw_ale *ale = from_timer(ale, t, timer);
|
||||
|
||||
cpsw_ale_control_set(ale, 0, ALE_AGEOUT, 1);
|
||||
|
||||
|
@ -859,7 +859,7 @@ void cpsw_ale_start(struct cpsw_ale *ale)
|
|||
cpsw_ale_control_set(ale, 0, ALE_ENABLE, 1);
|
||||
cpsw_ale_control_set(ale, 0, ALE_CLEAR, 1);
|
||||
|
||||
setup_timer(&ale->timer, cpsw_ale_timer, (unsigned long)ale);
|
||||
timer_setup(&ale->timer, cpsw_ale_timer, 0);
|
||||
if (ale->ageout) {
|
||||
ale->timer.expires = jiffies + ale->ageout;
|
||||
add_timer(&ale->timer);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue