mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-05 03:44:03 +08:00
pwm: stm32: Fix build warning with CONFIG_DMA_ENGINE disabled
Without dmaengine support, we get a harmless warning about an unused
function:
drivers/pwm/pwm-stm32.c:166:12: error: 'stm32_pwm_capture' defined but not used [-Werror=unused-function]
Changing the #ifdef to an IS_ENABLED() check shuts up that warning and
is slightly nicer to read.
Fixes: 53e38fe73f
("pwm: stm32: Add capture support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:
parent
91348b1453
commit
414c52b789
@ -484,9 +484,7 @@ static int stm32_pwm_apply_locked(struct pwm_chip *chip, struct pwm_device *pwm,
|
|||||||
static const struct pwm_ops stm32pwm_ops = {
|
static const struct pwm_ops stm32pwm_ops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.apply = stm32_pwm_apply_locked,
|
.apply = stm32_pwm_apply_locked,
|
||||||
#if IS_ENABLED(CONFIG_DMA_ENGINE)
|
.capture = IS_ENABLED(CONFIG_DMA_ENGINE) ? stm32_pwm_capture : NULL,
|
||||||
.capture = stm32_pwm_capture,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int stm32_pwm_set_breakinput(struct stm32_pwm *priv,
|
static int stm32_pwm_set_breakinput(struct stm32_pwm *priv,
|
||||||
|
Loading…
Reference in New Issue
Block a user