Commit 81baf9fe authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@kernel.org>
parent 7d1311b9
...@@ -230,11 +230,6 @@ static int tps65217_regulator_probe(struct platform_device *pdev) ...@@ -230,11 +230,6 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
if (tps->dev->of_node) if (tps->dev->of_node)
pdata = tps65217_parse_dt(pdev); pdata = tps65217_parse_dt(pdev);
if (!pdata) {
dev_err(&pdev->dev, "Platform data not found\n");
return -EINVAL;
}
if (tps65217_chip_id(tps) != TPS65217) { if (tps65217_chip_id(tps) != TPS65217) {
dev_err(&pdev->dev, "Invalid tps chip version\n"); dev_err(&pdev->dev, "Invalid tps chip version\n");
return -ENODEV; return -ENODEV;
...@@ -245,6 +240,7 @@ static int tps65217_regulator_probe(struct platform_device *pdev) ...@@ -245,6 +240,7 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
for (i = 0; i < TPS65217_NUM_REGULATOR; i++) { for (i = 0; i < TPS65217_NUM_REGULATOR; i++) {
/* Register the regulators */ /* Register the regulators */
config.dev = tps->dev; config.dev = tps->dev;
if (pdata)
config.init_data = pdata->tps65217_init_data[i]; config.init_data = pdata->tps65217_init_data[i];
config.driver_data = tps; config.driver_data = tps;
config.regmap = tps->regmap; config.regmap = tps->regmap;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment