regulator: as3711: Fix checking if no platform initialization data
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.
Signed-off-by Axel Lin <[email protected]>
--- drivers/regulator/as3711-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/as3711-regulator.c +1 -1
@@ -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 = ®s[id];
Signature · 1 line
1.7.9.5
Quoted 4 lines · Axel Lin
To skip registering regulator if no platform initialization data, we should check
reg_datarather thanri->desc.name.Signed-off-by Axel Lin <[email protected]>
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@@ -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 = ®s[id];Signature · 1 line
1.7.9.5
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Mark Brown
AppliedQuoted 2 lines · Axel Lin
To skip registering regulator if no platform initialization data, we should check
reg_datarather thanri->desc.name.
Applied, thanks.