Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[safe/jmp/linux-2.6] / drivers / ieee1394 / nodemgr.c
index a6d55be..1835021 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/bitmap.h>
 #include <linux/kernel.h>
+#include <linux/kmemcheck.h>
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -18,7 +19,6 @@
 #include <linux/moduleparam.h>
 #include <linux/mutex.h>
 #include <linux/freezer.h>
-#include <linux/semaphore.h>
 #include <asm/atomic.h>
 
 #include "csr.h"
@@ -39,7 +39,10 @@ struct nodemgr_csr_info {
        struct hpsb_host *host;
        nodeid_t nodeid;
        unsigned int generation;
+
+       kmemcheck_bitfield_begin(flags);
        unsigned int speed_unverified:1;
+       kmemcheck_bitfield_end(flags);
 };
 
 
@@ -1293,6 +1296,7 @@ static void nodemgr_node_scan_one(struct hpsb_host *host,
        u8 *speed;
 
        ci = kmalloc(sizeof(*ci), GFP_KERNEL);
+       kmemcheck_annotate_bitfield(ci, flags);
        if (!ci)
                return;
 
@@ -1392,9 +1396,9 @@ static int update_pdrv(struct device *dev, void *data)
                        pdrv = container_of(drv, struct hpsb_protocol_driver,
                                            driver);
                        if (pdrv->update) {
-                               down(&ud->device.sem);
+                               device_lock(&ud->device);
                                error = pdrv->update(ud);
-                               up(&ud->device.sem);
+                               device_unlock(&ud->device);
                        }
                        if (error)
                                device_release_driver(&ud->device);