Re: [PATCH] usb: fotg210: fix link error for CONFIG_USB=n

From: Linus Walleij

Date: Wed Sep 16 2026 - 05:53:12 EST


On Wed, Sep 16, 2026 at 10:26 AM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:

> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> Calling usb_hcd_platform_shutdown() is not possible if CONFIG_USB
> is disabled:
>
> arm-linux-gnueabi-ld: drivers/usb/fotg210/fotg210-core.o: in function `fotg210_shutdown':
> fotg210-core.c:(.text+0x40): undefined reference to `usb_hcd_platform_shutdown'
>
> Move this call into the hcd file to ensure this is only used
> when USB host mode is actually available.
>
> Fixes: 7dbc2e1ba8fd ("usb: fotg210: use the common EHCI core")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Good catch!
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij