mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
i2c: qcom-geni: Use devm_pm_runtime_enable() for PM management
The current implementation manually calls pm_runtime_enable() in probe() and pm_runtime_disable() in remove() and error paths. This pattern is error-prone and requires careful cleanup in all failure paths. Using the devres-managed variant eliminates this complexity. Migrate from manual pm_runtime_enable()/pm_runtime_disable() calls to the devres-managed devm_pm_runtime_enable() API. This simplifies the driver by automatically handling runtime PM cleanup when the device is removed or probe fails. This helps with Simplified error handling and Automatic cleanup. Signed-off-by: Mukesh Kumar Savaliya <mukesh.savaliya@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260714051512.3732551-1-mukesh.savaliya@oss.qualcomm.com
This commit is contained in:
parent
d3ac4939fb
commit
5272a6ab6b
1 changed files with 11 additions and 14 deletions
Loading…
Add table
Add a link
Reference in a new issue