]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/w1/w1_netlink.c
kbuild: fix some minor typoes
[linux-2.6-omap-h63xx.git] / drivers / w1 / w1_netlink.c
index d48f3acdb8a298470b182665945eabbf29c85007..65c5ebd0787e0ea4840ab73db3af612443d3d7b2 100644 (file)
@@ -27,7 +27,7 @@
 #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)];
@@ -171,7 +171,7 @@ static void w1_cn_callback(void *data)
                        goto out_cont;
                }
 
-               down(&dev->mutex);
+               mutex_lock(&dev->mutex);
 
                if (sl && w1_reset_select_slave(sl)) {
                        err = -ENODEV;
@@ -198,7 +198,7 @@ out_up:
                atomic_dec(&dev->refcnt);
                if (sl)
                        atomic_dec(&sl->refcnt);
-               up(&dev->mutex);
+               mutex_unlock(&dev->mutex);
 out_cont:
                msg->len -= sizeof(struct w1_netlink_msg) + m->len;
                m = (struct w1_netlink_msg *)(((u8 *)m) + sizeof(struct w1_netlink_msg) + m->len);
@@ -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)
 {
 }