Commit 46e07f6e5eb0e465e086b8f485f4238bd453e3e9
Committed by
Greg Kroah-Hartman
1 parent
bb5427b546
Exists in
master
and in
7 other branches
[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>
Showing 3 changed files with 14 additions and 8 deletions Side-by-side Diff
drivers/w1/Kconfig
... | ... | @@ -3,13 +3,25 @@ |
3 | 3 | config W1 |
4 | 4 | tristate "Dallas's 1-wire support" |
5 | 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 | 7 | such as iButtons and thermal sensors. |
8 | 8 | |
9 | 9 | If you want W1 support, you should say Y here. |
10 | 10 | |
11 | 11 | This W1 support can also be built as a module. If so, the module |
12 | 12 | will be called wire.ko. |
13 | + | |
14 | +config 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. | |
13 | 25 | |
14 | 26 | source drivers/w1/masters/Kconfig |
15 | 27 | source drivers/w1/slaves/Kconfig |
drivers/w1/Makefile
drivers/w1/w1_netlink.c
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | #include "w1_log.h" |
28 | 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))) | |
31 | 31 | void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) |
32 | 32 | { |
33 | 33 | char buf[sizeof(struct cn_msg) + sizeof(struct w1_netlink_msg)]; |
... | ... | @@ -230,8 +230,6 @@ |
230 | 230 | cn_del_callback(&w1_id); |
231 | 231 | } |
232 | 232 | #else |
233 | -#warning Netlink support is disabled. Please compile with NET support enabled. | |
234 | - | |
235 | 233 | void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg) |
236 | 234 | { |
237 | 235 | } |