]> Git Repo - linux.git/blobdiff - drivers/pwm/pwm-stm32.c
mfd: cros-ec: Increase maximum mkbp event size
[linux.git] / drivers / pwm / pwm-stm32.c
index 60bfc07c49129d7e23965ec4a7518c45574c372b..4f842550fbd127ce1b0f53522dfb7f4e60b74329 100644 (file)
@@ -170,7 +170,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm,
        unsigned long long prd, div, dty;
        unsigned long rate;
        unsigned int psc = 0, icpsc, scale;
-       u32 raw_prd, raw_dty;
+       u32 raw_prd = 0, raw_dty = 0;
        int ret = 0;
 
        mutex_lock(&priv->lock);
@@ -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 = {
        .owner = THIS_MODULE,
        .apply = stm32_pwm_apply_locked,
-#if IS_ENABLED(CONFIG_DMA_ENGINE)
-       .capture = stm32_pwm_capture,
-#endif
+       .capture = IS_ENABLED(CONFIG_DMA_ENGINE) ? stm32_pwm_capture : NULL,
 };
 
 static int stm32_pwm_set_breakinput(struct stm32_pwm *priv,
This page took 0.032211 seconds and 4 git commands to generate.