diff options
| -rw-r--r-- | drivers/regulator/as3711-regulator.c | 9 |
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) | |||
| 221 | { | 221 | { |
| 222 | struct as3711_regulator_pdata *pdata = dev_get_platdata(&pdev->dev); | 222 | struct as3711_regulator_pdata *pdata = dev_get_platdata(&pdev->dev); |
| 223 | struct as3711 *as3711 = dev_get_drvdata(pdev->dev.parent); | 223 | struct as3711 *as3711 = dev_get_drvdata(pdev->dev.parent); |
| 224 | struct regulator_init_data *reg_data; | ||
| 225 | struct regulator_config config = {.dev = &pdev->dev,}; | 224 | struct regulator_config config = {.dev = &pdev->dev,}; |
| 226 | struct as3711_regulator *reg = NULL; | 225 | struct as3711_regulator *reg = NULL; |
| 227 | struct as3711_regulator *regs; | 226 | struct as3711_regulator *regs; |
| @@ -252,16 +251,10 @@ static int as3711_regulator_probe(struct platform_device *pdev) | |||
| 252 | } | 251 | } |
| 253 | 252 | ||
| 254 | for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) { | 253 | for (id = 0, ri = as3711_reg_info; id < AS3711_REGULATOR_NUM; ++id, ri++) { |
| 255 | reg_data = pdata->init_data[id]; | ||
| 256 | |||
| 257 | /* No need to register if there is no regulator data */ | ||
| 258 | if (!reg_data) | ||
| 259 | continue; | ||
| 260 | |||
| 261 | reg = ®s[id]; | 254 | reg = ®s[id]; |
| 262 | reg->reg_info = ri; | 255 | reg->reg_info = ri; |
| 263 | 256 | ||
| 264 | config.init_data = reg_data; | 257 | config.init_data = pdata->init_data[id]; |
| 265 | config.driver_data = reg; | 258 | config.driver_data = reg; |
| 266 | config.regmap = as3711->regmap; | 259 | config.regmap = as3711->regmap; |
| 267 | config.of_node = of_node[id]; | 260 | config.of_node = of_node[id]; |
