Skip to content

Commit

Permalink
[PATCH] lockdep: annotate sound/core/seq/seq_device.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Jul 3, 2006
1 parent d8371f0 commit 933a2ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/core/seq/seq_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ static struct ops_list * create_driver(char *id)
/* set up driver entry */
strlcpy(ops->id, id, sizeof(ops->id));
mutex_init(&ops->reg_mutex);
/*
* The ->reg_mutex locking rules are per-driver, so we create
* separate per-driver lock classes:
*/
lockdep_set_class(&ops->reg_mutex, (struct lock_class_key *)id);

ops->driver = DRIVER_EMPTY;
INIT_LIST_HEAD(&ops->dev_list);
/* lock this instance */
Expand Down

0 comments on commit 933a2ef

Please sign in to comment.