pwm: Reorder header file to get rid of struct pwm_capture forward declaration
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 23 May 2022 17:45:00 +0000 (19:45 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 22 Jun 2022 13:33:54 +0000 (15:33 +0200)
There is no cyclic dependency, so by reordering the forward declaration
can be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
include/linux/pwm.h

index 76463b71ad4edfb8bf6a882bc8b1c72404a6d935..6d6946dec771243da5d7f4703ee9df2ec691ebb2 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/mutex.h>
 #include <linux/of.h>
 
-struct pwm_capture;
 struct seq_file;
 
 struct pwm_chip;
@@ -251,6 +250,16 @@ pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
        return 0;
 }
 
+/**
+ * struct pwm_capture - PWM capture data
+ * @period: period of the PWM signal (in nanoseconds)
+ * @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
+ */
+struct pwm_capture {
+       unsigned int period;
+       unsigned int duty_cycle;
+};
+
 /**
  * struct pwm_ops - PWM controller operations
  * @request: optional hook for requesting a PWM
@@ -300,16 +309,6 @@ struct pwm_chip {
        struct pwm_device *pwms;
 };
 
-/**
- * struct pwm_capture - PWM capture data
- * @period: period of the PWM signal (in nanoseconds)
- * @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
- */
-struct pwm_capture {
-       unsigned int period;
-       unsigned int duty_cycle;
-};
-
 #if IS_ENABLED(CONFIG_PWM)
 /* PWM user APIs */
 struct pwm_device *pwm_request(int pwm_id, const char *label);