Commit b335fe681075bd6bd3e6842bad12a0ccb573dc4f
Committed by
Marek Vasut
1 parent
c6265f7f34
Exists in
v2017.01-smarct4x
and in
34 other branches
usb.h: Always declare usb function prototypes
There is no harm in declaring the function prototypes even if nothing implements them, and when CONFIG_DM_USB=y the various usb functions are available regardless of any controller drivers being enabled. This fixes compile warnings due to missing prototypes on ARCHs where the ARCH Kconfig always enables CONFIG_DM_USB and various usb drivers. One could argue that in the case of no controllers CONFIG_DM_USB should not be set, but this problem is typically seen during bringup of boards which do actually have usb controllers. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Showing 1 changed file with 0 additions and 15 deletions Side-by-side Diff
include/usb.h
... | ... | @@ -171,17 +171,6 @@ |
171 | 171 | * this is how the lowlevel part communicate with the outer world |
172 | 172 | */ |
173 | 173 | |
174 | -#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || \ | |
175 | - defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_OHCI_NEW) || \ | |
176 | - defined(CONFIG_USB_SL811HS) || defined(CONFIG_USB_ISP116X_HCD) || \ | |
177 | - defined(CONFIG_USB_R8A66597_HCD) || defined(CONFIG_USB_DAVINCI) || \ | |
178 | - defined(CONFIG_USB_OMAP3) || defined(CONFIG_USB_DA8XX) || \ | |
179 | - defined(CONFIG_USB_BLACKFIN) || defined(CONFIG_USB_AM35X) || \ | |
180 | - defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \ | |
181 | - defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) || \ | |
182 | - defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \ | |
183 | - defined(CONFIG_USB_EMUL) | |
184 | - | |
185 | 174 | int usb_lowlevel_init(int index, enum usb_init_type init, void **controller); |
186 | 175 | int usb_lowlevel_stop(int index); |
187 | 176 | |
188 | 177 | |
... | ... | @@ -216,11 +205,7 @@ |
216 | 205 | * in boards init functions e.g. udc_disconnect() used for |
217 | 206 | * forced device disconnection from host. |
218 | 207 | */ |
219 | -#elif defined(CONFIG_USB_GADGET_PXA2XX) | |
220 | - | |
221 | 208 | extern void udc_disconnect(void); |
222 | - | |
223 | -#endif | |
224 | 209 | |
225 | 210 | /* |
226 | 211 | * board-specific hardware initialization, called by |