[PATCH v20 01/10] power: reset: reboot-mode: Remove devres based allocations

Krzysztof Kozlowski krzk at kernel.org
Wed Apr 1 08:19:38 PDT 2026


On 04/03/2026 19:03, Shivendra Pratap wrote:
> 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")

I don't think this is correct tag.

That commit added code which was a driver, not subsystem level things.
Using devres, as you pointed out, in platform_driver is correct.

Otherwise please specify what bug from that commit is being fixed.

Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list