From: Andy Shevchenko Date: Tue, 27 Sep 2022 16:24:20 +0000 (+0300) Subject: pwm: lpss: Make use of bits.h macros for all masks X-Git-Tag: v6.6.17~6461^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fdb3281bb8479ea0c41e6be0af5dcab669f9eb9;p=platform%2Fkernel%2Flinux-rpi.git pwm: lpss: Make use of bits.h macros for all masks Make use of the GENMASK() (far less error-prone, far more concise). Signed-off-by: Andy Shevchenko Reviewed-by: Hans de Goede Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index a209154..accdef5 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c @@ -10,6 +10,7 @@ * Author: Alan Cox */ +#include #include #include #include @@ -26,7 +27,7 @@ #define PWM_ENABLE BIT(31) #define PWM_SW_UPDATE BIT(30) #define PWM_BASE_UNIT_SHIFT 8 -#define PWM_ON_TIME_DIV_MASK 0x000000ff +#define PWM_ON_TIME_DIV_MASK GENMASK(7, 0) /* Size of each PWM register space if multiple */ #define PWM_SIZE 0x400