From patchwork Mon Jan 14 15:34:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1972541 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id EAC4ADF23A for ; Mon, 14 Jan 2013 15:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756850Ab3ANPeo (ORCPT ); Mon, 14 Jan 2013 10:34:44 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:54427 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756376Ab3ANPeo (ORCPT ); Mon, 14 Jan 2013 10:34:44 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r0EFYhTt029009; Mon, 14 Jan 2013 09:34:43 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0EFYhsZ014007; Mon, 14 Jan 2013 09:34:43 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Mon, 14 Jan 2013 09:34:43 -0600 Received: from barack.emea.dhcp.ti.com (barack.emea.dhcp.ti.com [137.167.125.64]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r0EFYeiJ006955; Mon, 14 Jan 2013 09:34:42 -0600 From: Peter Ujfalusi To: Dmitry Torokhov CC: , Subject: [PATCH v3 2/2] input: twl6040-vibra: Use system workqueue Date: Mon, 14 Jan 2013 16:34:38 +0100 Message-ID: <1358177678-16509-3-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1358177678-16509-1-git-send-email-peter.ujfalusi@ti.com> References: <1358177678-16509-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org It is time to switch to system wq instead creating a queue for the driver. Signed-off-by: Peter Ujfalusi --- 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; }