drivers/usb/fotg210/fotg210-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
FOTG210 can be built with CONFIG_USB=n, but its shutdown callback
references usb_hcd_platform_shutdown() from the USB host core,
causing a link failure.
Guard the call with CONFIG_USB_FOTG210_HCD so gadget-only builds do
not reference the host shutdown helper.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609141128.DQicnuRW-lkp@intel.com/
Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Fix the gadget-only build failure introduced by the FOTG210 common
EHCI conversion by guarding the host shutdown call.
Based on the complete FOTG210 modernization series. Verified with
PowerPC64 gadget-only and Gemini host object builds using LLVM.
---
drivers/usb/fotg210/fotg210-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/fotg210/fotg210-core.c b/drivers/usb/fotg210/fotg210-core.c
index 7976bdae5f07..7de49b7eb3aa 100644
--- a/drivers/usb/fotg210/fotg210-core.c
+++ b/drivers/usb/fotg210/fotg210-core.c
@@ -258,7 +258,8 @@ static void fotg210_remove(struct platform_device *pdev)
static void fotg210_shutdown(struct platform_device *pdev)
{
- if (usb_get_dr_mode(&pdev->dev) != USB_DR_MODE_PERIPHERAL)
+ if (IS_ENABLED(CONFIG_USB_FOTG210_HCD) &&
+ usb_get_dr_mode(&pdev->dev) != USB_DR_MODE_PERIPHERAL)
usb_hcd_platform_shutdown(pdev);
}
---
base-commit: da11df946e2c5288ba1124b20af7faada58b85eb
change-id: 20260914-fotg210-ehci-fixes-18d074ae390e
Best regards,
--
Linus Walleij <linusw@kernel.org>
On Mon, Sep 14, 2026 at 08:41:18AM +0200, Linus Walleij wrote: > FOTG210 can be built with CONFIG_USB=n, but its shutdown callback > references usb_hcd_platform_shutdown() from the USB host core, > causing a link failure. > > Guard the call with CONFIG_USB_FOTG210_HCD so gadget-only builds do > not reference the host shutdown helper. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202609141128.DQicnuRW-lkp@intel.com/ > Assisted-by: LLM > Signed-off-by: Linus Walleij <linusw@kernel.org> > --- > Fix the gadget-only build failure introduced by the FOTG210 common > EHCI conversion by guarding the host shutdown call. > > Based on the complete FOTG210 modernization series. Verified with > PowerPC64 gadget-only and Gemini host object builds using LLVM. No Fixes: tag? thanks, greg k-h
© 2016 - 2026 Red Hat, Inc.