input/tps6507x-ts: use system_wq instead of dedicated workqueue
authorTejun Heo <tj@kernel.org>
Wed, 26 Jan 2011 11:12:50 +0000 (12:12 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 26 Jan 2011 11:12:50 +0000 (12:12 +0100)
With cmwq, there's no reason to use a separate workqueue.  Drop
tps6507x_ts->wq and use system_wq instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Todd Fischer<todd.fischer@ridgerun.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Cc: Dan Carpenter <error27@gmail.com>
drivers/input/touchscreen/tps6507x-ts.c

index c8c136cf7bbc2e5429a102974616a0b6dad369c7..43031492d733a4c51b1888481b93265b2d13e881 100644 (file)
@@ -43,7 +43,6 @@ struct tps6507x_ts {
        struct input_dev        *input_dev;
        struct device           *dev;
        char                    phys[32];
-       struct workqueue_struct *wq;
        struct delayed_work     work;
        unsigned                polling;        /* polling is active */
        struct ts_event         tc;
@@ -220,8 +219,8 @@ done:
        poll = 1;
 
        if (poll) {
-               schd = queue_delayed_work(tsc->wq, &tsc->work,
-                                         msecs_to_jiffies(tsc->poll_period));
+               schd = schedule_delayed_work(&tsc->work,
+                                       msecs_to_jiffies(tsc->poll_period));
                if (schd)
                        tsc->polling = 1;
                else {
@@ -303,7 +302,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
        tsc->input_dev = input_dev;
 
        INIT_DELAYED_WORK(&tsc->work, tps6507x_ts_handler);
-       tsc->wq = create_workqueue("TPS6507x Touchscreen");
 
        if (init_data) {
                tsc->poll_period = init_data->poll_period;
@@ -325,8 +323,8 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
        if (error)
                goto err2;
 
-       schd = queue_delayed_work(tsc->wq, &tsc->work,
-                                 msecs_to_jiffies(tsc->poll_period));
+       schd = schedule_delayed_work(&tsc->work,
+                                    msecs_to_jiffies(tsc->poll_period));
 
        if (schd)
                tsc->polling = 1;
@@ -341,7 +339,6 @@ static int tps6507x_ts_probe(struct platform_device *pdev)
 
 err2:
        cancel_delayed_work_sync(&tsc->work);
-       destroy_workqueue(tsc->wq);
        input_free_device(input_dev);
 err1:
        kfree(tsc);
@@ -357,7 +354,6 @@ static int __devexit tps6507x_ts_remove(struct platform_device *pdev)
        struct input_dev *input_dev = tsc->input_dev;
 
        cancel_delayed_work_sync(&tsc->work);
-       destroy_workqueue(tsc->wq);
 
        input_unregister_device(input_dev);
 
This page took 0.025733 seconds and 5 git commands to generate.