From: Laurent Pinchart Date: Wed, 17 Jul 2013 22:54:22 +0000 (+0200) Subject: pwm: Use the DT macro directly when parsing PWM DT flags X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=208be7698fe39d54242348aef375fd86180c4506;p=linux-beck.git pwm: Use the DT macro directly when parsing PWM DT flags Don't redefine a PWM_SPEC_POLARITY macro with a value identical to PWM_POLARITY_INVERTED, use the PWM DT macro directly. Signed-off-by: Laurent Pinchart Reviewed-by: Stephen Warren Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index dfbfbc521768..2ca95042a0b9 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -30,10 +30,9 @@ #include #include -#define MAX_PWMS 1024 +#include -/* flags in the third cell of the DT PWM specifier */ -#define PWM_SPEC_POLARITY (1 << 0) +#define MAX_PWMS 1024 static DEFINE_MUTEX(pwm_lookup_lock); static LIST_HEAD(pwm_lookup_list); @@ -149,7 +148,7 @@ of_pwm_xlate_with_flags(struct pwm_chip *pc, const struct of_phandle_args *args) pwm_set_period(pwm, args->args[1]); - if (args->args[2] & PWM_SPEC_POLARITY) + if (args->args[2] & PWM_POLARITY_INVERTED) pwm_set_polarity(pwm, PWM_POLARITY_INVERSED); else pwm_set_polarity(pwm, PWM_POLARITY_NORMAL);