diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-02-06 01:49:11 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-11 07:27:45 -0500 |
commit | 3f24bf70a4974122841eb13e3a0621680bd19501 (patch) | |
tree | 77ab35b85307c4366deedf66273158f527958c66 | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
regulator: rc5t583: 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>
-rw-r--r-- | drivers/regulator/rc5t583-regulator.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator/rc5t583-regulator.c index b58affb33143..22d6fd1281b1 100644 --- a/drivers/regulator/rc5t583-regulator.c +++ b/drivers/regulator/rc5t583-regulator.c | |||
@@ -119,7 +119,6 @@ static int rc5t583_regulator_probe(struct platform_device *pdev) | |||
119 | { | 119 | { |
120 | struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent); | 120 | struct rc5t583 *rc5t583 = dev_get_drvdata(pdev->dev.parent); |
121 | struct rc5t583_platform_data *pdata = dev_get_platdata(rc5t583->dev); | 121 | struct rc5t583_platform_data *pdata = dev_get_platdata(rc5t583->dev); |
122 | struct regulator_init_data *reg_data; | ||
123 | struct regulator_config config = { }; | 122 | struct regulator_config config = { }; |
124 | struct rc5t583_regulator *reg = NULL; | 123 | struct rc5t583_regulator *reg = NULL; |
125 | struct rc5t583_regulator *regs; | 124 | struct rc5t583_regulator *regs; |
@@ -142,12 +141,6 @@ static int rc5t583_regulator_probe(struct platform_device *pdev) | |||
142 | 141 | ||
143 | 142 | ||
144 | for (id = 0; id < RC5T583_REGULATOR_MAX; ++id) { | 143 | for (id = 0; id < RC5T583_REGULATOR_MAX; ++id) { |
145 | reg_data = pdata->reg_init_data[id]; | ||
146 | |||
147 | /* No need to register if there is no regulator data */ | ||
148 | if (!reg_data) | ||
149 | continue; | ||
150 | |||
151 | reg = ®s[id]; | 144 | reg = ®s[id]; |
152 | ri = &rc5t583_reg_info[id]; | 145 | ri = &rc5t583_reg_info[id]; |
153 | reg->reg_info = ri; | 146 | reg->reg_info = ri; |
@@ -169,7 +162,7 @@ static int rc5t583_regulator_probe(struct platform_device *pdev) | |||
169 | 162 | ||
170 | skip_ext_pwr_config: | 163 | skip_ext_pwr_config: |
171 | config.dev = &pdev->dev; | 164 | config.dev = &pdev->dev; |
172 | config.init_data = reg_data; | 165 | config.init_data = pdata->reg_init_data[id]; |
173 | config.driver_data = reg; | 166 | config.driver_data = reg; |
174 | config.regmap = rc5t583->regmap; | 167 | config.regmap = rc5t583->regmap; |
175 | 168 | ||