Skip to content

Commit ef2e35d

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: Reorder header file to get rid of struct pwm_capture forward declaration
There is no cyclic dependency, so by reordering the forward declaration can be dropped. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent f6bc65d commit ef2e35d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

include/linux/pwm.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <linux/mutex.h>
77
#include <linux/of.h>
88

9-
struct pwm_capture;
109
struct seq_file;
1110

1211
struct pwm_chip;
@@ -251,6 +250,16 @@ pwm_set_relative_duty_cycle(struct pwm_state *state, unsigned int duty_cycle,
251250
return 0;
252251
}
253252

253+
/**
254+
* struct pwm_capture - PWM capture data
255+
* @period: period of the PWM signal (in nanoseconds)
256+
* @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
257+
*/
258+
struct pwm_capture {
259+
unsigned int period;
260+
unsigned int duty_cycle;
261+
};
262+
254263
/**
255264
* struct pwm_ops - PWM controller operations
256265
* @request: optional hook for requesting a PWM
@@ -300,16 +309,6 @@ struct pwm_chip {
300309
struct pwm_device *pwms;
301310
};
302311

303-
/**
304-
* struct pwm_capture - PWM capture data
305-
* @period: period of the PWM signal (in nanoseconds)
306-
* @duty_cycle: duty cycle of the PWM signal (in nanoseconds)
307-
*/
308-
struct pwm_capture {
309-
unsigned int period;
310-
unsigned int duty_cycle;
311-
};
312-
313312
#if IS_ENABLED(CONFIG_PWM)
314313
/* PWM user APIs */
315314
struct pwm_device *pwm_request(int pwm_id, const char *label);

0 commit comments

Comments
 (0)