Commit 4c826c49 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: vx222: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 80c19b75
...@@ -170,7 +170,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, ...@@ -170,7 +170,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci,
if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_SHARED, if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_SHARED,
KBUILD_MODNAME, chip)) { KBUILD_MODNAME, chip)) {
snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
snd_vx222_free(chip); snd_vx222_free(chip);
return -EBUSY; return -EBUSY;
} }
...@@ -228,7 +228,7 @@ static int snd_vx222_probe(struct pci_dev *pci, ...@@ -228,7 +228,7 @@ static int snd_vx222_probe(struct pci_dev *pci,
sprintf(card->longname, "%s at 0x%lx & 0x%lx, irq %i", sprintf(card->longname, "%s at 0x%lx & 0x%lx, irq %i",
card->shortname, vx->port[0], vx->port[1], vx->core.irq); card->shortname, vx->port[0], vx->port[1], vx->core.irq);
snd_printdd("%s at 0x%lx & 0x%lx, irq %i\n", dev_dbg(card->dev, "%s at 0x%lx & 0x%lx, irq %i\n",
card->shortname, vx->port[0], vx->port[1], vx->core.irq); card->shortname, vx->port[0], vx->port[1], vx->core.irq);
#ifdef SND_VX_FW_LOADER #ifdef SND_VX_FW_LOADER
...@@ -279,8 +279,7 @@ static int snd_vx222_resume(struct device *dev) ...@@ -279,8 +279,7 @@ static int snd_vx222_resume(struct device *dev)
pci_set_power_state(pci, PCI_D0); pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci); pci_restore_state(pci);
if (pci_enable_device(pci) < 0) { if (pci_enable_device(pci) < 0) {
printk(KERN_ERR "vx222: pci_enable_device failed, " dev_err(dev, "pci_enable_device failed, disabling device\n");
"disabling device\n");
snd_card_disconnect(card); snd_card_disconnect(card);
return -EIO; return -EIO;
} }
......
...@@ -108,7 +108,7 @@ static void vx2_outb(struct vx_core *chip, int offset, unsigned char val) ...@@ -108,7 +108,7 @@ static void vx2_outb(struct vx_core *chip, int offset, unsigned char val)
{ {
outb(val, vx2_reg_addr(chip, offset)); outb(val, vx2_reg_addr(chip, offset));
/* /*
printk(KERN_DEBUG "outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); dev_dbg(chip->card->dev, "outb: %x -> %x\n", val, vx2_reg_addr(chip, offset));
*/ */
} }
...@@ -129,7 +129,7 @@ static unsigned int vx2_inl(struct vx_core *chip, int offset) ...@@ -129,7 +129,7 @@ static unsigned int vx2_inl(struct vx_core *chip, int offset)
static void vx2_outl(struct vx_core *chip, int offset, unsigned int val) static void vx2_outl(struct vx_core *chip, int offset, unsigned int val)
{ {
/* /*
printk(KERN_DEBUG "outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); dev_dbg(chip->card->dev, "outl: %x -> %x\n", val, vx2_reg_addr(chip, offset));
*/ */
outl(val, vx2_reg_addr(chip, offset)); outl(val, vx2_reg_addr(chip, offset));
} }
...@@ -173,7 +173,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) ...@@ -173,7 +173,7 @@ static int vx2_test_xilinx(struct vx_core *_chip)
struct snd_vx222 *chip = (struct snd_vx222 *)_chip; struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
unsigned int data; unsigned int data;
snd_printdd("testing xilinx...\n"); dev_dbg(_chip->card->dev, "testing xilinx...\n");
/* This test uses several write/read sequences on TEST0 and TEST1 bits /* This test uses several write/read sequences on TEST0 and TEST1 bits
* to figure out whever or not the xilinx was correctly loaded * to figure out whever or not the xilinx was correctly loaded
*/ */
...@@ -183,7 +183,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) ...@@ -183,7 +183,7 @@ static int vx2_test_xilinx(struct vx_core *_chip)
vx_inl(chip, ISR); vx_inl(chip, ISR);
data = vx_inl(chip, STATUS); data = vx_inl(chip, STATUS);
if ((data & VX_STATUS_VAL_TEST0_MASK) == VX_STATUS_VAL_TEST0_MASK) { if ((data & VX_STATUS_VAL_TEST0_MASK) == VX_STATUS_VAL_TEST0_MASK) {
snd_printdd("bad!\n"); dev_dbg(_chip->card->dev, "bad!\n");
return -ENODEV; return -ENODEV;
} }
...@@ -192,7 +192,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) ...@@ -192,7 +192,7 @@ static int vx2_test_xilinx(struct vx_core *_chip)
vx_inl(chip, ISR); vx_inl(chip, ISR);
data = vx_inl(chip, STATUS); data = vx_inl(chip, STATUS);
if (! (data & VX_STATUS_VAL_TEST0_MASK)) { if (! (data & VX_STATUS_VAL_TEST0_MASK)) {
snd_printdd("bad! #2\n"); dev_dbg(_chip->card->dev, "bad! #2\n");
return -ENODEV; return -ENODEV;
} }
...@@ -203,7 +203,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) ...@@ -203,7 +203,7 @@ static int vx2_test_xilinx(struct vx_core *_chip)
vx_inl(chip, ISR); vx_inl(chip, ISR);
data = vx_inl(chip, STATUS); data = vx_inl(chip, STATUS);
if ((data & VX_STATUS_VAL_TEST1_MASK) == VX_STATUS_VAL_TEST1_MASK) { if ((data & VX_STATUS_VAL_TEST1_MASK) == VX_STATUS_VAL_TEST1_MASK) {
snd_printdd("bad! #3\n"); dev_dbg(_chip->card->dev, "bad! #3\n");
return -ENODEV; return -ENODEV;
} }
...@@ -212,11 +212,11 @@ static int vx2_test_xilinx(struct vx_core *_chip) ...@@ -212,11 +212,11 @@ static int vx2_test_xilinx(struct vx_core *_chip)
vx_inl(chip, ISR); vx_inl(chip, ISR);
data = vx_inl(chip, STATUS); data = vx_inl(chip, STATUS);
if (! (data & VX_STATUS_VAL_TEST1_MASK)) { if (! (data & VX_STATUS_VAL_TEST1_MASK)) {
snd_printdd("bad! #4\n"); dev_dbg(_chip->card->dev, "bad! #4\n");
return -ENODEV; return -ENODEV;
} }
} }
snd_printdd("ok, xilinx fine.\n"); dev_dbg(_chip->card->dev, "ok, xilinx fine.\n");
return 0; return 0;
} }
...@@ -397,7 +397,8 @@ static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *x ...@@ -397,7 +397,8 @@ static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *x
i = vx_inl(chip, GPIOC); i = vx_inl(chip, GPIOC);
if (i & 0x0100) if (i & 0x0100)
return 0; return 0;
snd_printk(KERN_ERR "vx222: xilinx test failed after load, GPIOC=0x%x\n", i); dev_err(chip->card->dev,
"xilinx test failed after load, GPIOC=0x%x\n", i);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment