pwm: max7360: Clean MAX7360 code

Duty steps computation can never end in values higher than
MAX7360_PWM_MAX: remove useless use of min().

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Suggested-by: Uwe Kleine-König <ukleinek@kernel.org>
Link: https://patch.msgid.link/20250924-mdb-max7360-pwm-optimize-v1-1-5959eeed20d8@bootlin.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
pull/1354/merge
Mathieu Dubois-Briand 2025-09-24 11:06:40 +02:00 committed by Uwe Kleine-König
parent 0559730b85
commit 0251fa8887
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ static int max7360_pwm_round_waveform_tohw(struct pwm_chip *chip,
duty_steps = MAX7360_PWM_MAX - 1;
}
wfhw->duty_steps = min(MAX7360_PWM_MAX, duty_steps);
wfhw->duty_steps = duty_steps;
wfhw->enabled = !!wf->period_length_ns;
if (wf->period_length_ns && wf->period_length_ns < MAX7360_PWM_PERIOD_NS)