diff options
author | Fabrice Gasnier <fabrice.gasnier@st.com> | 2018-05-18 11:24:03 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-06-04 02:14:17 -0400 |
commit | d95c9760d9c8e046b09b54a3bb6dd0c9aa7a0eff (patch) | |
tree | d250d277f3d9d23e2a01c1b714fe5440e499d392 /include/linux/mfd/stm32-timers.h | |
parent | a3b51be3cdac4844b2d8bb7c4dad95e191a05697 (diff) |
mfd: stm32-timers: Fix pwm-stm32 linker issue with COMPILE_TEST
This is seen when COMPILE_TEST=y and MFD_STM32_TIMERS=n.
drivers/pwm/pwm-stm32.o: In function 'stm32_pwm_raw_capture':
pwm-stm32.c:... undefined reference to 'stm32_timers_dma_burst_read'
Fixes: 0c6609805b63 ("mfd: stm32-timers: Add support for DMAs")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/stm32-timers.h')
-rw-r--r-- | include/linux/mfd/stm32-timers.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h index 9da1d7ece079..067d14655c28 100644 --- a/include/linux/mfd/stm32-timers.h +++ b/include/linux/mfd/stm32-timers.h | |||
@@ -124,8 +124,20 @@ struct stm32_timers { | |||
124 | struct stm32_timers_dma dma; /* Only to be used by the parent */ | 124 | struct stm32_timers_dma dma; /* Only to be used by the parent */ |
125 | }; | 125 | }; |
126 | 126 | ||
127 | #if IS_REACHABLE(CONFIG_MFD_STM32_TIMERS) | ||
127 | int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, | 128 | int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, |
128 | enum stm32_timers_dmas id, u32 reg, | 129 | enum stm32_timers_dmas id, u32 reg, |
129 | unsigned int num_reg, unsigned int bursts, | 130 | unsigned int num_reg, unsigned int bursts, |
130 | unsigned long tmo_ms); | 131 | unsigned long tmo_ms); |
132 | #else | ||
133 | static inline int stm32_timers_dma_burst_read(struct device *dev, u32 *buf, | ||
134 | enum stm32_timers_dmas id, | ||
135 | u32 reg, | ||
136 | unsigned int num_reg, | ||
137 | unsigned int bursts, | ||
138 | unsigned long tmo_ms) | ||
139 | { | ||
140 | return -ENODEV; | ||
141 | } | ||
142 | #endif | ||
131 | #endif | 143 | #endif |