public inbox for linux-kernel@vger.kernel.org
 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

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