[U-Boot] [PATCH v3 1/6] usb: eth: don't ifdef routine declarations in usb_ether.h
Gerhard Sittig
gsi at denx.de
Fri Feb 21 18:32:48 CET 2014
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
Cc: Simon Glass <sjg at chromium.org>
Acked-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Gerhard Sittig <gsi at denx.de>
---
v3 changes:
- record Simon's ACK
v2 introduced this patch
v1 did not have this 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__ */
--
1.7.10.4
More information about the U-Boot
mailing list