[ALSA] remove unused snd_minor.name field
authorClemens Ladisch <clemens@ladisch.de>
Wed, 5 Jul 2006 09:24:22 +0000 (11:24 +0200)
committerJaroslav Kysela <perex@suse.cz>
Wed, 12 Jul 2006 18:07:55 +0000 (20:07 +0200)
Drop the snd_minor structure's name field that was just a helper for
devfs device deregistration.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
include/sound/core.h
sound/core/sound.c

index 5d184be0ff728d5a0ce7b47d525d9594179d23f5..bab3ff457e40cfa00e21b40f2d9e14fee12f8e07 100644 (file)
@@ -188,8 +188,6 @@ struct snd_minor {
        int device;                     /* device number */
        const struct file_operations *f_ops;    /* file operations */
        void *private_data;             /* private data for f_ops->open */
-       char name[0];                   /* device name (keep at the end of
-                                                               structure) */
 };
 
 /* sound.c */
index 264f2efd1af88ffc26b3b333d08e88a0dd6e19e1..7edd1fc58b1747c20c7f8c65b7815053899949d5 100644 (file)
@@ -244,7 +244,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
        struct device *device = NULL;
 
        snd_assert(name, return -EINVAL);
-       preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
+       preg = kmalloc(sizeof *preg, GFP_KERNEL);
        if (preg == NULL)
                return -ENOMEM;
        preg->type = type;
@@ -252,7 +252,6 @@ int snd_register_device(int type, struct snd_card *card, int dev,
        preg->device = dev;
        preg->f_ops = f_ops;
        preg->private_data = private_data;
-       strcpy(preg->name, name);
        mutex_lock(&sound_mutex);
 #ifdef CONFIG_SND_DYNAMIC_MINORS
        minor = snd_find_free_minor();