* [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe()
@ 2014-06-08 14:45 Axel Lin
2014-06-08 14:47 ` [PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit() Axel Lin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Axel Lin @ 2014-06-08 14:45 UTC (permalink / raw)
To: Mark Brown
Cc: Lee Jones, Bengt Jonsson, Linus Walleij, Liam Girdwood,
linux-kernel
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit()
2014-06-08 14:45 [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe() Axel Lin
@ 2014-06-08 14:47 ` 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
2 siblings, 1 reply; 5+ messages in thread
From: Axel Lin @ 2014-06-08 14:47 UTC (permalink / raw)
To: Mark Brown
Cc: Lee Jones, Bengt Jonsson, Linus Walleij, Liam Girdwood,
linux-kernel
CONFIG_REGULATOR_AB8500_DEBUG is always not defined.
ab8500_regulator_debug_init() is not called at all now,
ab8500_regulator_debug_exit() simply return 0, thus remove them.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/ab8500.c | 13 -------------
include/linux/regulator/ab8500.h | 14 --------------
2 files changed, 27 deletions(-)
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 88da8626..1fda14e 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -3071,21 +3071,8 @@ static int ab8500_regulator_probe(struct platform_device *pdev)
return 0;
}
-static int ab8500_regulator_remove(struct platform_device *pdev)
-{
- int err;
-
- /* remove regulator debug */
- err = ab8500_regulator_debug_exit(pdev);
- if (err)
- return err;
-
- return 0;
-}
-
static struct platform_driver ab8500_regulator_driver = {
.probe = ab8500_regulator_probe,
- .remove = ab8500_regulator_remove,
.driver = {
.name = "ab8500-regulator",
.owner = THIS_MODULE,
diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h
index 7530744..d8ecefa 100644
--- a/include/linux/regulator/ab8500.h
+++ b/include/linux/regulator/ab8500.h
@@ -322,18 +322,4 @@ struct ab8500_regulator_platform_data {
struct regulator_init_data *ext_regulator;
};
-#ifdef CONFIG_REGULATOR_AB8500_DEBUG
-int ab8500_regulator_debug_init(struct platform_device *pdev);
-int ab8500_regulator_debug_exit(struct platform_device *pdev);
-#else
-static inline int ab8500_regulator_debug_init(struct platform_device *pdev)
-{
- return 0;
-}
-static inline int ab8500_regulator_debug_exit(struct platform_device *pdev)
-{
- return 0;
-}
-#endif
-
#endif
--
1.8.3.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit()
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
0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2014-06-11 8:56 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, Lee Jones, Liam Girdwood,
linux-kernel@vger.kernel.org
On Sun, Jun 8, 2014 at 4:47 PM, Axel Lin <axel.lin@ingics.com> wrote:
> CONFIG_REGULATOR_AB8500_DEBUG is always not defined.
> ab8500_regulator_debug_init() is not called at all now,
> ab8500_regulator_debug_exit() simply return 0, thus remove them.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe()
2014-06-08 14:45 [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe() Axel Lin
2014-06-08 14:47 ` [PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit() Axel Lin
@ 2014-06-11 8:55 ` Linus Walleij
2014-06-22 10:52 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2014-06-11 8:55 UTC (permalink / raw)
To: Axel Lin
Cc: Mark Brown, Lee Jones, Bengt Jonsson, Liam Girdwood,
linux-kernel@vger.kernel.org
On Sun, Jun 8, 2014 at 4:45 PM, Axel Lin <axel.lin@ingics.com> wrote:
> 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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe()
2014-06-08 14:45 [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe() Axel Lin
2014-06-08 14:47 ` [PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit() Axel Lin
2014-06-11 8:55 ` [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe() Linus Walleij
@ 2014-06-22 10:52 ` Mark Brown
2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-06-22 10:52 UTC (permalink / raw)
To: Axel Lin
Cc: Lee Jones, Bengt Jonsson, Linus Walleij, Liam Girdwood,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
On Sun, Jun 08, 2014 at 10:45:42PM +0800, Axel Lin wrote:
> Now this is a DT-only driver because non-devicetree probe path is removed,
> so merge ab8500_regulator_of_probe() into ab8500_regulator_probe().
Applied both, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-22 10:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-08 14:45 [PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe() Axel Lin
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox