public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Lee Jones <lee.jones@linaro.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [RFT 3/4] regulator: max14577: Remove support for platform data
Date: Fri, 17 Feb 2017 22:01:59 +0200	[thread overview]
Message-ID: <20170217200200.4521-4-krzk@kernel.org> (raw)
In-Reply-To: <20170217200200.4521-1-krzk@kernel.org>

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

  parent reply	other threads:[~2017-02-17 20:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170217200214epcas3p4d72abd10d1ce7dbbbcd626bcf452fa37@epcas3p4.samsung.com>
2017-02-17 20:01 ` [RFT 0/4] mfd: regulator: max14577: Remove support for platform data Krzysztof Kozlowski
2017-02-17 20:01   ` [RFT 1/4] mfd: max14577: Explicitly depend on OF Krzysztof Kozlowski
2017-02-17 20:01   ` [RFT 2/4] mfd: max14577: Export OF module alias information Krzysztof Kozlowski
2017-02-17 20:01   ` Krzysztof Kozlowski [this message]
2017-02-18  0:02     ` [RFT 3/4] regulator: max14577: Remove support for platform data Mark Brown
2017-02-17 20:02   ` [RFT 4/4] mfd: max14577: Remove platform data and instantiation from I2C Krzysztof Kozlowski
2017-02-27 12:55   ` [RFT 0/4] mfd: regulator: max14577: Remove support for platform data Bartlomiej Zolnierkiewicz
2017-02-27 15:32     ` Krzysztof Kozlowski
2017-02-27 15:52       ` Bartlomiej Zolnierkiewicz
2017-02-28  9:47         ` Mark Brown
2017-02-28 11:34           ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170217200200.4521-4-krzk@kernel.org \
    --to=krzk@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=broonie@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox