diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-02-12 20:34:48 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-02-13 07:56:51 -0500 |
commit | 09ca50d2ade7ed6b3b2653b771774cf360c3d56c (patch) | |
tree | e0a6b7ad1f118765934edd72173db74aa2304b84 | |
parent | 836dc9e3fbbab0c30aa6e664417225f5c1fb1c39 (diff) |
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 <axel.lin@ingics.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/as3711-regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index 2f1341db38a0..f0ba8c4eefa9 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) | |||
303 | reg_data = pdata ? pdata->init_data[id] : NULL; | 303 | reg_data = pdata ? pdata->init_data[id] : NULL; |
304 | 304 | ||
305 | /* No need to register if there is no regulator data */ | 305 | /* No need to register if there is no regulator data */ |
306 | if (!ri->desc.name) | 306 | if (!reg_data) |
307 | continue; | 307 | continue; |
308 | 308 | ||
309 | reg = ®s[id]; | 309 | reg = ®s[id]; |