* [PATCH] usb: fotg210: guard host shutdown in gadget-only builds
@ 2026-09-14 6:41 Linus Walleij
2026-09-14 6:54 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2026-09-14 6:41 UTC (permalink / raw)
To: Greg Kroah-Hartman, Alan Stern, Daniel Palmer
Cc: linux-usb, linux-kernel, kernel test robot, Linus Walleij
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: fotg210: guard host shutdown in gadget-only builds
2026-09-14 6:41 [PATCH] usb: fotg210: guard host shutdown in gadget-only builds Linus Walleij
@ 2026-09-14 6:54 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2026-09-14 6:54 UTC (permalink / raw)
To: Linus Walleij
Cc: Alan Stern, Daniel Palmer, linux-usb, linux-kernel, kernel test robot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-14 6:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-14 6:41 [PATCH] usb: fotg210: guard host shutdown in gadget-only builds Linus Walleij
2026-09-14 6:54 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®