Commit 562b590d4e838ecaca2cfd246fd4df55dc6db18a
Committed by
Jaroslav Kysela
1 parent
b130807dce
Exists in
master
and in
7 other branches
[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>
Showing 2 changed files with 1 additions and 4 deletions Side-by-side Diff
include/sound/core.h
... | ... | @@ -188,8 +188,6 @@ |
188 | 188 | int device; /* device number */ |
189 | 189 | const struct file_operations *f_ops; /* file operations */ |
190 | 190 | void *private_data; /* private data for f_ops->open */ |
191 | - char name[0]; /* device name (keep at the end of | |
192 | - structure) */ | |
193 | 191 | }; |
194 | 192 | |
195 | 193 | /* sound.c */ |
sound/core/sound.c
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | struct device *device = NULL; |
245 | 245 | |
246 | 246 | snd_assert(name, return -EINVAL); |
247 | - preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL); | |
247 | + preg = kmalloc(sizeof *preg, GFP_KERNEL); | |
248 | 248 | if (preg == NULL) |
249 | 249 | return -ENOMEM; |
250 | 250 | preg->type = type; |
... | ... | @@ -252,7 +252,6 @@ |
252 | 252 | preg->device = dev; |
253 | 253 | preg->f_ops = f_ops; |
254 | 254 | preg->private_data = private_data; |
255 | - strcpy(preg->name, name); | |
256 | 255 | mutex_lock(&sound_mutex); |
257 | 256 | #ifdef CONFIG_SND_DYNAMIC_MINORS |
258 | 257 | minor = snd_find_free_minor(); |