Skip to content

Commit 3f46d92

Browse files
ukleineknunojsa
authored andcommitted
pwm: Drop struct pwm_args::phase
There is no code location that explicitly sets this struct member to a value. So with a bit of luck it's always zero. (And if it's not that's a bug quite certainly.) So use an explicit 0 for .phase's only reader and drop the other unused struct member. Fixes: b2c4ca6 ("drivers: pwm: core: Add offset support") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
1 parent a68136f commit 3f46d92

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/linux/pwm.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ enum pwm_polarity {
2626
* struct pwm_args - board-dependent PWM arguments
2727
* @period: reference period
2828
* @polarity: reference polarity
29-
* @phase: reference phase
3029
*
3130
* This structure describes board-dependent arguments attached to a PWM
3231
* device. These arguments are usually retrieved from the PWM lookup table or
@@ -38,7 +37,6 @@ enum pwm_polarity {
3837
*/
3938
struct pwm_args {
4039
u64 period;
41-
u64 phase;
4240
enum pwm_polarity polarity;
4341
};
4442

@@ -547,7 +545,7 @@ static inline void pwm_apply_args(struct pwm_device *pwm)
547545
state.enabled = false;
548546
state.polarity = pwm->args.polarity;
549547
state.period = pwm->args.period;
550-
state.phase = pwm->args.phase;
548+
state.phase = 0;
551549
state.usage_power = false;
552550

553551
pwm_apply_state(pwm, &state);

0 commit comments

Comments
 (0)