aboutsummaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/sound.c3
-rw-r--r--sound/core/timer.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 264f2efd1af..7edd1fc58b1 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();
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 78199f58b93..0a984e881c1 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -628,8 +628,9 @@ static void snd_timer_tasklet(unsigned long arg)
struct snd_timer_instance *ti;
struct list_head *p;
unsigned long resolution, ticks;
+ unsigned long flags;
- spin_lock(&timer->lock);
+ spin_lock_irqsave(&timer->lock, flags);
/* now process all callbacks */
while (!list_empty(&timer->sack_list_head)) {
p = timer->sack_list_head.next; /* get first item */
@@ -649,7 +650,7 @@ static void snd_timer_tasklet(unsigned long arg)
spin_lock(&timer->lock);
ti->flags &= ~SNDRV_TIMER_IFLG_CALLBACK;
}
- spin_unlock(&timer->lock);
+ spin_unlock_irqrestore(&timer->lock, flags);
}
/*