Skip to content

Commit

Permalink
regulator: tps65217: Remove spurious platform data check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Sep 6, 2014
1 parent 7d1311b commit 81baf9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/regulator/tps65217-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
if (tps->dev->of_node)
pdata = tps65217_parse_dt(pdev);

if (!pdata) {
dev_err(&pdev->dev, "Platform data not found\n");
return -EINVAL;
}

if (tps65217_chip_id(tps) != TPS65217) {
dev_err(&pdev->dev, "Invalid tps chip version\n");
return -ENODEV;
Expand All @@ -245,7 +240,8 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
for (i = 0; i < TPS65217_NUM_REGULATOR; i++) {
/* Register the regulators */
config.dev = tps->dev;
config.init_data = pdata->tps65217_init_data[i];
if (pdata)
config.init_data = pdata->tps65217_init_data[i];
config.driver_data = tps;
config.regmap = tps->regmap;
if (tps->dev->of_node)
Expand Down

0 comments on commit 81baf9f

Please sign in to comment.