workqueue: make deferrable delayed_work initializer names consistent
Tejun Heo [Tue, 21 Aug 2012 20:18:23 +0000 (13:18 -0700)]
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>

18 files changed:
arch/powerpc/platforms/cell/cpufreq_spudemand.c
drivers/cpufreq/cpufreq_conservative.c
drivers/cpufreq/cpufreq_ondemand.c
drivers/devfreq/devfreq.c
drivers/net/ethernet/mellanox/mlx4/sense.c
drivers/power/ab8500_btemp.c
drivers/power/ab8500_charger.c
drivers/power/ab8500_fg.c
drivers/power/abx500_chargalg.c
drivers/power/max17040_battery.c
drivers/video/omap2/displays/panel-taal.c
drivers/video/omap2/dss/dsi.c
include/linux/workqueue.h
mm/slab.c
mm/vmstat.c
net/core/neighbour.c
net/ipv4/inetpeer.c
net/sunrpc/cache.c

index 23bc9db..82607d6 100644 (file)
@@ -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);
 }
 
index 235a340..55f0354 100644 (file)
@@ -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);
 }
 
index 836e9b0..14c1af5 100644 (file)
@@ -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);
 }
 
index 70c31d4..b146d76 100644 (file)
@@ -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);
index 8024982..37b2378 100644 (file)
@@ -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);
 }
index bba3cca..3041514 100644 (file)
@@ -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 */
index d4f0c98..0701dbc 100644 (file)
@@ -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 */
index bf02225..5c9e7c2 100644 (file)
@@ -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 */
index 804b88c..4d30280 100644 (file)
@@ -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 */
index c284143..58e6783 100644 (file)
@@ -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;
index 3f5acc7..6b5e6e0 100644 (file)
@@ -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");
        }
index b07e886..fd40f26 100644 (file)
@@ -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);
index 26c5b4c..49a9c51 100644 (file)
@@ -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);                 \
index f8b0d53..35b5cb0 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -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));
        }
index df7a674..b3e3b9d 100644 (file)
@@ -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));
 }
 
index 117afaf..112c6e2 100644 (file)
@@ -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,
index e1e0a4e..7b55c86 100644 (file)
@@ -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,
index 2afd2a8..2a68bb3 100644 (file)
@@ -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)