drivers/base: Convert dev->sem to mutex
The semaphore is semantically a mutex. Convert it to a real mutex and fix up a few places where code was relying on semaphore.h to be included by device.h, as well as the users of the trylock function, as that value is now reversed. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
190e8370b8
commit
3142788b79
@ -20,7 +20,6 @@
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/genhd.h>
|
||||
#include <linux/kallsyms.h>
|
||||
#include <linux/semaphore.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/async.h>
|
||||
|
||||
@ -559,7 +558,7 @@ void device_initialize(struct device *dev)
|
||||
dev->kobj.kset = devices_kset;
|
||||
kobject_init(&dev->kobj, &device_ktype);
|
||||
INIT_LIST_HEAD(&dev->dma_pools);
|
||||
init_MUTEX(&dev->sem);
|
||||
mutex_init(&dev->mutex);
|
||||
spin_lock_init(&dev->devres_lock);
|
||||
INIT_LIST_HEAD(&dev->devres_head);
|
||||
device_pm_init(dev);
|
||||
|
Reference in New Issue
Block a user