[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200809222150.m8MLoZdf031857@imap1.linux-foundation.org>
Date: Mon, 22 Sep 2008 14:50:35 -0700
From: akpm@...ux-foundation.org
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org,
h-shimamoto@...jp.nec.com
Subject: [patch 1/8] net: fix compilation NG when !CONFIG_MODULE
From: Hiroshi Shimamoto <h-shimamoto@...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@...jp.nec.com>
Signed-off-by: Andrew Morton <akpm@...ux-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.
_
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists