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

Krzysztof Kozlowski
2026-04-01T15:19:45Z

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