summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-01-29 20:39:02 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-21 09:37:30 -0700
commit3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2 (patch)
tree292a6e3a21e237789c91a8d0ccd021321990a265 /drivers/base
parent190e8370b8033f746db5289e9324174564a6f5a7 (diff)
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index e11c8c3e7416..cf507a7d200c 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -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);