From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/4] Input: twl6040-vibra: Code cleanup in probe with devm_* conversion
Date: Fri, 11 Jan 2013 09:04:53 -0800 [thread overview]
Message-ID: <20130111170453.GB11224@core.coreip.homeip.net> (raw)
In-Reply-To: <1357896483-20764-4-git-send-email-peter.ujfalusi@ti.com>
Hi Peter,
On Fri, Jan 11, 2013 at 10:28:02AM +0100, Peter Ujfalusi wrote:
> @@ -422,11 +413,8 @@ static int twl6040_vibra_remove(struct platform_device *pdev)
> {
> struct vibra_info *info = platform_get_drvdata(pdev);
>
> - input_unregister_device(info->input_dev);
> - free_irq(info->irq, info);
> regulator_bulk_free(ARRAY_SIZE(info->supplies), info->supplies);
> destroy_workqueue(info->workqueue);
> - kfree(info);
>
I do not think we can switch to managed resources while using
non-managed version of regulator_bulk_get, because with this patch you
shutting down regulators (presumably making device inoperable) while
the input device and interrupt are alive and kicking. BTW, the wq patch
should have been before this one in the queue as again you can't
destroy work queue while input device is active.
I see 3 ways here:
1. Change regulator core to allow separate owner device from the device
the resource is attached to.
2. Create custom version of devm_regulator_bulk_get() and use it in
twl6040.
3. Keep the resources unmanaged.
Unless there are many drivers like twl6040 to justify 1 I'd go with 3.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2013-01-11 17:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 9:27 [PATCH v2 0/4] Input: twl*-vibra cleanups (devm_* conversion, system wq) Peter Ujfalusi
2013-01-11 9:28 ` [PATCH v2 1/4] Input: twl4030-vibra: Convert to use devm_* in probe Peter Ujfalusi
2013-01-11 17:06 ` Dmitry Torokhov
2013-01-11 9:28 ` [PATCH v2 2/4] input: twl4030-vibra: Use system workqueue Peter Ujfalusi
2013-01-11 17:06 ` Dmitry Torokhov
2013-01-11 9:28 ` [PATCH v2 3/4] Input: twl6040-vibra: Code cleanup in probe with devm_* conversion Peter Ujfalusi
2013-01-11 17:04 ` Dmitry Torokhov [this message]
2013-01-11 9:28 ` [PATCH v2 4/4] input: twl6040-vibra: Use system workqueue Peter Ujfalusi
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=20130111170453.GB11224@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
/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®