[PATCH v20 01/10] power: reset: reboot-mode: Remove devres based allocations
Bartosz Golaszewski
brgl at kernel.org
Thu Mar 5 02:05:20 PST 2026
On Wed, 4 Mar 2026 19:03:01 +0100, Shivendra Pratap
<shivendra.pratap at oss.qualcomm.com> said:
> Devres APIs are intended for use in drivers, where the managed lifetime
> of resources is tied directly to the driver attach/detach cycle. In
> shared subsystem code, there is no guarantee that the subsystem
> functions will only be called after a driver has been attached, nor that
> they will not be referenced after the managed resources have been
> released during driver detach.
>
> To ensure correct lifetime handling, avoid using devres-based
> allocations in the reboot-mode and explicitly handle allocation and
> cleanup of resources.
>
> Fixes: 4fcd504edbf7 ("power: reset: add reboot mode driver")
> Signed-off-by: Shivendra Pratap <shivendra.pratap at oss.qualcomm.com>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
More information about the linux-arm-kernel
mailing list