lkml.org 
[lkml]   [2017]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFT 3/4] regulator: max14577: Remove support for platform data
Date
max14577 family of drivers are used only on Exynos-based ARMv7 boards
which all were converted to DeviceTree long time ago. Remove the
support for platform data to simplify the driver.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/regulator/max14577-regulator.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/regulator/max14577-regulator.c b/drivers/regulator/max14577-regulator.c
index 0db288ce319c..fa9b4b3a2878 100644
--- a/drivers/regulator/max14577-regulator.c
+++ b/drivers/regulator/max14577-regulator.c
@@ -245,7 +245,6 @@ static struct regmap *max14577_get_regmap(struct max14577 *max14577,
static int max14577_regulator_probe(struct platform_device *pdev)
{
struct max14577 *max14577 = dev_get_drvdata(pdev->dev.parent);
- struct max14577_platform_data *pdata = dev_get_platdata(max14577->dev);
int i, ret = 0;
struct regulator_config config = {};
const struct regulator_desc *supported_regulators;
@@ -268,17 +267,9 @@ static int max14577_regulator_probe(struct platform_device *pdev)

for (i = 0; i < supported_regulators_size; i++) {
struct regulator_dev *regulator;
- /*
- * Index of supported_regulators[] is also the id and must
- * match index of pdata->regulators[].
- */
- if (pdata && pdata->regulators) {
- config.init_data = pdata->regulators[i].initdata;
- config.of_node = pdata->regulators[i].of_node;
- } else {
- config.init_data = match_init_data(i, dev_type);
- config.of_node = match_of_node(i, dev_type);
- }
+
+ config.init_data = match_init_data(i, dev_type);
+ config.of_node = match_of_node(i, dev_type);
config.regmap = max14577_get_regmap(max14577,
supported_regulators[i].id);

--
2.9.3
\
 
 \ /
  Last update: 2017-02-17 21:03    [W:0.085 / U:1.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site