summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>2025-09-24 11:06:40 +0200
committerUwe Kleine-König <ukleinek@kernel.org>2025-11-14 11:56:14 +0100
commit0251fa8887416702cdebf75a509b949ff2cb0a0d (patch)
tree8dc3eb093f0fcf1aa34a436ca6ed076be08391f7
parent0559730b8570259ef948e9083653f8a87baba182 (diff)
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>
-rw-r--r--drivers/pwm/pwm-max7360.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-max7360.c b/drivers/pwm/pwm-max7360.c
index ebf93a7aee5b..16261958ce7f 100644
--- a/drivers/pwm/pwm-max7360.c
+++ b/drivers/pwm/pwm-max7360.c
@@ -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)