]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/seq/seq_device.c
[PATCH] lockdep: annotate sound/core/seq/seq_device.c
[linux-2.6-omap-h63xx.git] / sound / core / seq / seq_device.c
index d9a3e5a18d6ad0ae3ef60ec3f82e2adedba71315..4260de90f36fb39468d7a623649f7f7486a4ab9c 100644 (file)
@@ -80,7 +80,7 @@ static LIST_HEAD(opslist);
 static int num_ops;
 static DEFINE_MUTEX(ops_mutex);
 #ifdef CONFIG_PROC_FS
-static struct snd_info_entry *info_entry = NULL;
+static struct snd_info_entry *info_entry;
 #endif
 
 /*
@@ -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 */
@@ -555,7 +561,6 @@ static int __init alsa_seq_device_init(void)
        if (info_entry == NULL)
                return -ENOMEM;
        info_entry->content = SNDRV_INFO_CONTENT_TEXT;
-       info_entry->c.text.read_size = 2048;
        info_entry->c.text.read = snd_seq_device_info;
        if (snd_info_register(info_entry) < 0) {
                snd_info_free_entry(info_entry);