pwm: Add missing "CONFIG_" prefix
authorKees Cook <keescook@chromium.org>
Wed, 3 Jun 2020 22:40:56 +0000 (15:40 -0700)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 4 Jun 2020 17:09:28 +0000 (19:09 +0200)
The IS_ENABLED() use was missing the CONFIG_ prefix which would have
lead to skipping this code.

Fixes: 3ad1f3a33286 ("pwm: Implement some checks for lowlevel drivers")
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/core.c

index bca0496..004b2ea 100644 (file)
@@ -121,7 +121,7 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
                pwm->chip->ops->get_state(pwm->chip, pwm, &pwm->state);
                trace_pwm_get(pwm, &pwm->state);
 
-               if (IS_ENABLED(PWM_DEBUG))
+               if (IS_ENABLED(CONFIG_PWM_DEBUG))
                        pwm->last = pwm->state;
        }