* [PATCH] usb: gadget: Mark udc_disconnect as static
@ 2026-02-24 15:45 Tom Rini
2026-02-27 9:42 ` Mattijs Korpershoek
2026-03-03 8:10 ` Mattijs Korpershoek
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2026-02-24 15:45 UTC (permalink / raw)
To: u-boot; +Cc: Lukasz Majewski, Mattijs Korpershoek, Marek Vasut
With the last external callers of udc_disconnect long removed, mark this
function as static now and remove it from headers.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
arch/arm/include/asm/bootm.h | 2 --
drivers/usb/gadget/ci_udc.c | 2 +-
include/usb.h | 9 ---------
include/usb/udc.h | 1 -
4 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/arch/arm/include/asm/bootm.h b/arch/arm/include/asm/bootm.h
index 439e43c2d017..762f00e69004 100644
--- a/arch/arm/include/asm/bootm.h
+++ b/arch/arm/include/asm/bootm.h
@@ -8,8 +8,6 @@
#ifndef ARM_BOOTM_H
#define ARM_BOOTM_H
-extern void udc_disconnect(void);
-
#ifdef CONFIG_SUPPORT_PASSING_ATAGS
# define BOOTM_ENABLE_TAGS 1
#else
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 046bb335ecb5..4729570c5257 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -990,7 +990,7 @@ int dm_usb_gadget_handle_interrupts(struct udevice *dev)
return value;
}
-void udc_disconnect(void)
+static void udc_disconnect(void)
{
struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor;
/* disable pullup */
diff --git a/include/usb.h b/include/usb.h
index be37ed272e15..dab23753f0c0 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -208,15 +208,6 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue);
#define USB_UHCI_VEND_ID 0x8086
#define USB_UHCI_DEV_ID 0x7112
-/*
- * PXA25x can only act as USB device. There are drivers
- * which works with USB CDC gadgets implementations.
- * Some of them have common routines which can be used
- * in boards init functions e.g. udc_disconnect() used for
- * forced device disconnection from host.
- */
-extern void udc_disconnect(void);
-
/*
* board-specific hardware initialization, called by
* usb drivers and u-boot commands
diff --git a/include/usb/udc.h b/include/usb/udc.h
index 749b3a3f0156..c5e431813be7 100644
--- a/include/usb/udc.h
+++ b/include/usb/udc.h
@@ -39,7 +39,6 @@ int udc_endpoint_write(struct usb_endpoint_instance *endpoint);
void udc_setup_ep(struct usb_device_instance *device, unsigned int ep,
struct usb_endpoint_instance *endpoint);
void udc_connect(void);
-void udc_disconnect(void);
void udc_enable(struct usb_device_instance *device);
void udc_disable(void);
void udc_startup_events(struct usb_device_instance *device);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: gadget: Mark udc_disconnect as static
2026-02-24 15:45 [PATCH] usb: gadget: Mark udc_disconnect as static Tom Rini
@ 2026-02-27 9:42 ` Mattijs Korpershoek
2026-03-03 8:10 ` Mattijs Korpershoek
1 sibling, 0 replies; 3+ messages in thread
From: Mattijs Korpershoek @ 2026-02-27 9:42 UTC (permalink / raw)
To: Tom Rini, u-boot; +Cc: Lukasz Majewski, Mattijs Korpershoek, Marek Vasut
Hi Tom,
Thank you for the patch.
On Tue, Feb 24, 2026 at 09:45, Tom Rini <trini@konsulko.com> wrote:
> With the last external callers of udc_disconnect long removed, mark this
> function as static now and remove it from headers.
>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
> ---
> arch/arm/include/asm/bootm.h | 2 --
> drivers/usb/gadget/ci_udc.c | 2 +-
> include/usb.h | 9 ---------
> include/usb/udc.h | 1 -
> 4 files changed, 1 insertion(+), 13 deletions(-)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: gadget: Mark udc_disconnect as static
2026-02-24 15:45 [PATCH] usb: gadget: Mark udc_disconnect as static Tom Rini
2026-02-27 9:42 ` Mattijs Korpershoek
@ 2026-03-03 8:10 ` Mattijs Korpershoek
1 sibling, 0 replies; 3+ messages in thread
From: Mattijs Korpershoek @ 2026-03-03 8:10 UTC (permalink / raw)
To: u-boot, Tom Rini; +Cc: Lukasz Majewski, Marek Vasut
Hi,
On Tue, 24 Feb 2026 09:45:04 -0600, Tom Rini wrote:
> With the last external callers of udc_disconnect long removed, mark this
> function as static now and remove it from headers.
Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)
[1/1] usb: gadget: Mark udc_disconnect as static
https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/7b60cd933bc1db31c94483f6aeb9289722427c5e
--
Mattijs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-03 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 15:45 [PATCH] usb: gadget: Mark udc_disconnect as static Tom Rini
2026-02-27 9:42 ` Mattijs Korpershoek
2026-03-03 8:10 ` Mattijs Korpershoek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox