From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Lee Jones <lee.jones@linaro.org>,
Bengt Jonsson <bengt.g.jonsson@stericsson.com>,
Linus Walleij <linus.walleij@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe()
Date: Sun, 08 Jun 2014 22:45:42 +0800 [thread overview]
Message-ID: <1402238742.32652.1.camel@phoenix> (raw)
Now this is a DT-only driver because non-devicetree probe path is removed,
so merge ab8500_regulator_of_probe() into ab8500_regulator_probe().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/ab8500.c | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index c625468..88da8626 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -3037,28 +3037,12 @@ static int ab8500_regulator_register(struct platform_device *pdev,
return 0;
}
-static int
-ab8500_regulator_of_probe(struct platform_device *pdev,
- struct device_node *np)
-{
- struct of_regulator_match *match = abx500_regulator.match;
- int err, i;
-
- for (i = 0; i < abx500_regulator.info_size; i++) {
- err = ab8500_regulator_register(
- pdev, match[i].init_data, i, match[i].of_node);
- if (err)
- return err;
- }
-
- return 0;
-}
-
static int ab8500_regulator_probe(struct platform_device *pdev)
{
struct ab8500 *ab8500 = dev_get_drvdata(pdev->dev.parent);
struct device_node *np = pdev->dev.of_node;
- int err;
+ struct of_regulator_match *match;
+ int err, i;
if (!ab8500) {
dev_err(&pdev->dev, "null mfd parent\n");
@@ -3075,7 +3059,16 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
"Error parsing regulator init data: %d\n", err);
return err;
}
- return ab8500_regulator_of_probe(pdev, np);
+
+ match = abx500_regulator.match;
+ for (i = 0; i < abx500_regulator.info_size; i++) {
+ err = ab8500_regulator_register(pdev, match[i].init_data, i,
+ match[i].of_node);
+ if (err)
+ return err;
+ }
+
+ return 0;
}
static int ab8500_regulator_remove(struct platform_device *pdev)
--
1.8.3.2
next reply other threads:[~2014-06-08 14:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-08 14:45 Axel Lin [this message]
2014-06-08 14:47 ` [PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit() Axel Lin
2014-06-11 8:56 ` Linus Walleij
2014-06-11 8:55 ` [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe() Linus Walleij
2014-06-22 10:52 ` Mark Brown
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=1402238742.32652.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=bengt.g.jonsson@stericsson.com \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--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