From: Mark Brown <broonie@kernel.org>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: lee.jones@linaro.org, lgirdwood@gmail.com,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com
Subject: Re: [PATCH RESEND 1/2] regulator: arizona-ldo1: Improve handling of regulator unbinding
Date: Wed, 22 Jan 2020 13:11:49 +0000 [thread overview]
Message-ID: <20200122131149.GE3833@sirena.org.uk> (raw)
In-Reply-To: <20200122110842.10702-1-ckeepax@opensource.cirrus.com>
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
On Wed, Jan 22, 2020 at 11:08:41AM +0000, Charles Keepax wrote:
> The current unbinding process for Madera has some issues. The trouble
> is runtime PM is disabled as the first step of the process, but
Why not just leave runtime PM active until all the subdevices are gone?
This is a really bad hack and it's going to be fragile.
> +static int madera_ldo1_remove(struct platform_device *pdev)
> +{
> + struct madera *madera = dev_get_drvdata(pdev->dev.parent);
> +
> + if (madera->internal_dcvdd) {
> + regulator_disable(madera->dcvdd);
> + regulator_put(madera->dcvdd);
> + }
This is going to break bisection since it will result in double
disables, it'd be fine to do the MFD change first since that'd just
leak a reference to enable on a regulator which is about to be discarded
entirely anyway but this reordering (and whatever other changes you've
done since v1) means you add a double free.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-01-22 13:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-22 11:08 Charles Keepax
2020-01-22 11:08 ` [PATCH RESEND 2/2] mfd: madera: " Charles Keepax
2020-01-22 13:11 ` Mark Brown [this message]
2020-01-23 9:26 ` [PATCH RESEND 1/2] regulator: arizona-ldo1: " Charles Keepax
2020-01-23 11:48 ` Mark Brown
2020-01-23 12:02 ` Charles Keepax
2020-01-23 12:09 ` Mark Brown
2020-02-19 12:31 ` Lee Jones
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=20200122131149.GE3833@sirena.org.uk \
--to=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.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®