[PATCH 10/11] mfd: stm32-timers: remove dependency of mfd/stm32-timers.h on regmap.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Drivers for the STM32 timer MFD and the PWM within it used regmap API
without directly including the regmap.h header. Fix that and replace
the regmap.h inclusion in mfd/stm32-timers.h with a forward declaration.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/mfd/stm32-timers.c       | 1 +
 drivers/pwm/pwm-stm32.c          | 1 +
 include/linux/mfd/stm32-timers.h | 3 ++-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
index a7e9f53dbfbd..3b478001051b 100644
--- a/drivers/mfd/stm32-timers.c
+++ b/drivers/mfd/stm32-timers.c
@@ -11,6 +11,7 @@
 #include <io.h>
 #include <linux/bitfield.h>
 #include <linux/mfd/stm32-timers.h>
+#include <linux/regmap.h>
 #include <of.h>
 #include <linux/reset.h>
 
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index e73e9965576a..5c2029ab6ad6 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -14,6 +14,7 @@
 #include <io.h>
 #include <linux/bitfield.h>
 #include <linux/mfd/stm32-timers.h>
+#include <linux/regmap.h>
 #include <linux/math64.h>
 #include <of.h>
 #include <pwm.h>
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h
index 28fad44598f9..35aa0681baeb 100644
--- a/include/linux/mfd/stm32-timers.h
+++ b/include/linux/mfd/stm32-timers.h
@@ -8,7 +8,6 @@
 #define _LINUX_STM32_GPTIMER_H_
 
 #include <clock.h>
-#include <regmap.h>
 
 #define TIM_CR1		0x00	/* Control Register 1      */
 #define TIM_CR2		0x04	/* Control Register 2      */
@@ -88,6 +87,8 @@
 #define TIM_BDTR_BKF_SHIFT	16
 #define TIM_BDTR_BK2F_SHIFT	20
 
+struct regmap;
+
 struct stm32_timers {
 	struct clk *clk;
 	struct regmap *regmap;
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux