X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sound%2Fmips%2Fau1x00.c;h=d08a42b24b1f847a43b54203da326aaa45d7c35e;hb=a9931a6e37c09f6b76a9fa0cbd777c335548692b;hp=3f9684f1d1d2a24e1fe7cbcf24f98d3a4ca3a5a7;hpb=9189674026e86e624b1ef1b4eb430e9ad19f9641;p=linux-2.6 diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c index 3f9684f1d1..d08a42b24b 100644 --- a/sound/mips/au1x00.c +++ b/sound/mips/au1x00.c @@ -57,8 +57,6 @@ MODULE_CLASSES("{sound}"); MODULE_DEVICES("{{AMD,Au1000 AC'97}}"); #endif -#define chip_t au1000_t - #define PLAYBACK 0 #define CAPTURE 1 #define AC97_SLOT_3 0x01 @@ -474,7 +472,7 @@ snd_au1000_ac97_read(ac97_t *ac97, unsigned short reg) u32 volatile cmd; u16 volatile data; 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 get the interupt driven case to work efficiently */ for (i = 0; i < 0x5000; i++) @@ -497,7 +495,7 @@ get the interupt driven case to work efficiently */ } data = au1000->ac97_ioport->cmd & 0xffff; - spin_unlock(au1000->ac97_lock); + spin_unlock(&au1000->ac97_lock); return data; @@ -509,7 +507,7 @@ snd_au1000_ac97_write(ac97_t *ac97, unsigned short reg, unsigned short val) { u32 cmd; 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 get the interupt driven case to work efficiently */ for (i = 0; i < 0x5000; i++) @@ -522,7 +520,7 @@ get the interupt driven case to work efficiently */ cmd &= ~AC97C_READ; cmd |= ((u32) val << AC97C_WD_BIT); au1000->ac97_ioport->cmd = cmd; - spin_unlock(au1000->ac97_lock); + spin_unlock(&au1000->ac97_lock); } static void snd_au1000_ac97_free(ac97_t *ac97) @@ -606,8 +604,7 @@ snd_au1000_free(snd_card_t *card) /* put internal AC97 block into reset */ au1000->ac97_ioport->cntrl = AC97C_RS; au1000->ac97_ioport = NULL; - release_resource(au1000->ac97_res_port); - kfree_nocheck(au1000->ac97_res_port); + release_and_free_resource(au1000->ac97_res_port); } if (au1000->stream[PLAYBACK]->dma >= 0)