From patchwork Sat Jun 6 08:21:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 481620 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 153AD140213 for ; Sat, 6 Jun 2015 18:21:41 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BED834B6B1; Sat, 6 Jun 2015 10:21:37 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cdtw8jpqlWg4; Sat, 6 Jun 2015 10:21:37 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0B1114B69E; Sat, 6 Jun 2015 10:21:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A0334B69E for ; Sat, 6 Jun 2015 10:21:33 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id olfKWj6MjNie for ; Sat, 6 Jun 2015 10:21:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by theia.denx.de (Postfix) with ESMTPS id B37D94B69C for ; Sat, 6 Jun 2015 10:21:28 +0200 (CEST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 545232E120E; Sat, 6 Jun 2015 08:21:26 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-5-207.ams2.redhat.com [10.36.5.207]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t568LN23026223; Sat, 6 Jun 2015 04:21:23 -0400 From: Hans de Goede To: Simon Glass , Marek Vasut Date: Sat, 6 Jun 2015 10:21:22 +0200 Message-Id: <1433578882-26480-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] dm: usb.h: Always declare usb func. prototypes when CONFIG_DM_USB=y X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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) int usb_lowlevel_init(int index, enum usb_init_type init, void **controller); int usb_lowlevel_stop(int index);