]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/w1/w1.c
ide: add ide_dev_is_sata() helper (take 2)
[linux-2.6-omap-h63xx.git] / drivers / w1 / w1.c
index f5c5b760ed7b7d9554b7fc3a7f31ee9fc5b27a4c..8d7ab74170d57944b2f1c68fb94f74bcd21c3519 100644 (file)
@@ -520,7 +520,7 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
        int err;
        struct w1_netlink_msg msg;
 
-       sl = kmalloc(sizeof(struct w1_slave), GFP_KERNEL);
+       sl = kzalloc(sizeof(struct w1_slave), GFP_KERNEL);
        if (!sl) {
                dev_err(&dev->dev,
                         "%s: failed to allocate new slave device.\n",
@@ -528,7 +528,6 @@ static int w1_attach_slave_device(struct w1_master *dev, struct w1_reg_num *rn)
                return -ENOMEM;
        }
 
-       memset(sl, 0, sizeof(*sl));
 
        sl->owner = THIS_MODULE;
        sl->master = dev;
@@ -805,6 +804,7 @@ static int w1_control(void *data)
        struct w1_master *dev, *n;
        int have_to_wait = 0;
 
+       set_freezable();
        while (!kthread_should_stop() || have_to_wait) {
                have_to_wait = 0;