From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v3 2/2] input: twl6040-vibra: Use system workqueue
Date: Mon, 14 Jan 2013 16:34:38 +0100 [thread overview]
Message-ID: <1358177678-16509-3-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1358177678-16509-1-git-send-email-peter.ujfalusi@ti.com>
It is time to switch to system wq instead creating a queue for the driver.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.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
next prev parent reply other threads:[~2013-01-14 15:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 15:34 [PATCH v3 0/2] Input: twl6040-vibra cleanups (devm_* conversion, system wq) Peter Ujfalusi
2013-01-14 15:34 ` [PATCH v3 1/2] Input: twl6040-vibra: Code cleanup in probe with devm_* conversion Peter Ujfalusi
2013-01-14 15:34 ` Peter Ujfalusi [this message]
2013-01-24 11:44 ` [PATCH v3 0/2] Input: twl6040-vibra cleanups (devm_* conversion, system wq) Peter Ujfalusi
2013-01-25 8:20 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358177678-16509-3-git-send-email-peter.ujfalusi@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®