From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Liam Girdwood <lrg@slimlogic.co.uk>,
Anuj Aggarwal <anuj.aggarwal@ti.com>
Subject: Re: [PATCH] regulator: tps6507x - add missing platform_set_drvdata in tps6507x_pmic_probe
Date: Mon, 9 Aug 2010 08:35:08 +0100 [thread overview]
Message-ID: <CA50E81F-C114-4734-9EF4-88CFD1487DB6@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1281324445.12901.1.camel@mola> (sfid-20100809_042548_456204_B2C4C107)
On 9 Aug 2010, at 04:27, Axel Lin <axel.lin@gmail.com> wrote:
> We should call platform_set_drvdata() before calling platform_get_drvdata().
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
> drivers/regulator/tps6507x-regulator.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
> index 8152d65..fbe21f7 100644
> --- a/drivers/regulator/tps6507x-regulator.c
> +++ b/drivers/regulator/tps6507x-regulator.c
> @@ -614,6 +614,7 @@ int tps6507x_pmic_probe(struct platform_device *pdev)
> }
>
> tps6507x_dev->pmic = tps;
> + platform_set_drvdata(pdev, tps6507x_dev);
>
> return 0;
>
> @@ -640,6 +641,7 @@ static int __devexit tps6507x_pmic_remove(struct platform_device *pdev)
> for (i = 0; i < TPS6507X_NUM_REGULATOR; i++)
> regulator_unregister(tps->rdev[i]);
>
> + platform_set_drvdata(pdev, NULL);
> kfree(tps);
This is not needed - we're unbinding the driver so should no longer be looking at the driver data.
>
> return 0;
> --
> 1.5.4.3
>
>
>
prev parent reply other threads:[~2010-08-09 7:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 3:27 Axel Lin
2010-08-09 7:35 ` Mark Brown [this message]
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=CA50E81F-C114-4734-9EF4-88CFD1487DB6@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=anuj.aggarwal@ti.com \
--cc=axel.lin@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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®