workqueue: make deferrable delayed_work initializer names consistent
authorTejun Heo <tj@kernel.org>
Tue, 21 Aug 2012 20:18:23 +0000 (13:18 -0700)
committerTejun Heo <tj@kernel.org>
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 23bc9db4317e80a869c3a47074ef20b0b08f6c02..82607d621aca41880194996c578a2bfef9393edf 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 235a340e81f20bcb63805f9c911f4fd99eafeab8..55f0354864e25d5783effc0589a2f2c8e24da4c4 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 836e9b062e5ec4a2e08c935d4c49f17a79ef124b..14c1af5a264f29d33d02fef753d854c8dad0377e 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 70c31d43fff3f1f7c682187c3a3629fce99c1e96..b146d76f04cfaf9361f3e9ebd767d5c99e8e45d6 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 802498293528307b5c2e123eae089f84929759ea..37b23780a4d8ab89280570b2c82d171d8b3578fb 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 bba3ccac72fe731a6807e211af9171a3204ce8c8..3041514f4d3f2d38469048dbf5ee96bf879483b6 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 d4f0c98428cbacbef7767c8d375867aaf87cf529..0701dbc2b7e1fe4b506cd0394a12bdaed6e0b91d 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 bf022255994c86b3d3486e27e1edcc905c7246f4..5c9e7c263c382f93244a70e4be7f7ddb7a455fcc 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 804b88c760d6bf0a375c486ada3d527bf204d109..4d302803ffccb01580937ba4ffef7ecc05096ac9 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 c284143cfcd76ba7c3ccd3245fb379f953e0f40f..58e67830143c37ff520fb3e7678fe3513ecf2858 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 3f5acc7771da34f6f08549c7c8db27b40d102af9..6b5e6e0e202f253cada3b80ddf5d14db9b4b0bd7 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 b07e8864f82fd4f034f5b59cf2009850bb3ec6d1..fd40f2625051bd0db3a275fdcf5d1ed98be66a37 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 26c5b4c63861e57433cd4b4371d83a2d190b2f02..49a9c51f9ee3a649ece6d000fe8aaf139055c799 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 f8b0d539b4822af7812c8f9edcb51224450f3f64..35b5cb0da5547b19870e50d1121cf16b6de7c123 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 df7a6748231d67e524e2cea0c0a663d91f5d63d2..b3e3b9d525d08b71527365ae63a59a49695e5757 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 117afaf512689b4de570ddb0c32869a4c5532918..112c6e2266e90f67630b849a5e029ded20601a08 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 e1e0a4e8fd3469f7534cdc65b7ba3312ad66fa39..7b55c8648d4b2e236bc545e28866f65b900bfcfe 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 2afd2a84dc35aa5cab139b38f82f5c5206e83728..2a68bb3db772a4d6001716e28af4385bb9c066bb 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)