diff mbox

[U-Boot,v4,1/6] usb: net: don't ifdef routine declarations in usb_ether.h

Message ID 1394304378-29962-2-git-send-email-gsi@denx.de
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Gerhard Sittig March 8, 2014, 6:46 p.m. UTC
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 <gsi@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
---

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(-)

Comments

Marek Vasut March 8, 2014, 7:35 p.m. UTC | #1
On Saturday, March 08, 2014 at 07:46:13 PM, Gerhard Sittig wrote:
> 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 <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>

Acked-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
Tom Rini March 12, 2014, 9:05 p.m. UTC | #2
On Sat, Mar 08, 2014 at 07:46:13PM +0100, Gerhard Sittig wrote:

> 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 <gsi@denx.de>
> Acked-by: Simon Glass <sjg@chromium.org>
> Acked-by: Marek Vasut <marex@denx.de>

Applied to u-boot/master, thanks!
diff mbox

Patch

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__ */