diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
| commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
| tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /sound/arm | |
| parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
| parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) | |
Merge branch 'linus'
Diffstat (limited to 'sound/arm')
| -rw-r--r-- | sound/arm/aaci.c | 10 | ||||
| -rw-r--r-- | sound/arm/aaci.h | 2 | ||||
| -rw-r--r-- | sound/arm/pxa2xx-ac97.c | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 149feb410654..5f22d70fefc0 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
| @@ -73,7 +73,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned | |||
| 73 | if (ac97->num >= 4) | 73 | if (ac97->num >= 4) |
| 74 | return; | 74 | return; |
| 75 | 75 | ||
| 76 | down(&aaci->ac97_sem); | 76 | mutex_lock(&aaci->ac97_sem); |
| 77 | 77 | ||
| 78 | aaci_ac97_select_codec(aaci, ac97); | 78 | aaci_ac97_select_codec(aaci, ac97); |
| 79 | 79 | ||
| @@ -91,7 +91,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned | |||
| 91 | v = readl(aaci->base + AACI_SLFR); | 91 | v = readl(aaci->base + AACI_SLFR); |
| 92 | } while (v & (SLFR_1TXB|SLFR_2TXB)); | 92 | } while (v & (SLFR_1TXB|SLFR_2TXB)); |
| 93 | 93 | ||
| 94 | up(&aaci->ac97_sem); | 94 | mutex_unlock(&aaci->ac97_sem); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | /* | 97 | /* |
| @@ -105,7 +105,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
| 105 | if (ac97->num >= 4) | 105 | if (ac97->num >= 4) |
| 106 | return ~0; | 106 | return ~0; |
| 107 | 107 | ||
| 108 | down(&aaci->ac97_sem); | 108 | mutex_lock(&aaci->ac97_sem); |
| 109 | 109 | ||
| 110 | aaci_ac97_select_codec(aaci, ac97); | 110 | aaci_ac97_select_codec(aaci, ac97); |
| 111 | 111 | ||
| @@ -145,7 +145,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg) | |||
| 145 | v = ~0; | 145 | v = ~0; |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | up(&aaci->ac97_sem); | 148 | mutex_unlock(&aaci->ac97_sem); |
| 149 | return v; | 149 | return v; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| @@ -783,7 +783,7 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev) | |||
| 783 | card->shortname, dev->res.start, dev->irq[0]); | 783 | card->shortname, dev->res.start, dev->irq[0]); |
| 784 | 784 | ||
| 785 | aaci = card->private_data; | 785 | aaci = card->private_data; |
| 786 | init_MUTEX(&aaci->ac97_sem); | 786 | mutex_init(&aaci->ac97_sem); |
| 787 | spin_lock_init(&aaci->lock); | 787 | spin_lock_init(&aaci->lock); |
| 788 | aaci->card = card; | 788 | aaci->card = card; |
| 789 | aaci->dev = dev; | 789 | aaci->dev = dev; |
diff --git a/sound/arm/aaci.h b/sound/arm/aaci.h index 83f73c2505c6..06295190606c 100644 --- a/sound/arm/aaci.h +++ b/sound/arm/aaci.h | |||
| @@ -227,7 +227,7 @@ struct aaci { | |||
| 227 | unsigned int fifosize; | 227 | unsigned int fifosize; |
| 228 | 228 | ||
| 229 | /* AC'97 */ | 229 | /* AC'97 */ |
| 230 | struct semaphore ac97_sem; | 230 | struct mutex ac97_sem; |
| 231 | ac97_bus_t *ac97_bus; | 231 | ac97_bus_t *ac97_bus; |
| 232 | 232 | ||
| 233 | u32 maincr; | 233 | u32 maincr; |
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 3acbc6023d19..599aff8290e8 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
| @@ -25,7 +25,7 @@ | |||
| 25 | #include <sound/initval.h> | 25 | #include <sound/initval.h> |
| 26 | 26 | ||
| 27 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
| 28 | #include <asm/semaphore.h> | 28 | #include <linux/mutex.h> |
| 29 | #include <asm/hardware.h> | 29 | #include <asm/hardware.h> |
| 30 | #include <asm/arch/pxa-regs.h> | 30 | #include <asm/arch/pxa-regs.h> |
| 31 | #include <asm/arch/audio.h> | 31 | #include <asm/arch/audio.h> |
| @@ -33,7 +33,7 @@ | |||
| 33 | #include "pxa2xx-pcm.h" | 33 | #include "pxa2xx-pcm.h" |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | static DECLARE_MUTEX(car_mutex); | 36 | static DEFINE_MUTEX(car_mutex); |
| 37 | static DECLARE_WAIT_QUEUE_HEAD(gsr_wq); | 37 | static DECLARE_WAIT_QUEUE_HEAD(gsr_wq); |
| 38 | static volatile long gsr_bits; | 38 | static volatile long gsr_bits; |
| 39 | 39 | ||
| @@ -52,7 +52,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg | |||
| 52 | unsigned short val = -1; | 52 | unsigned short val = -1; |
| 53 | volatile u32 *reg_addr; | 53 | volatile u32 *reg_addr; |
| 54 | 54 | ||
| 55 | down(&car_mutex); | 55 | mutex_lock(&car_mutex); |
| 56 | 56 | ||
| 57 | /* set up primary or secondary codec space */ | 57 | /* set up primary or secondary codec space */ |
| 58 | reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; | 58 | reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; |
| @@ -79,7 +79,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg | |||
| 79 | /* but we've just started another cycle... */ | 79 | /* but we've just started another cycle... */ |
| 80 | wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1); | 80 | wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1); |
| 81 | 81 | ||
| 82 | out: up(&car_mutex); | 82 | out: mutex_unlock(&car_mutex); |
| 83 | return val; | 83 | return val; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -87,7 +87,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne | |||
| 87 | { | 87 | { |
| 88 | volatile u32 *reg_addr; | 88 | volatile u32 *reg_addr; |
| 89 | 89 | ||
| 90 | down(&car_mutex); | 90 | mutex_lock(&car_mutex); |
| 91 | 91 | ||
| 92 | /* set up primary or secondary codec space */ | 92 | /* set up primary or secondary codec space */ |
| 93 | reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; | 93 | reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; |
| @@ -101,7 +101,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne | |||
| 101 | printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n", | 101 | printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n", |
| 102 | __FUNCTION__, reg, GSR | gsr_bits); | 102 | __FUNCTION__, reg, GSR | gsr_bits); |
| 103 | 103 | ||
| 104 | up(&car_mutex); | 104 | mutex_unlock(&car_mutex); |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | static void pxa2xx_ac97_reset(struct snd_ac97 *ac97) | 107 | static void pxa2xx_ac97_reset(struct snd_ac97 *ac97) |
