workqueue: make deferrable delayed_work initializer names consistent
Initalizers for deferrable delayed_work are confused. * __DEFERRED_WORK_INITIALIZER() * DECLARE_DEFERRED_WORK() * INIT_DELAYED_WORK_DEFERRABLE() Rename them to * __DEFERRABLE_WORK_INITIALIZER() * DECLARE_DEFERRABLE_WORK() * INIT_DEFERRABLE_WORK() This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Родитель
ee64e7f697
Коммит
203b42f731
|
@ -76,7 +76,7 @@ static void spu_gov_work(struct work_struct *work)
|
|||
static void spu_gov_init_work(struct spu_gov_info_struct *info)
|
||||
{
|
||||
int delay = usecs_to_jiffies(info->poll_int);
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work);
|
||||
INIT_DEFERRABLE_WORK(&info->work, spu_gov_work);
|
||||
schedule_delayed_work_on(info->policy->cpu, &info->work, delay);
|
||||
}
|
||||
|
||||
|
|
|
@ -466,7 +466,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
|
|||
delay -= jiffies % delay;
|
||||
|
||||
dbs_info->enable = 1;
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
|
||||
INIT_DEFERRABLE_WORK(&dbs_info->work, do_dbs_timer);
|
||||
schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay);
|
||||
}
|
||||
|
||||
|
|
|
@ -644,7 +644,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
|
|||
delay -= jiffies % delay;
|
||||
|
||||
dbs_info->sample_type = DBS_NORMAL_SAMPLE;
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
|
||||
INIT_DEFERRABLE_WORK(&dbs_info->work, do_dbs_timer);
|
||||
schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay);
|
||||
}
|
||||
|
||||
|
|
|
@ -607,7 +607,7 @@ static int __init devfreq_start_polling(void)
|
|||
mutex_lock(&devfreq_list_lock);
|
||||
polling = false;
|
||||
devfreq_wq = create_freezable_workqueue("devfreq_wq");
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&devfreq_work, devfreq_monitor);
|
||||
INIT_DEFERRABLE_WORK(&devfreq_work, devfreq_monitor);
|
||||
mutex_unlock(&devfreq_list_lock);
|
||||
|
||||
devfreq_monitor(&devfreq_work.work);
|
||||
|
|
|
@ -153,5 +153,5 @@ void mlx4_sense_init(struct mlx4_dev *dev)
|
|||
for (port = 1; port <= dev->caps.num_ports; port++)
|
||||
sense->do_sense_port[port] = 1;
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&sense->sense_poll, mlx4_sense_port);
|
||||
INIT_DEFERRABLE_WORK(&sense->sense_poll, mlx4_sense_port);
|
||||
}
|
||||
|
|
|
@ -1018,7 +1018,7 @@ static int __devinit ab8500_btemp_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Init work for measuring temperature periodically */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->btemp_periodic_work,
|
||||
INIT_DEFERRABLE_WORK(&di->btemp_periodic_work,
|
||||
ab8500_btemp_periodic_work);
|
||||
|
||||
/* Identify the battery */
|
||||
|
|
|
@ -2618,9 +2618,9 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Init work for HW failure check */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->check_hw_failure_work,
|
||||
INIT_DEFERRABLE_WORK(&di->check_hw_failure_work,
|
||||
ab8500_charger_check_hw_failure_work);
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->check_usbchgnotok_work,
|
||||
INIT_DEFERRABLE_WORK(&di->check_usbchgnotok_work,
|
||||
ab8500_charger_check_usbchargernotok_work);
|
||||
|
||||
/*
|
||||
|
@ -2632,10 +2632,10 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
|
|||
* watchdog have to be kicked by the charger driver
|
||||
* when the AC charger is disabled
|
||||
*/
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->kick_wd_work,
|
||||
INIT_DEFERRABLE_WORK(&di->kick_wd_work,
|
||||
ab8500_charger_kick_watchdog_work);
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->check_vbat_work,
|
||||
INIT_DEFERRABLE_WORK(&di->check_vbat_work,
|
||||
ab8500_charger_check_vbat_work);
|
||||
|
||||
/* Init work for charger detection */
|
||||
|
|
|
@ -2516,19 +2516,19 @@ static int __devinit ab8500_fg_probe(struct platform_device *pdev)
|
|||
INIT_WORK(&di->fg_acc_cur_work, ab8500_fg_acc_cur_work);
|
||||
|
||||
/* Init work for reinitialising the fg algorithm */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->fg_reinit_work,
|
||||
INIT_DEFERRABLE_WORK(&di->fg_reinit_work,
|
||||
ab8500_fg_reinit_work);
|
||||
|
||||
/* Work delayed Queue to run the state machine */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->fg_periodic_work,
|
||||
INIT_DEFERRABLE_WORK(&di->fg_periodic_work,
|
||||
ab8500_fg_periodic_work);
|
||||
|
||||
/* Work to check low battery condition */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->fg_low_bat_work,
|
||||
INIT_DEFERRABLE_WORK(&di->fg_low_bat_work,
|
||||
ab8500_fg_low_bat_work);
|
||||
|
||||
/* Init work for HW failure check */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->fg_check_hw_failure_work,
|
||||
INIT_DEFERRABLE_WORK(&di->fg_check_hw_failure_work,
|
||||
ab8500_fg_check_hw_failure_work);
|
||||
|
||||
/* Initialize OVV, and other registers */
|
||||
|
|
|
@ -1848,9 +1848,9 @@ static int __devinit abx500_chargalg_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
/* Init work for chargalg */
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->chargalg_periodic_work,
|
||||
INIT_DEFERRABLE_WORK(&di->chargalg_periodic_work,
|
||||
abx500_chargalg_periodic_work);
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&di->chargalg_wd_work,
|
||||
INIT_DEFERRABLE_WORK(&di->chargalg_wd_work,
|
||||
abx500_chargalg_wd_work);
|
||||
|
||||
/* Init work for chargalg */
|
||||
|
|
|
@ -232,7 +232,7 @@ static int __devinit max17040_probe(struct i2c_client *client,
|
|||
max17040_reset(client);
|
||||
max17040_get_version(client);
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&chip->work, max17040_work);
|
||||
INIT_DEFERRABLE_WORK(&chip->work, max17040_work);
|
||||
schedule_delayed_work(&chip->work, MAX17040_DELAY);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -906,7 +906,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
|
|||
r = -ENOMEM;
|
||||
goto err_wq;
|
||||
}
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&td->esd_work, taal_esd_work);
|
||||
INIT_DEFERRABLE_WORK(&td->esd_work, taal_esd_work);
|
||||
INIT_DELAYED_WORK(&td->ulps_work, taal_ulps_work);
|
||||
|
||||
dev_set_drvdata(&dssdev->dev, td);
|
||||
|
@ -962,8 +962,8 @@ static int taal_probe(struct omap_dss_device *dssdev)
|
|||
goto err_irq;
|
||||
}
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&td->te_timeout_work,
|
||||
taal_te_timeout_work_callback);
|
||||
INIT_DEFERRABLE_WORK(&td->te_timeout_work,
|
||||
taal_te_timeout_work_callback);
|
||||
|
||||
dev_dbg(&dssdev->dev, "Using GPIO TE\n");
|
||||
}
|
||||
|
|
|
@ -4863,8 +4863,8 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev)
|
|||
mutex_init(&dsi->lock);
|
||||
sema_init(&dsi->bus_lock, 1);
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&dsi->framedone_timeout_work,
|
||||
dsi_framedone_timeout_work_callback);
|
||||
INIT_DEFERRABLE_WORK(&dsi->framedone_timeout_work,
|
||||
dsi_framedone_timeout_work_callback);
|
||||
|
||||
#ifdef DSI_CATCH_MISSING_TE
|
||||
init_timer(&dsi->te_timer);
|
||||
|
|
|
@ -139,7 +139,7 @@ struct execute_work {
|
|||
0, (unsigned long)&(n)), \
|
||||
}
|
||||
|
||||
#define __DEFERRED_WORK_INITIALIZER(n, f) { \
|
||||
#define __DEFERRABLE_WORK_INITIALIZER(n, f) { \
|
||||
.work = __WORK_INITIALIZER((n).work, (f)), \
|
||||
.timer = TIMER_DEFERRED_INITIALIZER(delayed_work_timer_fn, \
|
||||
0, (unsigned long)&(n)), \
|
||||
|
@ -151,8 +151,8 @@ struct execute_work {
|
|||
#define DECLARE_DELAYED_WORK(n, f) \
|
||||
struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f)
|
||||
|
||||
#define DECLARE_DEFERRED_WORK(n, f) \
|
||||
struct delayed_work n = __DEFERRED_WORK_INITIALIZER(n, f)
|
||||
#define DECLARE_DEFERRABLE_WORK(n, f) \
|
||||
struct delayed_work n = __DEFERRABLE_WORK_INITIALIZER(n, f)
|
||||
|
||||
/*
|
||||
* initialize a work item's function pointer
|
||||
|
@ -232,7 +232,7 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
|
|||
(_work)->timer.data = (unsigned long)(_work); \
|
||||
} while (0)
|
||||
|
||||
#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
|
||||
#define INIT_DEFERRABLE_WORK(_work, _func) \
|
||||
do { \
|
||||
INIT_WORK(&(_work)->work, (_func)); \
|
||||
init_timer_deferrable(&(_work)->timer); \
|
||||
|
|
|
@ -900,7 +900,7 @@ static void __cpuinit start_cpu_timer(int cpu)
|
|||
*/
|
||||
if (keventd_up() && reap_work->work.func == NULL) {
|
||||
init_reap_node(cpu);
|
||||
INIT_DELAYED_WORK_DEFERRABLE(reap_work, cache_reap);
|
||||
INIT_DEFERRABLE_WORK(reap_work, cache_reap);
|
||||
schedule_delayed_work_on(cpu, reap_work,
|
||||
__round_jiffies_relative(HZ, cpu));
|
||||
}
|
||||
|
|
|
@ -1157,7 +1157,7 @@ static void __cpuinit start_cpu_timer(int cpu)
|
|||
{
|
||||
struct delayed_work *work = &per_cpu(vmstat_work, cpu);
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(work, vmstat_update);
|
||||
INIT_DEFERRABLE_WORK(work, vmstat_update);
|
||||
schedule_delayed_work_on(cpu, work, __round_jiffies_relative(HZ, cpu));
|
||||
}
|
||||
|
||||
|
|
|
@ -1545,7 +1545,7 @@ static void neigh_table_init_no_netlink(struct neigh_table *tbl)
|
|||
panic("cannot allocate neighbour cache hashes");
|
||||
|
||||
rwlock_init(&tbl->lock);
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&tbl->gc_work, neigh_periodic_work);
|
||||
INIT_DEFERRABLE_WORK(&tbl->gc_work, neigh_periodic_work);
|
||||
schedule_delayed_work(&tbl->gc_work, tbl->parms.reachable_time);
|
||||
setup_timer(&tbl->proxy_timer, neigh_proxy_process, (unsigned long)tbl);
|
||||
skb_queue_head_init_class(&tbl->proxy_queue,
|
||||
|
|
|
@ -194,7 +194,7 @@ void __init inet_initpeers(void)
|
|||
0, SLAB_HWCACHE_ALIGN | SLAB_PANIC,
|
||||
NULL);
|
||||
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&gc_work, inetpeer_gc_worker);
|
||||
INIT_DEFERRABLE_WORK(&gc_work, inetpeer_gc_worker);
|
||||
}
|
||||
|
||||
static int addr_compare(const struct inetpeer_addr *a,
|
||||
|
|
|
@ -1635,7 +1635,7 @@ static int create_cache_proc_entries(struct cache_detail *cd, struct net *net)
|
|||
|
||||
void __init cache_initialize(void)
|
||||
{
|
||||
INIT_DELAYED_WORK_DEFERRABLE(&cache_cleaner, do_cache_clean);
|
||||
INIT_DEFERRABLE_WORK(&cache_cleaner, do_cache_clean);
|
||||
}
|
||||
|
||||
int cache_register_net(struct cache_detail *cd, struct net *net)
|
||||
|
|
Загрузка…
Ссылка в новой задаче