From: Marek Vasut <marek.vasut@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regulator: isl6271a: Allow missing init_data for diagnostics
Date: Wed, 4 Apr 2012 09:41:25 +0200 [thread overview]
Message-ID: <201204040941.26056.marek.vasut@gmail.com> (raw)
In-Reply-To: <1333492036-15990-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Dear Mark Brown,
> The regulator core supports this to allow the configuration to be inspected
> at runtime even if no software mangement is enabled.
Acked-by: Marek Vasut <marek.vasut@gmail.com>
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> drivers/regulator/isl6271a-regulator.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/regulator/isl6271a-regulator.c
> b/drivers/regulator/isl6271a-regulator.c index 775f5fd..a0430aa 100644
> --- a/drivers/regulator/isl6271a-regulator.c
> +++ b/drivers/regulator/isl6271a-regulator.c
> @@ -140,6 +140,7 @@ static struct regulator_desc isl_rd[] = {
> static int __devinit isl6271a_probe(struct i2c_client *i2c,
> const struct i2c_device_id *id)
> {
> + struct regulator_config config = { };
> struct regulator_init_data *init_data = i2c->dev.platform_data;
> struct isl_pmic *pmic;
> int err, i;
> @@ -147,11 +148,6 @@ static int __devinit isl6271a_probe(struct i2c_client
> *i2c, if (!i2c_check_functionality(i2c->adapter,
> I2C_FUNC_SMBUS_BYTE_DATA)) return -EIO;
>
> - if (!init_data) {
> - dev_err(&i2c->dev, "no platform data supplied\n");
> - return -EIO;
> - }
> -
> pmic = kzalloc(sizeof(struct isl_pmic), GFP_KERNEL);
> if (!pmic)
> return -ENOMEM;
Best regards,
Marek Vasut
prev parent reply other threads:[~2012-04-04 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 22:27 [PATCH] regulator: isl6271a: Allow missing init_data for diagnostics Mark Brown
2012-04-03 22:29 ` Mark Brown
2012-04-04 7:41 ` Marek Vasut [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=201204040941.26056.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@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;
as well as URLs for NNTP newsgroup(s).