Messages in this thread |  | | From | Linus Walleij <> | Date | Fri, 16 Dec 2022 08:44:27 +0100 | Subject | Re: [PATCH] usb: fotg210: fix OTG-only build |
| |
On Thu, Dec 15, 2022 at 5:57 PM Arnd Bergmann <arnd@kernel.org> wrote:
> From: Arnd Bergmann <arnd@arndb.de> > > The fotg210 module combines the HCD and OTG drivers, which then > fails to build when only the USB gadget support is enabled > in the kernel but host support is not: > > aarch64-linux-ld: drivers/usb/fotg210/fotg210-core.o: in function `fotg210_init': > fotg210-core.c:(.init.text+0xc): undefined reference to `usb_disabled' > > Move the check for usb_disabled() after the check for the HCD module, > and let the OTG driver still be probed in this configuration. > > A nicer approach might be to have the common portion built as a > library module, with the two platform other files registering > their own platform_driver instances separately. > > Fixes: ddacd6ef44ca ("usb: fotg210: Fix Kconfig for USB host modules") > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
My mistake, I thought this function was a generic USB function and not related to host. I might just push it down to the host again.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours, Linus Walleij
|  |