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>
reg_data = pdata ? pdata->init_data[id] : NULL;
/* No need to register if there is no regulator data */
reg_data = pdata ? pdata->init_data[id] : NULL;
/* No need to register if there is no regulator data */
continue;
reg = ®s[id];
continue;
reg = ®s[id];