All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 6/14] [PATCH] w1: Make w1 connector notifications depend on connector.
Date: Thu, 22 Jun 2006 11:27:10 -0700	[thread overview]
Message-ID: <11510008583492-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11510008553417-git-send-email-greg@kroah.com>

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

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>
---
 drivers/w1/Kconfig      |   14 +++++++++++++-
 drivers/w1/Makefile     |    4 ----
 drivers/w1/w1_netlink.c |    4 +---
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig
index 5e61ed5..0c6c435 100644
--- a/drivers/w1/Kconfig
+++ b/drivers/w1/Kconfig
@@ -3,7 +3,7 @@ menu "Dallas's 1-wire bus"
 config W1
 	tristate "Dallas's 1-wire support"
 	---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.
 
 	  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
 	  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/slaves/Kconfig
 
diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile
index f0465c2..93845a2 100644
--- a/drivers/w1/Makefile
+++ b/drivers/w1/Makefile
@@ -2,10 +2,6 @@ #
 # Makefile for the Dallas's 1-wire bus.
 #
 
-ifeq ($(CONFIG_CONNECTOR), n)
-EXTRA_CFLAGS	+= -DNETLINK_DISABLED
-endif
-
 ifeq ($(CONFIG_W1_DS2433_CRC), y)
 EXTRA_CFLAGS	+= -DCONFIG_W1_F23_CRC
 endif
diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index d48f3ac..d539e09 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -27,7 +27,7 @@ #include "w1.h"
 #include "w1_log.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)
 {
 	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);
 }
 #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)
 {
 }
-- 
1.4.0


  reply	other threads:[~2006-06-22 18:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-22 18:26 [GIT PATCH] W1 patches for 2.6.17 Greg KH
2006-06-22 18:27 ` [PATCH 1/14] [PATCH] w1: Added default generic read/write operations Greg KH
2006-06-22 18:27   ` [PATCH 2/14] [PATCH] w1: Replace dscore and ds_w1_bridge with ds2490 driver Greg KH
2006-06-22 18:27     ` [PATCH 3/14] [PATCH] w1: Userspace communication protocol over connector Greg KH
2006-06-22 18:27       ` [PATCH 4/14] [PATCH] w1: Move w1-connector definitions into linux/include/connector.h Greg KH
2006-06-22 18:27         ` [PATCH 5/14] [PATCH] w1: netlink: Mark netlink group 1 as unused Greg KH
2006-06-22 18:27           ` Greg KH [this message]
2006-06-22 18:27             ` [PATCH 7/14] [PATCH] w1: Use mutexes instead of semaphores Greg KH
2006-06-22 18:27               ` [PATCH 8/14] [PATCH] w1 exports Greg KH
2006-06-22 18:27                 ` [PATCH 9/14] [PATCH] W1: cleanups Greg KH
2006-06-22 18:27                   ` [PATCH 10/14] [PATCH] W1: possible cleanups Greg KH
2006-06-22 18:27                     ` [PATCH 11/14] [PATCH] W1: fix dependencies of W1_SLAVE_DS2433_CRC Greg KH
2006-06-22 18:27                       ` [PATCH 12/14] [PATCH] drivers/w1/w1.c: fix a compile error Greg KH
2006-06-22 18:27                         ` [PATCH 13/14] [PATCH] w1: clean up W1_CON dependency Greg KH
2006-06-22 18:27                           ` [PATCH 14/14] [PATCH] w1: warning fix Greg KH

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=11510008583492-git-send-email-greg@kroah.com \
    --to=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.