aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-09-06 07:10:47 -0400
committerMark Brown <broonie@kernel.org>2014-09-06 07:43:40 -0400
commit81baf9fe0243a4450d738676ccf99d325460c748 (patch)
treef690047c58e00482f04bacb6c126898808cfc974
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
regulator: tps65217: Remove spurious platform data check
We should always be able to probe a regulator with no platform data. This will enable readback of current state, though no changes can be made to the device configuration. Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/regulator/tps65217-regulator.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/tps65217-regulator.c b/drivers/regulator/tps65217-regulator.c
index d58db72a63b0..1cf16aed9735 100644
--- a/drivers/regulator/tps65217-regulator.c
+++ b/drivers/regulator/tps65217-regulator.c
@@ -230,11 +230,6 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
230 if (tps->dev->of_node) 230 if (tps->dev->of_node)
231 pdata = tps65217_parse_dt(pdev); 231 pdata = tps65217_parse_dt(pdev);
232 232
233 if (!pdata) {
234 dev_err(&pdev->dev, "Platform data not found\n");
235 return -EINVAL;
236 }
237
238 if (tps65217_chip_id(tps) != TPS65217) { 233 if (tps65217_chip_id(tps) != TPS65217) {
239 dev_err(&pdev->dev, "Invalid tps chip version\n"); 234 dev_err(&pdev->dev, "Invalid tps chip version\n");
240 return -ENODEV; 235 return -ENODEV;
@@ -245,7 +240,8 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
245 for (i = 0; i < TPS65217_NUM_REGULATOR; i++) { 240 for (i = 0; i < TPS65217_NUM_REGULATOR; i++) {
246 /* Register the regulators */ 241 /* Register the regulators */
247 config.dev = tps->dev; 242 config.dev = tps->dev;
248 config.init_data = pdata->tps65217_init_data[i]; 243 if (pdata)
244 config.init_data = pdata->tps65217_init_data[i];
249 config.driver_data = tps; 245 config.driver_data = tps;
250 config.regmap = tps->regmap; 246 config.regmap = tps->regmap;
251 if (tps->dev->of_node) 247 if (tps->dev->of_node)