public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Jingoo Han <jg1.han@samsung.com>
Cc: "'Mark Brown'" <broonie@kernel.org>,
	"'Liam Girdwood'" <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, "'Axel Lin'" <axel.lin@ingics.com>
Subject: Re: [PATCH 4/6] regulator: gpio-regulator: use devm_regulator_register()
Date: Fri, 6 Dec 2013 10:12:05 +0100	[thread overview]
Message-ID: <201312061012.05535.heiko@sntech.de> (raw)
In-Reply-To: <000d01cef252$4680cf90$d3826eb0$%han@samsung.com>

Hi,

Am Freitag, 6. Dezember 2013, 08:10:42 schrieb Jingoo Han:

> @@ -351,8 +352,6 @@ static int gpio_regulator_remove(struct platform_device
> *pdev) {
>  	struct gpio_regulator_data *drvdata = platform_get_drvdata(pdev);
> 
> -	regulator_unregister(drvdata->dev);
> -
>  	gpio_free_array(drvdata->gpios, drvdata->nr_gpios);
> 
>  	kfree(drvdata->states);

I'm not this firm in the core driver/device behaviour, but when looking at 
__device_release_driver I see that the remove callback runs before 
devres_release_all, which would effectively free the gpios before the 
regulator gets unregistered - is this racy with a regulator change at the same 
time?


Heiko

  reply	other threads:[~2013-12-06  9:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06  7:07 [PATCH 1/6] regulator: ab8500: use devm_regulator_register() Jingoo Han
2013-12-06  7:08 ` [PATCH 2/6] regulator: db8500-prcmu: " Jingoo Han
2013-12-06  8:35   ` Bengt Jönsson
2013-12-09 17:41   ` Mark Brown
2013-12-06  7:09 ` [PATCH 3/6] regulator: fixed: " Jingoo Han
2013-12-09 17:44   ` Mark Brown
2013-12-10  6:08     ` Jingoo Han
2013-12-06  7:10 ` [PATCH 4/6] regulator: gpio-regulator: " Jingoo Han
2013-12-06  9:12   ` Heiko Stübner [this message]
2013-12-06 12:09     ` Mark Brown
2013-12-09  2:01       ` Jingoo Han
2013-12-06  7:11 ` [PATCH 5/6] regulator: pfuze100: " Jingoo Han
2013-12-09  2:36   ` yibin.gong
2013-12-09 17:42   ` Mark Brown
2013-12-06  7:12 ` [PATCH 6/6] regulator: stw481x-vmmc: " Jingoo Han
2013-12-09  8:33   ` Linus Walleij
2013-12-09 17:26   ` Mark Brown
2013-12-06  8:26 ` [PATCH 1/6] regulator: ab8500: " Lee Jones
2013-12-09 17:38 ` Mark Brown

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=201312061012.05535.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=axel.lin@ingics.com \
    --cc=broonie@kernel.org \
    --cc=jg1.han@samsung.com \
    --cc=lgirdwood@gmail.com \
    --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