summaryrefslogtreecommitdiff
path: root/rust/helpers/pwm.c
diff options
context:
space:
mode:
authorMichal Wilczynski <m.wilczynski@samsung.com>2025-10-16 15:38:01 +0200
committerUwe Kleine-König <ukleinek@kernel.org>2025-11-07 10:03:53 +0100
commitce284f882022ebcb953984c7eccf4fc4eb531978 (patch)
tree2fec07eb8805b3af44ba12d4bf9b6f0f0038cb5e /rust/helpers/pwm.c
parent739ad9be61e5f53dbd8d7d7e80723d0799ff077c (diff)
pwm: Export `pwmchip_release` for external use
The upcoming Rust abstraction layer for the PWM subsystem uses a custom `dev->release` handler to safely manage the lifetime of its driver data. To prevent leaking the memory of the `struct pwm_chip` (allocated by `pwmchip_alloc`), this custom handler must also call the original `pwmchip_release` function to complete the cleanup. Make `pwmchip_release` a global, exported function so that it can be called from the Rust FFI bridge. This involves removing the `static` keyword, adding a prototype to the public header, and exporting the symbol. Reviewed-by: Elle Rhumsaa <elle@weathered-steel.dev> Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com> Link: https://patch.msgid.link/20251016-rust-next-pwm-working-fan-for-sending-v16-1-a5df2405d2bd@samsung.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Diffstat (limited to 'rust/helpers/pwm.c')
0 files changed, 0 insertions, 0 deletions