aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2006-04-03 04:01:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-22 14:22:50 -0400
commit46e07f6e5eb0e465e086b8f485f4238bd453e3e9 (patch)
tree3ec2810e889f2938ba6811e8c717c1cde2e69eea
parentbb5427b5466782ba0bbf56a4ed752e08b65a5d08 (diff)
[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>
-rw-r--r--drivers/w1/Kconfig14
-rw-r--r--drivers/w1/Makefile4
-rw-r--r--drivers/w1/w1_netlink.c4
3 files changed, 14 insertions, 8 deletions
diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig
index 5e61ed59a41e..0c6c4359bf7b 100644
--- a/drivers/w1/Kconfig
+++ b/drivers/w1/Kconfig
@@ -3,7 +3,7 @@ menu "Dallas's 1-wire bus"
3config W1 3config W1
4 tristate "Dallas's 1-wire support" 4 tristate "Dallas's 1-wire support"
5 ---help--- 5 ---help---
6 Dallas's 1-wire bus is useful to connect slow 1-pin devices 6 Dallas' 1-wire bus is useful to connect slow 1-pin devices
7 such as iButtons and thermal sensors. 7 such as iButtons and thermal sensors.
8 8
9 If you want W1 support, you should say Y here. 9 If you want W1 support, you should say Y here.
@@ -11,6 +11,18 @@ config W1
11 This W1 support can also be built as a module. If so, the module 11 This W1 support can also be built as a module. If so, the module
12 will be called wire.ko. 12 will be called wire.ko.
13 13
14config W1_CON
15 depends on CONNECTOR
16 bool "Userspace communication over connector"
17 default y
18 --- help ---
19 This allows to communicate with userspace using connector [Documentation/connector].
20 There are three types of messages between w1 core and userspace:
21 1. Events. They are generated each time new master or slave device found
22 either due to automatic or requested search.
23 2. Userspace commands. Includes read/write and search/alarm search comamnds.
24 3. Replies to userspace commands.
25
14source drivers/w1/masters/Kconfig 26source drivers/w1/masters/Kconfig
15source drivers/w1/slaves/Kconfig 27source drivers/w1/slaves/Kconfig
16 28
diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile
index f0465c20a675..93845a2c7c21 100644
--- a/drivers/w1/Makefile
+++ b/drivers/w1/Makefile
@@ -2,10 +2,6 @@
2# Makefile for the Dallas's 1-wire bus. 2# Makefile for the Dallas's 1-wire bus.
3# 3#
4 4
5ifeq ($(CONFIG_CONNECTOR), n)
6EXTRA_CFLAGS += -DNETLINK_DISABLED
7endif
8
9ifeq ($(CONFIG_W1_DS2433_CRC), y) 5ifeq ($(CONFIG_W1_DS2433_CRC), y)
10EXTRA_CFLAGS += -DCONFIG_W1_F23_CRC 6EXTRA_CFLAGS += -DCONFIG_W1_F23_CRC
11endif 7endif
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index d48f3acdb8a2..d539e09aad37 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -27,7 +27,7 @@
27#include "w1_log.h" 27#include "w1_log.h"
28#include "w1_netlink.h" 28#include "w1_netlink.h"
29 29
30#ifndef NETLINK_DISABLED 30#if defined(CONFIG_W1_CON) && (defined(CONFIG_CONNECTOR) || (defined(CONFIG_CONNECTOR_MODULE) && defined(CONFIG_W1_MODULE)))
31void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) 31void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
32{ 32{
33 char buf[sizeof(struct cn_msg) + sizeof(struct w1_netlink_msg)]; 33 char buf[sizeof(struct cn_msg) + sizeof(struct w1_netlink_msg)];
@@ -230,8 +230,6 @@ void w1_fini_netlink(void)
230 cn_del_callback(&w1_id); 230 cn_del_callback(&w1_id);
231} 231}
232#else 232#else
233#warning Netlink support is disabled. Please compile with NET support enabled.
234
235void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) 233void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
236{ 234{
237} 235}