summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/as3711-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-06 14:47:41 +0800
committerMark Brown <broonie@linaro.org>2014-02-11 12:26:24 +0000
commitf7e9e52f7d29dd24c8d3fd3c5939218197972e4f (patch)
treea7751da55c775eba5eb49830c960e60790159db2 /drivers/regulator/as3711-regulator.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadtalos-op-linux-f7e9e52f7d29dd24c8d3fd3c5939218197972e4f.tar.gz
talos-op-linux-f7e9e52f7d29dd24c8d3fd3c5939218197972e4f.zip
regulator: as3711: Allow missing init_data for diagnostics
The regulator core supports this to allow the configuration to be inspected at runtime even if no software management is enabled. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/as3711-regulator.c')
-rw-r--r--drivers/regulator/as3711-regulator.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c
index c77a58478cca..67fd548dcdba 100644
--- a/drivers/regulator/as3711-regulator.c
+++ b/drivers/regulator/as3711-regulator.c
@@ -221,7 +221,6 @@ static int as3711_regulator_probe(struct platform_device *pdev)
{
struct as3711_regulator_pdata *pdata = dev_get_platdata(&pdev->dev);
struct as3711 *as3711 = dev_get_drvdata(pdev->dev.parent);
- struct regulator_init_data *reg_data;
struct regulator_config config = {.dev = &pdev->dev,};
struct as3711_regulator *reg = NULL;
struct as3711_regulator *regs;
@@ -252,16 +251,10 @@ static int as3711_regulator_probe(struct platform_device *pdev)
}
for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) {
- reg_data = pdata->init_data[id];
-
- /* No need to register if there is no regulator data */
- if (!reg_data)
- continue;
-
reg = &regs[id];
reg->reg_info = ri;
- config.init_data = reg_data;
+ config.init_data = pdata->init_data[id];
config.driver_data = reg;
config.regmap = as3711->regmap;
config.of_node = of_node[id];
OpenPOWER on IntegriCloud