mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
3142788b79
commit
1704f47b50
4 changed files with 25 additions and 0 deletions
|
|
@ -559,6 +559,7 @@ void device_initialize(struct device *dev)
|
|||
kobject_init(&dev->kobj, &device_ktype);
|
||||
INIT_LIST_HEAD(&dev->dma_pools);
|
||||
mutex_init(&dev->mutex);
|
||||
lockdep_set_novalidate_class(&dev->mutex);
|
||||
spin_lock_init(&dev->devres_lock);
|
||||
INIT_LIST_HEAD(&dev->devres_head);
|
||||
device_pm_init(dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue