[PATCH 14/31] power: Tidy up inclusion of regulator_common.h

Simon Glass sjg at chromium.org
Sun Jul 19 18:15:44 CEST 2020


This file should not include common.h and dm.h so remove them. Also move
the inclusion of this file to after the normal includes.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/power/regulator/fixed.c            | 3 ++-
 drivers/power/regulator/gpio-regulator.c   | 3 ++-
 drivers/power/regulator/regulator_common.c | 4 +++-
 drivers/power/regulator/regulator_common.h | 2 --
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index b5f7aec353..2fa6c7e6b2 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -5,7 +5,6 @@
  *  Przemyslaw Marczak <p.marczak at samsung.com>
  */
 
-#include "regulator_common.h"
 #include <common.h>
 #include <errno.h>
 #include <dm.h>
@@ -13,6 +12,8 @@
 #include <power/pmic.h>
 #include <power/regulator.h>
 
+#include "regulator_common.h"
+
 static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
 {
 	struct dm_regulator_uclass_platdata *uc_pdata;
diff --git a/drivers/power/regulator/gpio-regulator.c b/drivers/power/regulator/gpio-regulator.c
index cf3fbae79d..947f812d09 100644
--- a/drivers/power/regulator/gpio-regulator.c
+++ b/drivers/power/regulator/gpio-regulator.c
@@ -4,7 +4,6 @@
  * Keerthy <j-keerthy at ti.com>
  */
 
-#include "regulator_common.h"
 #include <common.h>
 #include <fdtdec.h>
 #include <errno.h>
@@ -15,6 +14,8 @@
 #include <power/pmic.h>
 #include <power/regulator.h>
 
+#include "regulator_common.h"
+
 #define GPIO_REGULATOR_MAX_STATES	2
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/drivers/power/regulator/regulator_common.c b/drivers/power/regulator/regulator_common.c
index 4cfcc31298..13906b9c6e 100644
--- a/drivers/power/regulator/regulator_common.c
+++ b/drivers/power/regulator/regulator_common.c
@@ -4,12 +4,14 @@
  * Sven Schwermer <sven.svenschwermer at disruptive-technologies.com>
  */
 
-#include "regulator_common.h"
 #include <common.h>
+#include <dm.h>
 #include <log.h>
 #include <linux/delay.h>
 #include <power/regulator.h>
 
+#include "regulator_common.h"
+
 int regulator_common_ofdata_to_platdata(struct udevice *dev,
 	struct regulator_common_platdata *dev_pdata, const char *enable_gpio_name)
 {
diff --git a/drivers/power/regulator/regulator_common.h b/drivers/power/regulator/regulator_common.h
index 18a525880a..bf80439c78 100644
--- a/drivers/power/regulator/regulator_common.h
+++ b/drivers/power/regulator/regulator_common.h
@@ -7,9 +7,7 @@
 #ifndef _REGULATOR_COMMON_H
 #define _REGULATOR_COMMON_H
 
-#include <common.h>
 #include <asm/gpio.h>
-#include <dm.h>
 
 struct regulator_common_platdata {
 	struct gpio_desc gpio; /* GPIO for regulator enable control */
-- 
2.28.0.rc0.105.gf9edc3c819-goog



More information about the U-Boot mailing list