Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Peter Ujfalusi and committed by
Dmitry Torokhov
21fb9f0d b2ebcc1b

+1 -10
+1 -10
drivers/input/misc/twl6040-vibra.c
··· 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 364 INIT_WORK(&info->play_work, vibra_play_work); 371 365 372 366 info->input_dev = input_allocate_device(); 373 367 if (info->input_dev == NULL) { 374 368 dev_err(info->dev, "couldn't allocate input device\n"); 375 369 ret = -ENOMEM; 376 - goto err_wq; 370 + goto err_regulator; 377 371 } 378 372 379 373 input_set_drvdata(info->input_dev, info); ··· 398 404 input_ff_destroy(info->input_dev); 399 405 err_ialloc: 400 406 input_free_device(info->input_dev); 401 - err_wq: 402 - destroy_workqueue(info->workqueue); 403 407 err_regulator: 404 408 regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies); 405 409 return ret; ··· 409 417 410 418 input_unregister_device(info->input_dev); 411 419 regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies); 412 - destroy_workqueue(info->workqueue); 413 420 414 421 return 0; 415 422 }