Skip to content

Commit

Permalink
[ALSA] remove unused snd_minor.name field
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Jul 12, 2006
1 parent b130807 commit 562b590
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions sound/core/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,14 @@ 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;
preg->card = card ? card->number : -1;
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();
Expand Down

0 comments on commit 562b590

Please sign in to comment.