diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-17 17:56:43 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-17 17:56:43 +0200 |
commit | 43f82216f0bd114599f4a221ae6924f3658a0c9a (patch) | |
tree | 89dbd85a0a1882ae38e6b61e360b365c018195fd /kernel/lockdep.c | |
parent | Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/... (diff) | |
parent | Input: fm801-gp - handle errors from pci_enable_device() (diff) | |
download | linux-43f82216f0bd114599f4a221ae6924f3658a0c9a.tar.xz linux-43f82216f0bd114599f4a221ae6924f3658a0c9a.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: fm801-gp - handle errors from pci_enable_device()
Input: gameport core - handle errors returned by device_bind_driver()
Input: serio core - handle errors returned by device_bind_driver()
Lockdep: fix compile error in drivers/input/serio/serio.c
Input: serio - add lockdep annotations
Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass()
Input: atkbd - supress "too many keys" error message
Input: i8042 - supress ACK/NAKs when blinking during panic
Input: add missing exports to fix modular build
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index d1a3b2cfe4a9..b739be2a6dc9 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -1176,7 +1176,7 @@ look_up_lock_class(struct lockdep_map *lock, unsigned int subclass) * itself, so actual lookup of the hash should be once per lock object. */ static inline struct lock_class * -register_lock_class(struct lockdep_map *lock, unsigned int subclass) +register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force) { struct lockdep_subclass_key *key; struct list_head *hash_head; @@ -1248,7 +1248,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass) out_unlock_set: __raw_spin_unlock(&hash_lock); - if (!subclass) + if (!subclass || force) lock->class_cache = class; DEBUG_LOCKS_WARN_ON(class->subclass != subclass); @@ -1936,7 +1936,7 @@ void trace_softirqs_off(unsigned long ip) * Initialize a lock instance's lock-class mapping info: */ void lockdep_init_map(struct lockdep_map *lock, const char *name, - struct lock_class_key *key) + struct lock_class_key *key, int subclass) { if (unlikely(!debug_locks)) return; @@ -1956,6 +1956,8 @@ void lockdep_init_map(struct lockdep_map *lock, const char *name, lock->name = name; lock->key = key; lock->class_cache = NULL; + if (subclass) + register_lock_class(lock, subclass, 1); } EXPORT_SYMBOL_GPL(lockdep_init_map); @@ -1994,7 +1996,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, * Not cached yet or subclass? */ if (unlikely(!class)) { - class = register_lock_class(lock, subclass); + class = register_lock_class(lock, subclass, 0); if (!class) return 0; } |