diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 11:09:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 11:09:02 -0500 |
commit | 8f0cb147b2fb12427bf6abef7fed2b604557a41e (patch) | |
tree | fb5ba437ee74b900fab9686c8c7df18abcd7640b /sound/mips/au1x00.c | |
parent | 8e33ba49765484bc6de3a2f8143733713fa93bc1 (diff) | |
parent | b00e8443c3eece823052d06ae1c7cb797ab0ddf5 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
Diffstat (limited to 'sound/mips/au1x00.c')
-rw-r--r-- | sound/mips/au1x00.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index 3f9684f1d1d2..d08a42b24b1f 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c | |||
@@ -57,8 +57,6 @@ MODULE_CLASSES("{sound}"); | |||
57 | MODULE_DEVICES("{{AMD,Au1000 AC'97}}"); | 57 | MODULE_DEVICES("{{AMD,Au1000 AC'97}}"); |
58 | #endif | 58 | #endif |
59 | 59 | ||
60 | #define chip_t au1000_t | ||
61 | |||
62 | #define PLAYBACK 0 | 60 | #define PLAYBACK 0 |
63 | #define CAPTURE 1 | 61 | #define CAPTURE 1 |
64 | #define AC97_SLOT_3 0x01 | 62 | #define AC97_SLOT_3 0x01 |
@@ -474,7 +472,7 @@ snd_au1000_ac97_read(ac97_t *ac97, unsigned short reg) | |||
474 | u32 volatile cmd; | 472 | u32 volatile cmd; |
475 | u16 volatile data; | 473 | u16 volatile data; |
476 | int i; | 474 | int i; |
477 | spin_lock(au1000->ac97_lock); | 475 | spin_lock(&au1000->ac97_lock); |
478 | /* 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 |
479 | get the interupt driven case to work efficiently */ | 477 | get the interupt driven case to work efficiently */ |
480 | for (i = 0; i < 0x5000; i++) | 478 | for (i = 0; i < 0x5000; i++) |
@@ -497,7 +495,7 @@ get the interupt driven case to work efficiently */ | |||
497 | } | 495 | } |
498 | 496 | ||
499 | data = au1000->ac97_ioport->cmd & 0xffff; | 497 | data = au1000->ac97_ioport->cmd & 0xffff; |
500 | spin_unlock(au1000->ac97_lock); | 498 | spin_unlock(&au1000->ac97_lock); |
501 | 499 | ||
502 | return data; | 500 | return data; |
503 | 501 | ||
@@ -509,7 +507,7 @@ snd_au1000_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) | |||
509 | { | 507 | { |
510 | u32 cmd; | 508 | u32 cmd; |
511 | int i; | 509 | int i; |
512 | spin_lock(au1000->ac97_lock); | 510 | spin_lock(&au1000->ac97_lock); |
513 | /* 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 |
514 | get the interupt driven case to work efficiently */ | 512 | get the interupt driven case to work efficiently */ |
515 | for (i = 0; i < 0x5000; i++) | 513 | for (i = 0; i < 0x5000; i++) |
@@ -522,7 +520,7 @@ get the interupt driven case to work efficiently */ | |||
522 | cmd &= ~AC97C_READ; | 520 | cmd &= ~AC97C_READ; |
523 | cmd |= ((u32) val << AC97C_WD_BIT); | 521 | cmd |= ((u32) val << AC97C_WD_BIT); |
524 | au1000->ac97_ioport->cmd = cmd; | 522 | au1000->ac97_ioport->cmd = cmd; |
525 | spin_unlock(au1000->ac97_lock); | 523 | spin_unlock(&au1000->ac97_lock); |
526 | } | 524 | } |
527 | static void | 525 | static void |
528 | snd_au1000_ac97_free(ac97_t *ac97) | 526 | snd_au1000_ac97_free(ac97_t *ac97) |
@@ -606,8 +604,7 @@ snd_au1000_free(snd_card_t *card) | |||
606 | /* put internal AC97 block into reset */ | 604 | /* put internal AC97 block into reset */ |
607 | au1000->ac97_ioport->cntrl = AC97C_RS; | 605 | au1000->ac97_ioport->cntrl = AC97C_RS; |
608 | au1000->ac97_ioport = NULL; | 606 | au1000->ac97_ioport = NULL; |
609 | release_resource(au1000->ac97_res_port); | 607 | release_and_free_resource(au1000->ac97_res_port); |
610 | kfree_nocheck(au1000->ac97_res_port); | ||
611 | } | 608 | } |
612 | 609 | ||
613 | if (au1000->stream[PLAYBACK]->dma >= 0) | 610 | if (au1000->stream[PLAYBACK]->dma >= 0) |