aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/opl3sa2.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index e8d6e1ac88a8..9c5fce31f06b 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -554,21 +554,27 @@ static int __devinit snd_opl3sa2_mixer(struct snd_card *card)
554#ifdef CONFIG_PM 554#ifdef CONFIG_PM
555static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) 555static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state)
556{ 556{
557 struct snd_opl3sa2 *chip = card->private_data; 557 if (card) {
558 struct snd_opl3sa2 *chip = card->private_data;
558 559
559 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); 560 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
560 chip->wss->suspend(chip->wss); 561 chip->wss->suspend(chip->wss);
561 /* power down */ 562 /* power down */
562 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); 563 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3);
564 }
563 565
564 return 0; 566 return 0;
565} 567}
566 568
567static int snd_opl3sa2_resume(struct snd_card *card) 569static int snd_opl3sa2_resume(struct snd_card *card)
568{ 570{
569 struct snd_opl3sa2 *chip = card->private_data; 571 struct snd_opl3sa2 *chip;
570 int i; 572 int i;
571 573
574 if (!card)
575 return 0;
576
577 chip = card->private_data;
572 /* power up */ 578 /* power up */
573 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); 579 snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0);
574 580