All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/8] net: fix compilation NG when !CONFIG_MODULE
@ 2008-09-22 21:50 akpm
  2008-09-23  2:00 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: akpm @ 2008-09-22 21:50 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, h-shimamoto

From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>

  CC      net/core/dev.o
net/core/dev.c:1001: error: redefinition of 'dev_load'
include/linux/netdevice.h:1645: error: previous definition of 'dev_load' was here
make[2]: *** [net/core/dev.o] Error 1

dev_load() is not used when CONFIG_MODULE disabled.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 net/core/dev.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN net/core/dev.c~net-fix-compilation-ng-when-config_module net/core/dev.c
--- a/net/core/dev.c~net-fix-compilation-ng-when-config_module
+++ a/net/core/dev.c
@@ -997,7 +997,7 @@ EXPORT_SYMBOL(netdev_bonding_change);
  *	privileges this function loads the module. If module loading is not
  *	available in this kernel then it becomes a nop.
  */
-
+#ifdef CONFIG_MODULES
 void dev_load(struct net *net, const char *name)
 {
 	struct net_device *dev;
@@ -1009,6 +1009,7 @@ void dev_load(struct net *net, const cha
 	if (!dev && capable(CAP_SYS_MODULE))
 		request_module("%s", name);
 }
+#endif
 
 /**
  *	dev_open	- prepare an interface for use.
_

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-23 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-22 21:50 [patch 1/8] net: fix compilation NG when !CONFIG_MODULE akpm
2008-09-23  2:00 ` David Miller
2008-09-23  4:12   ` Andrew Morton
2008-09-23 15:47     ` Randy.Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.