diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2006-07-03 03:25:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 18:27:08 -0400 |
commit | 933a2efc59513551dcfa7b814752dc581bd3c60b (patch) | |
tree | 6c97a7bff4100759dfa9ae5d198b341f1e4996ae /sound | |
parent | d8371f0481fd1ad2701081d37815b0bb5d236b92 (diff) |
[PATCH] lockdep: annotate sound/core/seq/seq_device.c
The ops structure has complex locking rules, where not all ops are equal, some
are subordinate on others for some complex sound cards. This requires for
lockdep checking that each individual reg_mutex is considered in separation
for its locking rules.
Has no effect on non-lockdep kernels.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/seq/seq_device.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index d812dc886360..4260de90f36f 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c | |||
@@ -380,6 +380,12 @@ static struct ops_list * create_driver(char *id) | |||
380 | /* set up driver entry */ | 380 | /* set up driver entry */ |
381 | strlcpy(ops->id, id, sizeof(ops->id)); | 381 | strlcpy(ops->id, id, sizeof(ops->id)); |
382 | mutex_init(&ops->reg_mutex); | 382 | mutex_init(&ops->reg_mutex); |
383 | /* | ||
384 | * The ->reg_mutex locking rules are per-driver, so we create | ||
385 | * separate per-driver lock classes: | ||
386 | */ | ||
387 | lockdep_set_class(&ops->reg_mutex, (struct lock_class_key *)id); | ||
388 | |||
383 | ops->driver = DRIVER_EMPTY; | 389 | ops->driver = DRIVER_EMPTY; |
384 | INIT_LIST_HEAD(&ops->dev_list); | 390 | INIT_LIST_HEAD(&ops->dev_list); |
385 | /* lock this instance */ | 391 | /* lock this instance */ |