aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-12 14:40:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-12 14:40:50 -0500
commit6eb7365db6f3a4a9d8d9922bb0b800f9cbaad641 (patch)
tree02eb4f5aa46cefae0cbfe195b9578b87f3db96a1 /sound/isa
parent9c3936cb694ffd559c80dc3eb75b61f769a39259 (diff)
parent84a3bd061c1974aea4b14b954e518ce144e407c6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Overwrite pin config on intel DG45ID board. intelhdmi - dont power off HDA link ALSA: hrtimer - Fix lock-up ALSA: intelhdmi - add channel mapping for typical configurations ALSA: intelhdmi - channel mapping applies to Pin ALSA: intelhdmi - accept DisplayPort pin ALSA: hda - show HBR(High Bit Rate) pin cap in procfs ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs ASoC: Fix build of OMAP sound drivers ALSA: opti93x: fix irq releasing if the irq cannot be allocated
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 106be6e471f7..c8a8da0d4036 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -548,10 +548,13 @@ __skip_mpu:
548 548
549static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id) 549static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id)
550{ 550{
551 struct snd_wss *codec = dev_id; 551 struct snd_opti9xx *chip = dev_id;
552 struct snd_opti9xx *chip = codec->card->private_data; 552 struct snd_wss *codec = chip->codec;
553 unsigned char status; 553 unsigned char status;
554 554
555 if (!codec)
556 return IRQ_HANDLED;
557
555 status = snd_opti9xx_read(chip, OPTi9XX_MC_REG(11)); 558 status = snd_opti9xx_read(chip, OPTi9XX_MC_REG(11));
556 if ((status & OPTi93X_IRQ_PLAYBACK) && codec->playback_substream) 559 if ((status & OPTi93X_IRQ_PLAYBACK) && codec->playback_substream)
557 snd_pcm_period_elapsed(codec->playback_substream); 560 snd_pcm_period_elapsed(codec->playback_substream);
@@ -691,10 +694,9 @@ static void snd_card_opti9xx_free(struct snd_card *card)
691 694
692 if (chip) { 695 if (chip) {
693#ifdef OPTi93X 696#ifdef OPTi93X
694 struct snd_wss *codec = chip->codec; 697 if (chip->irq > 0) {
695 if (codec && codec->irq > 0) { 698 disable_irq(chip->irq);
696 disable_irq(codec->irq); 699 free_irq(chip->irq, chip);
697 free_irq(codec->irq, codec);
698 } 700 }
699 release_and_free_resource(chip->res_mc_indir); 701 release_and_free_resource(chip->res_mc_indir);
700#endif 702#endif
@@ -759,9 +761,9 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
759#endif 761#endif
760#ifdef OPTi93X 762#ifdef OPTi93X
761 error = request_irq(irq, snd_opti93x_interrupt, 763 error = request_irq(irq, snd_opti93x_interrupt,
762 IRQF_DISABLED, DEV_NAME" - WSS", codec); 764 IRQF_DISABLED, DEV_NAME" - WSS", chip);
763 if (error < 0) { 765 if (error < 0) {
764 snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); 766 snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", irq);
765 return error; 767 return error;
766 } 768 }
767#endif 769#endif