diff options
| author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2013-01-25 03:03:54 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-01-25 03:06:53 -0500 |
| commit | 21fb9f0d5e91152066c9be801b44a7c592fd3fa2 (patch) | |
| tree | f2503fe4fb3d5aac97a15ee2fe199d0845e6ad8c /drivers/input | |
| parent | b2ebcc1be96ee6dd5481697b421447e5a3f61d76 (diff) | |
Input: twl6040-vibra - use system workqueue
It is time to switch to system wq instead creating a queue for the driver.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/misc/twl6040-vibra.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index d1e31b8eb121..0c2dfc8e9691 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c | |||
| @@ -361,19 +361,13 @@ static int twl6040_vibra_probe(struct platform_device *pdev) | |||
| 361 | } | 361 | } |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | info->workqueue = alloc_workqueue("twl6040-vibra", 0, 0); | ||
| 365 | if (info->workqueue == NULL) { | ||
| 366 | dev_err(info->dev, "couldn't create workqueue\n"); | ||
| 367 | ret = -ENOMEM; | ||
| 368 | goto err_regulator; | ||
| 369 | } | ||
| 370 | INIT_WORK(&info->play_work, vibra_play_work); | 364 | INIT_WORK(&info->play_work, vibra_play_work); |
| 371 | 365 | ||
| 372 | info->input_dev = input_allocate_device(); | 366 | info->input_dev = input_allocate_device(); |
| 373 | if (info->input_dev == NULL) { | 367 | if (info->input_dev == NULL) { |
| 374 | dev_err(info->dev, "couldn't allocate input device\n"); | 368 | dev_err(info->dev, "couldn't allocate input device\n"); |
| 375 | ret = -ENOMEM; | 369 | ret = -ENOMEM; |
| 376 | goto err_wq; | 370 | goto err_regulator; |
| 377 | } | 371 | } |
| 378 | 372 | ||
| 379 | input_set_drvdata(info->input_dev, info); | 373 | input_set_drvdata(info->input_dev, info); |
| @@ -404,8 +398,6 @@ err_iff: | |||
| 404 | input_ff_destroy(info->input_dev); | 398 | input_ff_destroy(info->input_dev); |
| 405 | err_ialloc: | 399 | err_ialloc: |
| 406 | input_free_device(info->input_dev); | 400 | input_free_device(info->input_dev); |
| 407 | err_wq: | ||
| 408 | destroy_workqueue(info->workqueue); | ||
| 409 | err_regulator: | 401 | err_regulator: |
| 410 | regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies); | 402 | regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies); |
| 411 | return ret; | 403 | return ret; |
| @@ -417,7 +409,6 @@ static int twl6040_vibra_remove(struct platform_device *pdev) | |||
| 417 | 409 | ||
| 418 | input_unregister_device(info->input_dev); | 410 | input_unregister_device(info->input_dev); |
| 419 | regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies); | 411 | regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies); |
| 420 | destroy_workqueue(info->workqueue); | ||
| 421 | 412 | ||
| 422 | return 0; | 413 | return 0; |
| 423 | } | 414 | } |
