Skip to contentSkip to conversation

regulator: as3711: Fix checking if no platform initialization data

PATCH Applied Axel Lin 3 participants 3 messages Feb 13, 2013 Voltage and current regulator framework

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 regulator: as3711: Fix checking if no platform initialization data

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

---
 drivers/regulator/as3711-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/as3711-regulator.c +1 -1
index 2f1341d..f0ba8c4 100644
@@ -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];
Signature · 1 line
1.7.9.5
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Axel Lin

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

Thanks
Guennadi

Quoted 22 lines
---
 drivers/regulator/as3711-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/as3711-regulator.c +1 -1
index 2f1341d..f0ba8c4 100644
@@ -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];
Signature · 1 line
1.7.9.5

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

Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

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

Applied, thanks.