* [U-Boot] [PATCH v2] usb.h: Always declare usb function prototypes
@ 2015-06-10 15:04 Hans de Goede
2015-06-19 12:32 ` Marek Vasut
0 siblings, 1 reply; 2+ messages in thread
From: Hans de Goede @ 2015-06-10 15:04 UTC (permalink / raw)
To: u-boot
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>
---
Changes in v2:
-Simply always define the function prototypes instead of adding yet another
condition to the already unwieldly #if def ... || def ... condition
---
include/usb.h | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/include/usb.h b/include/usb.h
index c709ce2..dca512d 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -171,17 +171,6 @@ enum usb_init_type {
* this is how the lowlevel part communicate with the outer world
*/
-#if defined(CONFIG_USB_UHCI) || defined(CONFIG_USB_OHCI) || \
- defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_OHCI_NEW) || \
- defined(CONFIG_USB_SL811HS) || defined(CONFIG_USB_ISP116X_HCD) || \
- defined(CONFIG_USB_R8A66597_HCD) || defined(CONFIG_USB_DAVINCI) || \
- defined(CONFIG_USB_OMAP3) || defined(CONFIG_USB_DA8XX) || \
- defined(CONFIG_USB_BLACKFIN) || defined(CONFIG_USB_AM35X) || \
- defined(CONFIG_USB_MUSB_DSPS) || defined(CONFIG_USB_MUSB_AM35X) || \
- defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined(CONFIG_USB_MUSB_SUNXI) || \
- defined(CONFIG_USB_XHCI) || defined(CONFIG_USB_DWC2) || \
- defined(CONFIG_USB_EMUL)
-
int usb_lowlevel_init(int index, enum usb_init_type init, void **controller);
int usb_lowlevel_stop(int index);
@@ -216,12 +205,8 @@ void *poll_int_queue(struct usb_device *dev, struct int_queue *queue);
* in boards init functions e.g. udc_disconnect() used for
* forced device disconnection from host.
*/
-#elif defined(CONFIG_USB_GADGET_PXA2XX)
-
extern void udc_disconnect(void);
-#endif
-
/*
* board-specific hardware initialization, called by
* usb drivers and u-boot commands
--
2.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v2] usb.h: Always declare usb function prototypes
2015-06-10 15:04 [U-Boot] [PATCH v2] usb.h: Always declare usb function prototypes Hans de Goede
@ 2015-06-19 12:32 ` Marek Vasut
0 siblings, 0 replies; 2+ messages in thread
From: Marek Vasut @ 2015-06-19 12:32 UTC (permalink / raw)
To: u-boot
On Wednesday, June 10, 2015 at 05:04:04 PM, Hans de Goede wrote:
> 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>
Applied, thanks!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-19 12:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 15:04 [U-Boot] [PATCH v2] usb.h: Always declare usb function prototypes Hans de Goede
2015-06-19 12:32 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox