[PATCH] w1: Make w1 connector notifications depend on connector.

Make w1 connector notifications depend on connector.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Evgeniy Polyakov 2006-04-03 12:01:12 +04:00 committed by Greg Kroah-Hartman
parent bb5427b546
commit 46e07f6e5e
3 changed files with 14 additions and 8 deletions

View File

@ -3,7 +3,7 @@ menu "Dallas's 1-wire bus"
config W1 config W1
tristate "Dallas's 1-wire support" tristate "Dallas's 1-wire support"
---help--- ---help---
Dallas's 1-wire bus is useful to connect slow 1-pin devices Dallas' 1-wire bus is useful to connect slow 1-pin devices
such as iButtons and thermal sensors. such as iButtons and thermal sensors.
If you want W1 support, you should say Y here. If you want W1 support, you should say Y here.
@ -11,6 +11,18 @@ config W1
This W1 support can also be built as a module. If so, the module This W1 support can also be built as a module. If so, the module
will be called wire.ko. will be called wire.ko.
config W1_CON
depends on CONNECTOR
bool "Userspace communication over connector"
default y
--- help ---
This allows to communicate with userspace using connector [Documentation/connector].
There are three types of messages between w1 core and userspace:
1. Events. They are generated each time new master or slave device found
either due to automatic or requested search.
2. Userspace commands. Includes read/write and search/alarm search comamnds.
3. Replies to userspace commands.
source drivers/w1/masters/Kconfig source drivers/w1/masters/Kconfig
source drivers/w1/slaves/Kconfig source drivers/w1/slaves/Kconfig

View File

@ -2,10 +2,6 @@
# Makefile for the Dallas's 1-wire bus. # Makefile for the Dallas's 1-wire bus.
# #
ifeq ($(CONFIG_CONNECTOR), n)
EXTRA_CFLAGS += -DNETLINK_DISABLED
endif
ifeq ($(CONFIG_W1_DS2433_CRC), y) ifeq ($(CONFIG_W1_DS2433_CRC), y)
EXTRA_CFLAGS += -DCONFIG_W1_F23_CRC EXTRA_CFLAGS += -DCONFIG_W1_F23_CRC
endif endif

View File

@ -27,7 +27,7 @@
#include "w1_log.h" #include "w1_log.h"
#include "w1_netlink.h" #include "w1_netlink.h"
#ifndef NETLINK_DISABLED #if defined(CONFIG_W1_CON) && (defined(CONFIG_CONNECTOR) || (defined(CONFIG_CONNECTOR_MODULE) && defined(CONFIG_W1_MODULE)))
void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
{ {
char buf[sizeof(struct cn_msg) + sizeof(struct w1_netlink_msg)]; char buf[sizeof(struct cn_msg) + sizeof(struct w1_netlink_msg)];
@ -230,8 +230,6 @@ void w1_fini_netlink(void)
cn_del_callback(&w1_id); cn_del_callback(&w1_id);
} }
#else #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) void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
{ {
} }