aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pcmcia/pdaudiocf/pdaudiocf_core.c')
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf_core.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
index ea0adfb984ad..d724ab0653cf 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
@@ -162,9 +162,8 @@ struct snd_pdacf *snd_pdacf_create(struct snd_card *card)
162 if (chip == NULL) 162 if (chip == NULL)
163 return NULL; 163 return NULL;
164 chip->card = card; 164 chip->card = card;
165 spin_lock_init(&chip->reg_lock); 165 mutex_init(&chip->reg_lock);
166 spin_lock_init(&chip->ak4117_lock); 166 spin_lock_init(&chip->ak4117_lock);
167 tasklet_init(&chip->tq, pdacf_tasklet, (unsigned long)chip);
168 card->private_data = chip; 167 card->private_data = chip;
169 168
170 pdacf_proc_init(chip); 169 pdacf_proc_init(chip);
@@ -174,19 +173,18 @@ struct snd_pdacf *snd_pdacf_create(struct snd_card *card)
174static void snd_pdacf_ak4117_change(struct ak4117 *ak4117, unsigned char c0, unsigned char c1) 173static void snd_pdacf_ak4117_change(struct ak4117 *ak4117, unsigned char c0, unsigned char c1)
175{ 174{
176 struct snd_pdacf *chip = ak4117->change_callback_private; 175 struct snd_pdacf *chip = ak4117->change_callback_private;
177 unsigned long flags;
178 u16 val; 176 u16 val;
179 177
180 if (!(c0 & AK4117_UNLCK)) 178 if (!(c0 & AK4117_UNLCK))
181 return; 179 return;
182 spin_lock_irqsave(&chip->reg_lock, flags); 180 mutex_lock(&chip->reg_lock);
183 val = chip->regmap[PDAUDIOCF_REG_SCR>>1]; 181 val = chip->regmap[PDAUDIOCF_REG_SCR>>1];
184 if (ak4117->rcs0 & AK4117_UNLCK) 182 if (ak4117->rcs0 & AK4117_UNLCK)
185 val |= PDAUDIOCF_BLUE_LED_OFF; 183 val |= PDAUDIOCF_BLUE_LED_OFF;
186 else 184 else
187 val &= ~PDAUDIOCF_BLUE_LED_OFF; 185 val &= ~PDAUDIOCF_BLUE_LED_OFF;
188 pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, val); 186 pdacf_reg_write(chip, PDAUDIOCF_REG_SCR, val);
189 spin_unlock_irqrestore(&chip->reg_lock, flags); 187 mutex_unlock(&chip->reg_lock);
190} 188}
191 189
192int snd_pdacf_ak4117_create(struct snd_pdacf *chip) 190int snd_pdacf_ak4117_create(struct snd_pdacf *chip)