aboutsummaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-03-17 11:40:35 +0100
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-04-26 21:29:17 +0200
commitee37bf50749f06b29394d7ba8a85b47f023b61e2 (patch)
tree061cf6f9a5e533c464ff1aa26373487494e1126c /drivers/pwm/pwm-stm32.c
parente9cc807f87ffd1ccc919731e8f624982935af3e0 (diff)
downloadlinux-ee37bf50749f06b29394d7ba8a85b47f023b61e2.tar.gz
linux-ee37bf50749f06b29394d7ba8a85b47f023b61e2.tar.bz2
linux-ee37bf50749f06b29394d7ba8a85b47f023b61e2.zip
pwm: Ensure a struct pwm has the same lifetime as its pwm_chip
It's required to not free the memory underlying a requested PWM while a consumer still has a reference to it. While currently a pwm_chip doesn't live long enough in all cases, linking the struct pwm to the pwm_chip results in the right lifetime as soon as the pwmchip is living long enough. This happens with the following commits. Note this is a breaking change for all pwm drivers that don't use pwmchip_alloc(). Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> # for struct_size() and __counted_by() Link: https://lore.kernel.org/r/7e9e958841f049026c0023b309cc9deecf0ab61d.1710670958.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
0 files changed, 0 insertions, 0 deletions