diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2006-07-05 11:24:22 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-07-12 20:07:55 +0200 |
commit | 562b590d4e838ecaca2cfd246fd4df55dc6db18a (patch) | |
tree | 4579c97b66db2b6031a8a74d6ed49d4600ede3b4 | |
parent | b130807dce4a8f91f9662e93d1aa813d806e14a8 (diff) | |
download | op-kernel-dev-562b590d4e838ecaca2cfd246fd4df55dc6db18a.zip op-kernel-dev-562b590d4e838ecaca2cfd246fd4df55dc6db18a.tar.gz |
[ALSA] remove unused snd_minor.name field
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>
-rw-r--r-- | include/sound/core.h | 2 | ||||
-rw-r--r-- | sound/core/sound.c | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/include/sound/core.h b/include/sound/core.h index 5d184be..bab3ff4 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -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 */ diff --git a/sound/core/sound.c b/sound/core/sound.c index 264f2ef..7edd1fc 100644 --- a/sound/core/sound.c +++ b/sound/core/sound.c @@ -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(); |