[NET]: Protect device namespace inlines with CONFIG_NET

Include sites should not be bothered by whether
CONFIG_NET is set or not when trying to include
benign files like linux/etherdevice.h et al.

From a report by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2008-03-28 15:53:11 -07:00
parent 0736ffc04e
commit 1567ca7eec
1 changed files with 2 additions and 0 deletions

View File

@ -741,6 +741,7 @@ struct net_device
#define NETDEV_ALIGN 32 #define NETDEV_ALIGN 32
#define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1)
#ifdef CONFIG_NET
/* /*
* Net namespace inlines * Net namespace inlines
*/ */
@ -761,6 +762,7 @@ void dev_net_set(struct net_device *dev, struct net *net)
dev->nd_net = net; dev->nd_net = net;
#endif #endif
} }
#endif
/** /**
* netdev_priv - access network device private data * netdev_priv - access network device private data