From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH -next] net: fix compilation NG when !CONFIG_MODULE
Date: Tue, 26 Aug 2008 16:49:48 -0700 [thread overview]
Message-ID: <48B4969C.60707@ct.jp.nec.com> (raw)
In-Reply-To: <20080826184008.6be39f19.sfr@canb.auug.org.au>
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>
---
net/core/dev.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index b0a1ee8..bde9790 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -996,7 +996,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;
@@ -1008,6 +1008,7 @@ void dev_load(struct net *net, const char *name)
if (!dev && capable(CAP_SYS_MODULE))
request_module("%s", name);
}
+#endif
/**
* dev_open - prepare an interface for use.
--
1.5.6
parent reply other threads:[~2008-08-26 23:49 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20080826184008.6be39f19.sfr@canb.auug.org.au>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48B4969C.60707@ct.jp.nec.com \
--to=h-shimamoto@ct.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).