diff options
| author | Philipp Zabel <p.zabel@pengutronix.de> | 2023-10-19 23:07:00 +0300 |
|---|---|---|
| committer | Thierry Reding <thierry.reding@gmail.com> | 2023-12-20 18:04:14 +0300 |
| commit | e495f47274a145dd802748fed66608f46d9ae11d (patch) | |
| tree | f0ab2902df53566d4a9bfb2850249adce32ce5b8 /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | 7ee2273197f1c1755ebdad8716eab50689401aff (diff) | |
| download | linux-e495f47274a145dd802748fed66608f46d9ae11d.tar.xz | |
pwm: stm32: Replace write_ccrx with regmap_write
The TIM_CCR1...4 registers are consecutive, so replace the switch
case with a simple calculation. Since ch is known to be in the 0...3
range (it is set to hwpwm < npwm <= 4), drop the unnecessary error
handling. The return value was not checked anyway. What remains does
not warrant keeping the write_ccrx() function around, so instead call
regmap_write() directly at the singular call site.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions
