diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-26 12:18:27 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 16:45:33 +0100 |
commit | 6436bcf6a4a35ae83af9ff3c250435e5fd001205 (patch) | |
tree | 80596d7621f295d11733f1e26b7d0cee6b730695 /sound/pci/ymfpci/ymfpci.c | |
parent | 4c826c492f151afb2fef9068660c61c27d191a5a (diff) | |
download | op-kernel-dev-6436bcf6a4a35ae83af9ff3c250435e5fd001205.zip op-kernel-dev-6436bcf6a4a35ae83af9ff3c250435e5fd001205.tar.gz |
ALSA: ymfpci: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ymfpci/ymfpci.c')
-rw-r--r-- | sound/pci/ymfpci/ymfpci.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index 6ff4ea3..82eed16 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c @@ -106,7 +106,8 @@ static int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, break; } if (!r) { - printk(KERN_ERR "ymfpci: no gameport ports available\n"); + dev_err(chip->card->dev, + "no gameport ports available\n"); return -EBUSY; } } @@ -116,19 +117,22 @@ static int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, case 0x204: legacy_ctrl2 |= 2 << 6; break; case 0x205: legacy_ctrl2 |= 3 << 6; break; default: - printk(KERN_ERR "ymfpci: invalid joystick port %#x", io_port); + dev_err(chip->card->dev, + "invalid joystick port %#x", io_port); return -EINVAL; } } if (!r && !(r = request_region(io_port, 1, "YMFPCI gameport"))) { - printk(KERN_ERR "ymfpci: joystick port %#x is in use.\n", io_port); + dev_err(chip->card->dev, + "joystick port %#x is in use.\n", io_port); return -EBUSY; } chip->gameport = gp = gameport_allocate_port(); if (!gp) { - printk(KERN_ERR "ymfpci: cannot allocate memory for gameport\n"); + dev_err(chip->card->dev, + "cannot allocate memory for gameport\n"); release_and_free_resource(r); return -ENOMEM; } @@ -314,7 +318,9 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci, MPU401_INFO_INTEGRATED | MPU401_INFO_IRQ_HOOK, -1, &chip->rawmidi)) < 0) { - printk(KERN_WARNING "ymfpci: cannot initialize MPU401 at 0x%lx, skipping...\n", mpu_port[dev]); + dev_warn(card->dev, + "cannot initialize MPU401 at 0x%lx, skipping...\n", + mpu_port[dev]); legacy_ctrl &= ~YMFPCI_LEGACY_MIEN; /* disable MPU401 irq */ pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl); } @@ -324,12 +330,14 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci, fm_port[dev], fm_port[dev] + 2, OPL3_HW_OPL3, 1, &opl3)) < 0) { - printk(KERN_WARNING "ymfpci: cannot initialize FM OPL3 at 0x%lx, skipping...\n", fm_port[dev]); + dev_warn(card->dev, + "cannot initialize FM OPL3 at 0x%lx, skipping...\n", + fm_port[dev]); legacy_ctrl &= ~YMFPCI_LEGACY_FMEN; pci_write_config_word(pci, PCIR_DSXG_LEGACY, legacy_ctrl); } else if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL)) < 0) { snd_card_free(card); - snd_printk(KERN_ERR "cannot create opl3 hwdep\n"); + dev_err(card->dev, "cannot create opl3 hwdep\n"); return err; } } |