diff options
author | Konstantin Baydarov <kbaidarov@ru.mvista.com> | 2005-10-27 11:25:02 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-11-04 07:20:26 -0500 |
commit | 708f997169d5674177450f25ef3ac6b4f2562690 (patch) | |
tree | 1c1fe8dded6390d9d5336ecea7928509bf33ce8f /sound | |
parent | 6d6f9156209892bc0cdc3354394ac947db5e32f1 (diff) |
[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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mips/au1x00.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index 2df78a64c7f2..d08a42b24b1f 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c | |||
@@ -472,7 +472,7 @@ snd_au1000_ac97_read(ac97_t *ac97, unsigned short reg) | |||
472 | u32 volatile cmd; | 472 | u32 volatile cmd; |
473 | u16 volatile data; | 473 | u16 volatile data; |
474 | int i; | 474 | int i; |
475 | spin_lock(au1000->ac97_lock); | 475 | spin_lock(&au1000->ac97_lock); |
476 | /* would rather use the interupt than this polling but it works and I can't | 476 | /* would rather use the interupt than this polling but it works and I can't |
477 | get the interupt driven case to work efficiently */ | 477 | get the interupt driven case to work efficiently */ |
478 | for (i = 0; i < 0x5000; i++) | 478 | for (i = 0; i < 0x5000; i++) |
@@ -495,7 +495,7 @@ get the interupt driven case to work efficiently */ | |||
495 | } | 495 | } |
496 | 496 | ||
497 | data = au1000->ac97_ioport->cmd & 0xffff; | 497 | data = au1000->ac97_ioport->cmd & 0xffff; |
498 | spin_unlock(au1000->ac97_lock); | 498 | spin_unlock(&au1000->ac97_lock); |
499 | 499 | ||
500 | return data; | 500 | return data; |
501 | 501 | ||
@@ -507,7 +507,7 @@ snd_au1000_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) | |||
507 | { | 507 | { |
508 | u32 cmd; | 508 | u32 cmd; |
509 | int i; | 509 | int i; |
510 | spin_lock(au1000->ac97_lock); | 510 | spin_lock(&au1000->ac97_lock); |
511 | /* would rather use the interupt than this polling but it works and I can't | 511 | /* would rather use the interupt than this polling but it works and I can't |
512 | get the interupt driven case to work efficiently */ | 512 | get the interupt driven case to work efficiently */ |
513 | for (i = 0; i < 0x5000; i++) | 513 | for (i = 0; i < 0x5000; i++) |
@@ -520,7 +520,7 @@ get the interupt driven case to work efficiently */ | |||
520 | cmd &= ~AC97C_READ; | 520 | cmd &= ~AC97C_READ; |
521 | cmd |= ((u32) val << AC97C_WD_BIT); | 521 | cmd |= ((u32) val << AC97C_WD_BIT); |
522 | au1000->ac97_ioport->cmd = cmd; | 522 | au1000->ac97_ioport->cmd = cmd; |
523 | spin_unlock(au1000->ac97_lock); | 523 | spin_unlock(&au1000->ac97_lock); |
524 | } | 524 | } |
525 | static void | 525 | static void |
526 | snd_au1000_ac97_free(ac97_t *ac97) | 526 | snd_au1000_ac97_free(ac97_t *ac97) |