mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
[ALSA] AMD Au1x00 driver: buggy spinlocks
Modules: MIPS AU1x00 driver AMD Au1x00 ALSA driver fails compilation with the alternate spinlock implementation because it doesn't do locking/unlocking correctly in some places (passes spinlock by value). Signed-off-by: Konstantin Baydarov <kbaidarov@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
6d6f915620
commit
708f997169
1 changed files with 4 additions and 4 deletions
|
@ -472,7 +472,7 @@ snd_au1000_ac97_read(ac97_t *ac97, unsigned short reg)
|
||||||
u32 volatile cmd;
|
u32 volatile cmd;
|
||||||
u16 volatile data;
|
u16 volatile data;
|
||||||
int i;
|
int i;
|
||||||
spin_lock(au1000->ac97_lock);
|
spin_lock(&au1000->ac97_lock);
|
||||||
/* would rather use the interupt than this polling but it works and I can't
|
/* would rather use the interupt than this polling but it works and I can't
|
||||||
get the interupt driven case to work efficiently */
|
get the interupt driven case to work efficiently */
|
||||||
for (i = 0; i < 0x5000; i++)
|
for (i = 0; i < 0x5000; i++)
|
||||||
|
@ -495,7 +495,7 @@ get the interupt driven case to work efficiently */
|
||||||
}
|
}
|
||||||
|
|
||||||
data = au1000->ac97_ioport->cmd & 0xffff;
|
data = au1000->ac97_ioport->cmd & 0xffff;
|
||||||
spin_unlock(au1000->ac97_lock);
|
spin_unlock(&au1000->ac97_lock);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ snd_au1000_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val)
|
||||||
{
|
{
|
||||||
u32 cmd;
|
u32 cmd;
|
||||||
int i;
|
int i;
|
||||||
spin_lock(au1000->ac97_lock);
|
spin_lock(&au1000->ac97_lock);
|
||||||
/* would rather use the interupt than this polling but it works and I can't
|
/* would rather use the interupt than this polling but it works and I can't
|
||||||
get the interupt driven case to work efficiently */
|
get the interupt driven case to work efficiently */
|
||||||
for (i = 0; i < 0x5000; i++)
|
for (i = 0; i < 0x5000; i++)
|
||||||
|
@ -520,7 +520,7 @@ get the interupt driven case to work efficiently */
|
||||||
cmd &= ~AC97C_READ;
|
cmd &= ~AC97C_READ;
|
||||||
cmd |= ((u32) val << AC97C_WD_BIT);
|
cmd |= ((u32) val << AC97C_WD_BIT);
|
||||||
au1000->ac97_ioport->cmd = cmd;
|
au1000->ac97_ioport->cmd = cmd;
|
||||||
spin_unlock(au1000->ac97_lock);
|
spin_unlock(&au1000->ac97_lock);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
snd_au1000_ac97_free(ac97_t *ac97)
|
snd_au1000_ac97_free(ac97_t *ac97)
|
||||||
|
|
Loading…
Reference in a new issue