Merge tag 'nfs-for-3.14-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[firefly-linux-kernel-4.4.55.git] / drivers / pwm / core.c
index dfbfbc5217683de697d1c834f73c55de0ff850de..a80471399c20314edb69442bac0fe57cf06efec9 100644 (file)
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 
-#define MAX_PWMS 1024
+#include <dt-bindings/pwm/pwm.h>
 
-/* 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);
@@ -809,12 +808,12 @@ static void pwm_dbg_show(struct pwm_chip *chip, struct seq_file *s)
                seq_printf(s, " pwm-%-3d (%-20.20s):", i, pwm->label);
 
                if (test_bit(PWMF_REQUESTED, &pwm->flags))
-                       seq_printf(s, " requested");
+                       seq_puts(s, " requested");
 
                if (test_bit(PWMF_ENABLED, &pwm->flags))
-                       seq_printf(s, " enabled");
+                       seq_puts(s, " enabled");
 
-               seq_printf(s, "\n");
+               seq_puts(s, "\n");
        }
 }