[PATCH v3 1/6] drivers: core: device: set new parent when old parent is NULL
Simon Glass
sjg at chromium.org
Wed Feb 4 01:23:12 CET 2026
On Tue, 20 Jan 2026 at 08:07, Yang Xiwen via B4 Relay
<devnull+forbidden405.outlook.com at kernel.org> wrote:
>
> From: Yang Xiwen <forbidden405 at outlook.com>
>
> The current logic does not update the new parent in device_reparent() if
> old parent is NULL. The behavior is not desired. Fix it by setting the
> parent in this case.
>
> Fixes: cfecbaf4e768 ("dm: core: add support for device re-parenting")
> Signed-off-by: Yang Xiwen <forbidden405 at outlook.com>
> ---
> drivers/core/device.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Reviewed-by: Simon Glass <simon.glass at canonical.com>
Separately from this series, I would like to see a function to set the
parent for a device, since this is a fairly unusual thing to do.
Regards,
Simon
More information about the U-Boot
mailing list