Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc2: Move functions from header to source

Removed extern specifier from dwc2_host_start(), dwc2_host_disconnect()
and dwc2_host_hub_info() functions. Moved those functions from header
to source. Then make them static.

Signed-off-by: Razmik Karapetyan <razmik@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>

authored by

Razmik Karapetyan and committed by
Felipe Balbi
4411beba 7d94f970

+29 -34
+29 -29
drivers/usb/dwc2/hcd.c
··· 649 649 #endif /* VERBOSE_DEBUG */ 650 650 } 651 651 652 + static int _dwc2_hcd_start(struct usb_hcd *hcd); 653 + 654 + static void dwc2_host_start(struct dwc2_hsotg *hsotg) 655 + { 656 + struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); 657 + 658 + hcd->self.is_b_host = dwc2_hcd_is_b_host(hsotg); 659 + _dwc2_hcd_start(hcd); 660 + } 661 + 662 + static void dwc2_host_disconnect(struct dwc2_hsotg *hsotg) 663 + { 664 + struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); 665 + 666 + hcd->self.is_b_host = 0; 667 + } 668 + 669 + static void dwc2_host_hub_info(struct dwc2_hsotg *hsotg, void *context, 670 + int *hub_addr, int *hub_port) 671 + { 672 + struct urb *urb = context; 673 + 674 + if (urb->dev->tt) 675 + *hub_addr = urb->dev->tt->hub->devnum; 676 + else 677 + *hub_addr = 0; 678 + *hub_port = urb->dev->ttport; 679 + } 680 + 652 681 /* 653 682 * ========================================================================= 654 683 * Low Level Host Channel Access Functions ··· 4049 4020 4050 4021 p = (struct wrapper_priv_data *) &hcd->hcd_priv; 4051 4022 return p->hsotg; 4052 - } 4053 - 4054 - static int _dwc2_hcd_start(struct usb_hcd *hcd); 4055 - 4056 - void dwc2_host_start(struct dwc2_hsotg *hsotg) 4057 - { 4058 - struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); 4059 - 4060 - hcd->self.is_b_host = dwc2_hcd_is_b_host(hsotg); 4061 - _dwc2_hcd_start(hcd); 4062 - } 4063 - 4064 - void dwc2_host_disconnect(struct dwc2_hsotg *hsotg) 4065 - { 4066 - struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); 4067 - 4068 - hcd->self.is_b_host = 0; 4069 - } 4070 - 4071 - void dwc2_host_hub_info(struct dwc2_hsotg *hsotg, void *context, int *hub_addr, 4072 - int *hub_port) 4073 - { 4074 - struct urb *urb = context; 4075 - 4076 - if (urb->dev->tt) 4077 - *hub_addr = urb->dev->tt->hub->devnum; 4078 - else 4079 - *hub_addr = 0; 4080 - *hub_port = urb->dev->ttport; 4081 4023 } 4082 4024 4083 4025 /**
-5
drivers/usb/dwc2/hcd.h
··· 793 793 #define URB_SEND_ZERO_PACKET 0x2 794 794 795 795 /* Host driver callbacks */ 796 - 797 - extern void dwc2_host_start(struct dwc2_hsotg *hsotg); 798 - extern void dwc2_host_disconnect(struct dwc2_hsotg *hsotg); 799 - extern void dwc2_host_hub_info(struct dwc2_hsotg *hsotg, void *context, 800 - int *hub_addr, int *hub_port); 801 796 extern struct dwc2_tt *dwc2_host_get_tt_info(struct dwc2_hsotg *hsotg, 802 797 void *context, gfp_t mem_flags, 803 798 int *ttport);