[PATCH v2 2/5] usb: onboard-hub: Use devm API do automatically free the reset GPIO
Quentin Schulz
quentin.schulz at cherry.de
Fri Jun 6 12:49:04 CEST 2025
Hi Lukasz,
On 5/26/25 4:24 PM, Lukasz Czechowski wrote:
> The reset GPIO is obtained during driver probing by the function
> devm_gpiod_get_optional, which means the GPIO will be automatically
> freed when the device is removed. Because of this, explicit call
> to free the reset GPIO in hub remove function is not needed.
> To support the Managed device resources, the DEVRES config must
> be enabled, otherwise the devres functions fall back to non-managed
> variants. Set the necessary dependency to DEVRES in Kconfig.
>
Good catch, but that is a terrifying find.
Unfortunately, this patch and the next ones aren't applying cleanly on
master anymore because of 77b053502f39 ("usb: onboard-hub: Fix return
type for regulator APIs"), please rebase.
This patch once the conflict is resolved is fine though :)
Cheers,
Quentin
More information about the U-Boot
mailing list