提交 948838a1 编写于 作者: A Axel Lin 提交者: Mark Brown

regulator: tps65218: Add OF dependency

This is a DT-only driver, so make it depend on OF and remove of_match_ptr in
the code.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NKeerthy <j-keerthy@ti.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 413be59e
...@@ -515,7 +515,7 @@ config REGULATOR_TPS65217 ...@@ -515,7 +515,7 @@ config REGULATOR_TPS65217
config REGULATOR_TPS65218 config REGULATOR_TPS65218
tristate "TI TPS65218 Power regulators" tristate "TI TPS65218 Power regulators"
depends on MFD_TPS65218 depends on MFD_TPS65218 && OF
help help
This driver supports TPS65218 voltage regulator chips. TPS65218 This driver supports TPS65218 voltage regulator chips. TPS65218
provides six step-down converters and one general-purpose LDO provides six step-down converters and one general-purpose LDO
......
...@@ -243,14 +243,12 @@ static int tps65218_regulator_probe(struct platform_device *pdev) ...@@ -243,14 +243,12 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
int id; int id;
match = of_match_device(tps65218_of_match, &pdev->dev); match = of_match_device(tps65218_of_match, &pdev->dev);
if (match) { if (!match)
return -ENODEV;
template = match->data; template = match->data;
id = template->id; id = template->id;
init_data = of_get_regulator_init_data(&pdev->dev, init_data = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node);
pdev->dev.of_node);
} else {
return -ENODEV;
}
platform_set_drvdata(pdev, tps); platform_set_drvdata(pdev, tps);
...@@ -274,7 +272,7 @@ static struct platform_driver tps65218_regulator_driver = { ...@@ -274,7 +272,7 @@ static struct platform_driver tps65218_regulator_driver = {
.driver = { .driver = {
.name = "tps65218-pmic", .name = "tps65218-pmic",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(tps65218_of_match), .of_match_table = tps65218_of_match,
}, },
.probe = tps65218_regulator_probe, .probe = tps65218_regulator_probe,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册