linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: as3711: Fix checking if no platform initialization data
@ 2013-02-13  1:34 Axel Lin
  2013-02-13  9:49 ` Guennadi Liakhovetski
  2013-02-13 12:56 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-02-13  1:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: Guennadi Liakhovetski, Liam Girdwood, linux-kernel

To skip registering regulator if no platform initialization data,
we should check reg_data rather than ri->desc.name.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/regulator/as3711-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index 2f1341d..f0ba8c4 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -303,7 +303,7 @@ static int as3711_regulator_probe(struct platform_device *pdev)
 		reg_data = pdata ? pdata->init_data[id] : NULL;
 
 		/* No need to register if there is no regulator data */
-		if (!ri->desc.name)
+		if (!reg_data)
 			continue;
 
 		reg = &regs[id];
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: as3711: Fix checking if no platform initialization data
  2013-02-13  1:34 [PATCH] regulator: as3711: Fix checking if no platform initialization data Axel Lin
@ 2013-02-13  9:49 ` Guennadi Liakhovetski
  2013-02-13 12:56 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Guennadi Liakhovetski @ 2013-02-13  9:49 UTC (permalink / raw)
  To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel

On Wed, 13 Feb 2013, Axel Lin wrote:

> To skip registering regulator if no platform initialization data,
> we should check reg_data rather than ri->desc.name.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Thanks
Guennadi

> ---
>  drivers/regulator/as3711-regulator.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
> index 2f1341d..f0ba8c4 100644
> --- a/drivers/regulator/as3711-regulator.c
> +++ b/drivers/regulator/as3711-regulator.c
> @@ -303,7 +303,7 @@ static int as3711_regulator_probe(struct platform_device *pdev)
>  		reg_data = pdata ? pdata->init_data[id] : NULL;
>  
>  		/* No need to register if there is no regulator data */
> -		if (!ri->desc.name)
> +		if (!reg_data)
>  			continue;
>  
>  		reg = &regs[id];
> -- 
> 1.7.9.5
> 
> 
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: as3711: Fix checking if no platform initialization data
  2013-02-13  1:34 [PATCH] regulator: as3711: Fix checking if no platform initialization data Axel Lin
  2013-02-13  9:49 ` Guennadi Liakhovetski
@ 2013-02-13 12:56 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-02-13 12:56 UTC (permalink / raw)
  To: Axel Lin; +Cc: Guennadi Liakhovetski, Liam Girdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 198 bytes --]

On Wed, Feb 13, 2013 at 09:34:48AM +0800, Axel Lin wrote:
> To skip registering regulator if no platform initialization data,
> we should check reg_data rather than ri->desc.name.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-13 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13  1:34 [PATCH] regulator: as3711: Fix checking if no platform initialization data Axel Lin
2013-02-13  9:49 ` Guennadi Liakhovetski
2013-02-13 12:56 ` Mark Brown

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).