aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2010-03-18 20:37:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 12:37:30 -0400
commit1704f47b50b5d9e1b825e43e1baaf2c5897baf03 (patch)
tree60617ff867624f915f75a502f2207de5e586757a /drivers/base
parent3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2 (diff)
lockdep: Add novalidate class for dev->mutex conversion
The conversion of device->sem to device->mutex resulted in lockdep warnings. Create a novalidate class for now until the driver folks come up with separate classes. That way we have at least the basic mutex debugging coverage. Add a checkpatch error so the usage is reserved for device->mutex. [ tglx: checkpatch and compile fix for LOCKDEP=n ] Signed-off-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index cf507a7d200c..4c5be85016b6 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -559,6 +559,7 @@ void device_initialize(struct device *dev)
559 kobject_init(&dev->kobj, &device_ktype); 559 kobject_init(&dev->kobj, &device_ktype);
560 INIT_LIST_HEAD(&dev->dma_pools); 560 INIT_LIST_HEAD(&dev->dma_pools);
561 mutex_init(&dev->mutex); 561 mutex_init(&dev->mutex);
562 lockdep_set_novalidate_class(&dev->mutex);
562 spin_lock_init(&dev->devres_lock); 563 spin_lock_init(&dev->devres_lock);
563 INIT_LIST_HEAD(&dev->devres_head); 564 INIT_LIST_HEAD(&dev->devres_head);
564 device_pm_init(dev); 565 device_pm_init(dev);