Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mathieu Dubois-Briand and committed by
Uwe Kleine-König
0251fa88 0559730b

+1 -1
+1 -1
drivers/pwm/pwm-max7360.c
··· 75 75 duty_steps = MAX7360_PWM_MAX - 1; 76 76 } 77 77 78 - wfhw->duty_steps = min(MAX7360_PWM_MAX, duty_steps); 78 + wfhw->duty_steps = duty_steps; 79 79 wfhw->enabled = !!wf->period_length_ns; 80 80 81 81 if (wf->period_length_ns && wf->period_length_ns < MAX7360_PWM_PERIOD_NS)