From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 7 Jun 2015 15:05:27 +0200 Subject: [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y In-Reply-To: <1433578882-26480-1-git-send-email-hdegoede@redhat.com> References: <1433578882-26480-1-git-send-email-hdegoede@redhat.com> Message-ID: <201506071505.27608.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Saturday, June 06, 2015 at 10:21:22 AM, Hans de Goede wrote: > When CONFIG_DM_USB=y the various usb functions are available regardless of > any controller drivers being enabled, so always the usb function prototypes > when CONFIG_DM_USB=y. > > 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 > --- > include/usb.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/usb.h b/include/usb.h > index c709ce2..54ad33a 100644 > --- a/include/usb.h > +++ b/include/usb.h > @@ -180,7 +180,7 @@ enum usb_init_type { > 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) > + defined(CONFIG_USB_EMUL) || defined(CONFIG_DM_USB) What would happen in case we instead dropped this horrible ifdef altogether, do you think it'd break anything ? > int usb_lowlevel_init(int index, enum usb_init_type init, void > **controller); int usb_lowlevel_stop(int index); Best regards, Marek Vasut