lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Jan 2013 16:34:38 +0100
From:	Peter Ujfalusi <peter.ujfalusi@...com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:	<linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v3 2/2] 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@...com>
---
 drivers/input/misc/twl6040-vibra.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
index d1e31b8..0c2dfc8 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)
 		}
 	}
 
-	info->workqueue = alloc_workqueue("twl6040-vibra", 0, 0);
-	if (info->workqueue == NULL) {
-		dev_err(info->dev, "couldn't create workqueue\n");
-		ret = -ENOMEM;
-		goto err_regulator;
-	}
 	INIT_WORK(&info->play_work, vibra_play_work);
 
 	info->input_dev = input_allocate_device();
 	if (info->input_dev == NULL) {
 		dev_err(info->dev, "couldn't allocate input device\n");
 		ret = -ENOMEM;
-		goto err_wq;
+		goto err_regulator;
 	}
 
 	input_set_drvdata(info->input_dev, info);
@@ -404,8 +398,6 @@ err_iff:
 	input_ff_destroy(info->input_dev);
 err_ialloc:
 	input_free_device(info->input_dev);
-err_wq:
-	destroy_workqueue(info->workqueue);
 err_regulator:
 	regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies);
 	return ret;
@@ -417,7 +409,6 @@ static int twl6040_vibra_remove(struct platform_device *pdev)
 
 	input_unregister_device(info->input_dev);
 	regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies);
-	destroy_workqueue(info->workqueue);
 
 	return 0;
 }
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ