Merge branch 'topic/cs423x-merge' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2009 23:35:59 +0000 (00:35 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Mar 2009 23:35:59 +0000 (00:35 +0100)
1  2 
sound/isa/opl3sa2.c

diff --combined sound/isa/opl3sa2.c
index 63e51373ddc793f0a80ffe5ecf0eda20b4849293,e8d6e1ac88a84c0cfdf0ac0442992a95c104aa34..9c5fce31f06bdb2e61d9b8ce8fcdacba0bbe6f26
@@@ -179,12 -179,13 +179,13 @@@ static unsigned char __snd_opl3sa2_read
        unsigned char result;
  #if 0
        outb(0x1d, port);       /* password */
-       printk("read [0x%lx] = 0x%x\n", port, inb(port));
+       printk(KERN_DEBUG "read [0x%lx] = 0x%x\n", port, inb(port));
  #endif
        outb(reg, chip->port);  /* register */
        result = inb(chip->port + 1);
  #if 0
-       printk("read [0x%lx] = 0x%x [0x%x]\n", port, result, inb(port));
+       printk(KERN_DEBUG "read [0x%lx] = 0x%x [0x%x]\n",
+              port, result, inb(port));
  #endif
        return result;
  }
@@@ -233,7 -234,10 +234,10 @@@ static int __devinit snd_opl3sa2_detect
                snd_printk(KERN_ERR PFX "can't grab port 0x%lx\n", port);
                return -EBUSY;
        }
-       // snd_printk("REG 0A = 0x%x\n", snd_opl3sa2_read(chip, 0x0a));
+       /*
+       snd_printk(KERN_DEBUG "REG 0A = 0x%x\n",
+                  snd_opl3sa2_read(chip, 0x0a));
+       */
        chip->version = 0;
        tmp = snd_opl3sa2_read(chip, OPL3SA2_MISC);
        if (tmp == 0xff) {
@@@ -550,27 -554,21 +554,27 @@@ static int __devinit snd_opl3sa2_mixer(
  #ifdef CONFIG_PM
  static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state)
  {
 -      struct snd_opl3sa2 *chip = card->private_data;
 +      if (card) {
 +              struct snd_opl3sa2 *chip = card->private_data;
  
 -      snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 -      chip->wss->suspend(chip->wss);
 -      /* power down */
 -      snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3);
 +              snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 +              chip->wss->suspend(chip->wss);
 +              /* power down */
 +              snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3);
 +      }
  
        return 0;
  }
  
  static int snd_opl3sa2_resume(struct snd_card *card)
  {
 -      struct snd_opl3sa2 *chip = card->private_data;
 +      struct snd_opl3sa2 *chip;
        int i;
  
 +      if (!card)
 +              return 0;
 +
 +      chip = card->private_data;
        /* power up */
        snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0);