projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
driver core: Add a guard() definition for the device_lock()
[linux-2.6-microblaze.git]
/
include
/
linux
/
device.h
diff --git
a/include/linux/device.h
b/include/linux/device.h
index
d7a72a8
..
6c83294
100644
(file)
--- a/
include/linux/device.h
+++ b/
include/linux/device.h
@@
-1007,6
+1007,8
@@
static inline void device_unlock(struct device *dev)
mutex_unlock(&dev->mutex);
}
+DEFINE_GUARD(device, struct device *, device_lock(_T), device_unlock(_T))
+
static inline void device_lock_assert(struct device *dev)
{
lockdep_assert_held(&dev->mutex);