* [PATCH] regulator: isl6271a: Allow missing init_data for diagnostics
@ 2012-04-03 22:27 Mark Brown
2012-04-03 22:29 ` Mark Brown
2012-04-04 7:41 ` Marek Vasut
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2012-04-03 22:27 UTC (permalink / raw)
To: Marek Vasut, Liam Girdwood; +Cc: linux-kernel, Mark Brown
The regulator core supports this to allow the configuration to be inspected
at runtime even if no software mangement is enabled.
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;
--
1.7.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: isl6271a: Allow missing init_data for diagnostics
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
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-04-03 22:29 UTC (permalink / raw)
To: Marek Vasut, Liam Girdwood; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 314 bytes --]
On Tue, Apr 03, 2012 at 11:27:16PM +0100, Mark Brown wrote:
> {
> + struct regulator_config config = { };
> struct regulator_init_data *init_data = i2c->dev.platform_data;
I've dropped this hunk from the commit locally, it'll reappear later in
another patch (this is why I'm looking at all these drivers...).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: isl6271a: Allow missing init_data for diagnostics
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
1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2012-04-04 7:41 UTC (permalink / raw)
To: Mark Brown; +Cc: Liam Girdwood, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-04 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).