Commit 73c0d39f authored by Evgeniy Polyakov's avatar Evgeniy Polyakov Committed by Greg Kroah-Hartman

[PATCH] W1: let W1 select NET.

On Wed, 2004-08-25 at 23:41, Greg KH wrote:
> On Wed, Aug 25, 2004 at 11:21:29PM +0400, Evgeniy Polyakov wrote:
> > On Wed, 25 Aug 2004 10:49:12 -0700
> > Greg KH <greg@kroah.com> wrote:
> >
> > > On Fri, Aug 13, 2004 at 02:35:40PM +0400, Evgeniy Polyakov wrote:
> > > > The patch below fixes this issue by letting W1 select NET.
> > > >
> > > > Patch was created by Adrian Bunk <bunk@fs.tum.de>.
> > >
> > > Nah, I'm going to hold off on this, it's not really needed (who
> > > doesn't build with NET enabled...)
> >
> > Hmmm, but someone really may want to build it without NET support.
> > I have an idea(I thought it out exactly for the case when you do not
> > apply it) to disable networking(netlink) support in compilation time if
> > CONFIG_NET is not defined.
> > And add some warning like:
> >
> > #ifndef CONFIG_NET
> > #warning Netlink support is disabled.
> > #endif
>
> That sounds like a good fix.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent f9b873da
......@@ -2,6 +2,10 @@
# Makefile for the Dallas's 1-wire bus.
#
ifneq ($(CONFIG_NET), y)
EXTRA_CFLAGS += -DNETLINK_DISABLED
endif
obj-$(CONFIG_W1) += wire.o
wire-objs := w1.o w1_int.o w1_family.o w1_netlink.o w1_io.o
......
......@@ -26,6 +26,7 @@
#include "w1_log.h"
#include "w1_netlink.h"
#ifndef NETLINK_DISABLED
void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
{
unsigned int size;
......@@ -53,3 +54,10 @@ void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
nlmsg_failure:
return;
}
#else
#warning Netlink support is disabled. Please compile with NET support enabled.
void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
{
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment