From patchwork Sat Mar 8 18:46:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerhard Sittig X-Patchwork-Id: 328222 X-Patchwork-Delegate: trini@ti.com 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 A5BC92C00D0 for ; Sun, 9 Mar 2014 05:47:55 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0A0EB4B5A8; Sat, 8 Mar 2014 19:47:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 eADOhLxObdNj; Sat, 8 Mar 2014 19:47:53 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22FDA4B5B9; Sat, 8 Mar 2014 19:47:49 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 685344B5A8 for ; Sat, 8 Mar 2014 19:47:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 zN9JsC2OtxXg for ; Sat, 8 Mar 2014 19:47:38 +0100 (CET) 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 mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTPS id AE7274B150 for ; Sat, 8 Mar 2014 19:47:33 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3fhF775pWqz3hhnD; Sat, 8 Mar 2014 19:47:31 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3fhF774KFfzbbcY; Sat, 8 Mar 2014 19:47:31 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id uwdkA_SrTn4s; Sat, 8 Mar 2014 19:47:30 +0100 (CET) X-Auth-Info: rJ6RUeNSjo49F9i2Zfu2PvGvswF/cD7MuZetY36urbw= Received: from localhost (kons-4d03dd2a.pool.mediaWays.net [77.3.221.42]) by mail.mnet-online.de (Postfix) with ESMTPA; Sat, 8 Mar 2014 19:47:30 +0100 (CET) From: Gerhard Sittig To: u-boot@lists.denx.de Date: Sat, 8 Mar 2014 19:46:13 +0100 Message-Id: <1394304378-29962-2-git-send-email-gsi@denx.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394304378-29962-1-git-send-email-gsi@denx.de> References: <1394304378-29962-1-git-send-email-gsi@denx.de> Cc: Marek Vasut , Tom Warren , Tom Rini Subject: [U-Boot] [PATCH v4 1/6] usb: net: don't ifdef routine declarations in usb_ether.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de while compilation of implemented routines and references from calling sites may be optional, declarations in header files should not be unconditionally declare the Asix and SMSC related public USB ethernet driver routines in the usb_ether.h header file Signed-off-by: Gerhard Sittig Acked-by: Simon Glass Acked-by: Marek Vasut --- Changes in v4: None Changes in v3: - pick up Simon's ACKs for individual patches Changes in v2: - introduced the "no #ifdef for prototypes" patch include/usb_ether.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/usb_ether.h b/include/usb_ether.h index 678c9dff2524..011ead7a364e 100644 --- a/include/usb_ether.h +++ b/include/usb_ether.h @@ -40,23 +40,19 @@ struct ueth_data { }; /* - * Function definitions for each USB ethernet driver go here, bracketed by - * #ifdef CONFIG_USB_ETHER_xxx...#endif + * Function definitions for each USB ethernet driver go here + * (declaration is unconditional, compilation is conditional) */ -#ifdef CONFIG_USB_ETHER_ASIX void asix_eth_before_probe(void); int asix_eth_probe(struct usb_device *dev, unsigned int ifnum, struct ueth_data *ss); int asix_eth_get_info(struct usb_device *dev, struct ueth_data *ss, struct eth_device *eth); -#endif -#ifdef CONFIG_USB_ETHER_SMSC95XX void smsc95xx_eth_before_probe(void); int smsc95xx_eth_probe(struct usb_device *dev, unsigned int ifnum, struct ueth_data *ss); int smsc95xx_eth_get_info(struct usb_device *dev, struct ueth_data *ss, struct eth_device *eth); -#endif #endif /* __USB_ETHER_H__ */