Skip to contentSkip to conversation

usb: gadget: Mark udc_disconnect as static

PATCH In review Tom Rini 2 participants 3 messages Feb 24 – Mar 3

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 usb: gadget: Mark udc_disconnect as static

With the last external callers of udc_disconnect long removed, mark this function as static now and remove it from headers.

---
 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(-)
arch/arm/include/asm/bootm.h +0 -2
index 439e43c2d017..762f00e69004 100644
@@ -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
drivers/usb/gadget/ci_udc.c +1 -1
index 046bb335ecb5..4729570c5257 100644
@@ -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 */
include/usb.h +0 -9
index be37ed272e15..dab23753f0c0 100644
@@ -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
include/usb/udc.h +0 -1
index 749b3a3f0156..c5e431813be7 100644
@@ -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);
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Tom,

Thank you for the patch.

Quoted 4 lines · Tom Rini

With the last external callers of udc_disconnect long removed, mark this function as static now and remove it from headers.

Quoted 7 lines
---
 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(-)