[PATCH 05/11] mfd: syscon: do not include regmap.h from mfd/syscon.h
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Oct 20 00:18:47 PDT 2023
mfd/syscon.h include regmap.h when a struct regmap forward declaration
would've sufficed. Let's forward declare and fix users of the header to
directly include linux/regmap.h where needed.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/mfd/syscon.c | 1 +
drivers/net/designware_starfive.c | 1 +
drivers/net/designware_stm32.c | 1 +
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 1 +
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 1 +
drivers/pinctrl/pinctrl-rockchip.c | 1 +
drivers/power/reset/syscon-poweroff.c | 1 +
drivers/power/reset/syscon-reboot.c | 1 +
drivers/serial/serial_clps711x.c | 1 +
drivers/watchdog/stpmic1_wdt.c | 1 +
include/mfd/syscon.h | 2 +-
11 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 16d78de2afed..3e12123b572e 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -16,6 +16,7 @@
#include <of_address.h>
#include <linux/err.h>
#include <linux/clk.h>
+#include <linux/regmap.h>
#include <mfd/syscon.h>
diff --git a/drivers/net/designware_starfive.c b/drivers/net/designware_starfive.c
index 9ab0de8be54f..aff2cc10e19c 100644
--- a/drivers/net/designware_starfive.c
+++ b/drivers/net/designware_starfive.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <init.h>
#include <linux/reset.h>
+#include <linux/regmap.h>
#include <linux/clk.h>
#include <mfd/syscon.h>
#include <soc/starfive/sysmain.h>
diff --git a/drivers/net/designware_stm32.c b/drivers/net/designware_stm32.c
index ffcd4a5b7618..54dabcc8d32a 100644
--- a/drivers/net/designware_stm32.c
+++ b/drivers/net/designware_stm32.c
@@ -11,6 +11,7 @@
#include <net.h>
#include <linux/clk.h>
#include <mfd/syscon.h>
+#include <linux/regmap.h>
#include "designware_eqos.h"
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index fe9f4fd32578..7349a92d567c 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -15,6 +15,7 @@
#include <linux/phy/phy.h>
#include <linux/clk.h>
#include <linux/err.h>
+#include <linux/regmap.h>
#include <mfd/syscon.h>
#include <regulator.h>
diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
index 5fbbe1a4e4b5..9676d8fe9998 100644
--- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c
@@ -17,6 +17,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/reset.h>
+#include <linux/regmap.h>
#include <mfd/syscon.h>
#include <linux/iopoll.h>
#include <dt-bindings/phy/phy.h>
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 917af927b609..c1e937ea2cb1 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -16,6 +16,7 @@
#include <init.h>
#include <malloc.h>
#include <mfd/syscon.h>
+#include <linux/regmap.h>
#include <of.h>
#include <of_address.h>
#include <pinctrl.h>
diff --git a/drivers/power/reset/syscon-poweroff.c b/drivers/power/reset/syscon-poweroff.c
index cdcc13268426..321bd1fc7be0 100644
--- a/drivers/power/reset/syscon-poweroff.c
+++ b/drivers/power/reset/syscon-poweroff.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <init.h>
#include <poweroff.h>
+#include <linux/regmap.h>
#include <mfd/syscon.h>
static struct regmap *map;
diff --git a/drivers/power/reset/syscon-reboot.c b/drivers/power/reset/syscon-reboot.c
index 90b125c33519..61bea6169cb6 100644
--- a/drivers/power/reset/syscon-reboot.c
+++ b/drivers/power/reset/syscon-reboot.c
@@ -9,6 +9,7 @@
#include <init.h>
#include <restart.h>
#include <mfd/syscon.h>
+#include <linux/regmap.h>
struct syscon_reboot_context {
struct regmap *map;
diff --git a/drivers/serial/serial_clps711x.c b/drivers/serial/serial_clps711x.c
index 950d22c26cb1..2a284909bfa6 100644
--- a/drivers/serial/serial_clps711x.c
+++ b/drivers/serial/serial_clps711x.c
@@ -8,6 +8,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <mfd/syscon.h>
+#include <linux/regmap.h>
#define UARTDR 0x00
# define UARTDR_FRMERR (1 << 8)
diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c
index 4bde4f4e203e..4a0519690aed 100644
--- a/drivers/watchdog/stpmic1_wdt.c
+++ b/drivers/watchdog/stpmic1_wdt.c
@@ -11,6 +11,7 @@
#include <linux/iopoll.h>
#include <poweroff.h>
#include <mfd/syscon.h>
+#include <linux/regmap.h>
#include <restart.h>
#include <reset_source.h>
diff --git a/include/mfd/syscon.h b/include/mfd/syscon.h
index 3ccfd7fb5b8a..f22d4e620b05 100644
--- a/include/mfd/syscon.h
+++ b/include/mfd/syscon.h
@@ -14,7 +14,7 @@
#ifndef __MFD_SYSCON_H__
#define __MFD_SYSCON_H__
-#include <regmap.h>
+struct regmap;
#ifdef CONFIG_MFD_SYSCON
void __iomem *syscon_base_lookup_by_phandle
--
2.39.2
More information about the barebox
mailing list