Re: [PATCH] usb: fotg210: fix link error for CONFIG_USB=n
From: Linus Walleij
Date: Wed Sep 16 2026 - 09:14:29 EST
On Wed, Sep 16, 2026 at 1:44 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:
>
> On Wed, Sep 16, 2026, at 11:45, Linus Walleij wrote:
> > 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>
>
> Apparently you you already fixed this yourself in commit 600334ef2f29
> ("usb: fotg210: guard host shutdown in gadget-only builds") in today's
> linux-next, so this one is no longer needed, the two patches are
> equivalent.
Haha the solution was so different that I didn't understand it was
the same problem :D
Yours,
Linus Walleij