aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-imx-tpm.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-07-05 10:06:49 +0200
committerThierry Reding <thierry.reding@gmail.com>2023-10-13 10:07:17 +0200
commit82adc1b2688b02a6b556720d9954a16a4129567f (patch)
treec4489625dc7a247cea3e962c1a5dd9c8e20f94bb /drivers/pwm/pwm-imx-tpm.c
parent2d6812b41e0d832919d72c72ebddf361df53ba1b (diff)
downloadlinux-82adc1b2688b02a6b556720d9954a16a4129567f.tar.gz
linux-82adc1b2688b02a6b556720d9954a16a4129567f.tar.bz2
linux-82adc1b2688b02a6b556720d9954a16a4129567f.zip
pwm: cros-ec: Put per-channel data into driver data
Instead of an allocation of a single u16 per channel, allocate them all in a single chunk which greatly reduces memory fragmentation and also the overhead to track the allocated memory. Also put the channel data in driver data where it's cheaper to determine the address (no function call involved, just a trivial pointer addition). This also allows to get rid of the request and free callbacks. The only cost is that the channel data is allocated early, and even for unused channels. Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20230705080650.2353391-8-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm/pwm-imx-tpm.c')
0 files changed, 0 insertions, 0 deletions