~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/input/touchscreen/tps6507x-ts.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        struct input_dev        *input_dev;
44
44
        struct device           *dev;
45
45
        char                    phys[32];
46
 
        struct workqueue_struct *wq;
47
46
        struct delayed_work     work;
48
47
        unsigned                polling;        /* polling is active */
49
48
        struct ts_event         tc;
220
219
        poll = 1;
221
220
 
222
221
        if (poll) {
223
 
                schd = queue_delayed_work(tsc->wq, &tsc->work,
224
 
                                          msecs_to_jiffies(tsc->poll_period));
 
222
                schd = schedule_delayed_work(&tsc->work,
 
223
                                        msecs_to_jiffies(tsc->poll_period));
225
224
                if (schd)
226
225
                        tsc->polling = 1;
227
226
                else {
303
302
        tsc->input_dev = input_dev;
304
303
 
305
304
        INIT_DELAYED_WORK(&tsc->work, tps6507x_ts_handler);
306
 
        tsc->wq = create_workqueue("TPS6507x Touchscreen");
307
305
 
308
306
        if (init_data) {
309
307
                tsc->poll_period = init_data->poll_period;
325
323
        if (error)
326
324
                goto err2;
327
325
 
328
 
        schd = queue_delayed_work(tsc->wq, &tsc->work,
329
 
                                  msecs_to_jiffies(tsc->poll_period));
 
326
        schd = schedule_delayed_work(&tsc->work,
 
327
                                     msecs_to_jiffies(tsc->poll_period));
330
328
 
331
329
        if (schd)
332
330
                tsc->polling = 1;
341
339
 
342
340
err2:
343
341
        cancel_delayed_work_sync(&tsc->work);
344
 
        destroy_workqueue(tsc->wq);
345
342
        input_free_device(input_dev);
346
343
err1:
347
344
        kfree(tsc);
357
354
        struct input_dev *input_dev = tsc->input_dev;
358
355
 
359
356
        cancel_delayed_work_sync(&tsc->work);
360
 
        destroy_workqueue(tsc->wq);
361
357
 
362
358
        input_unregister_device(input_dev);
363
359