diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-26 06:13:57 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:33 -0500 |
commit | 4c826c492f151afb2fef9068660c61c27d191a5a (patch) | |
tree | f26a2a74bc1c74b742cfc256d5f9ab85f343b878 | |
parent | 80c19b7513029a5da6542b4f8f22d415d659916d (diff) |
ALSA: vx222: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/vx222/vx222.c | 7 | ||||
-rw-r--r-- | sound/pci/vx222/vx222_ops.c | 19 |
2 files changed, 13 insertions, 13 deletions
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index 4323556c13f8..ff9074d22607 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -170,7 +170,7 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, | |||
170 | 170 | ||
171 | if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_SHARED, | 171 | if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_SHARED, |
172 | KBUILD_MODNAME, chip)) { | 172 | KBUILD_MODNAME, chip)) { |
173 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 173 | dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); |
174 | snd_vx222_free(chip); | 174 | snd_vx222_free(chip); |
175 | return -EBUSY; | 175 | return -EBUSY; |
176 | } | 176 | } |
@@ -228,7 +228,7 @@ static int snd_vx222_probe(struct pci_dev *pci, | |||
228 | 228 | ||
229 | sprintf(card->longname, "%s at 0x%lx & 0x%lx, irq %i", | 229 | sprintf(card->longname, "%s at 0x%lx & 0x%lx, irq %i", |
230 | card->shortname, vx->port[0], vx->port[1], vx->core.irq); | 230 | card->shortname, vx->port[0], vx->port[1], vx->core.irq); |
231 | snd_printdd("%s at 0x%lx & 0x%lx, irq %i\n", | 231 | dev_dbg(card->dev, "%s at 0x%lx & 0x%lx, irq %i\n", |
232 | card->shortname, vx->port[0], vx->port[1], vx->core.irq); | 232 | card->shortname, vx->port[0], vx->port[1], vx->core.irq); |
233 | 233 | ||
234 | #ifdef SND_VX_FW_LOADER | 234 | #ifdef SND_VX_FW_LOADER |
@@ -279,8 +279,7 @@ static int snd_vx222_resume(struct device *dev) | |||
279 | pci_set_power_state(pci, PCI_D0); | 279 | pci_set_power_state(pci, PCI_D0); |
280 | pci_restore_state(pci); | 280 | pci_restore_state(pci); |
281 | if (pci_enable_device(pci) < 0) { | 281 | if (pci_enable_device(pci) < 0) { |
282 | printk(KERN_ERR "vx222: pci_enable_device failed, " | 282 | dev_err(dev, "pci_enable_device failed, disabling device\n"); |
283 | "disabling device\n"); | ||
284 | snd_card_disconnect(card); | 283 | snd_card_disconnect(card); |
285 | return -EIO; | 284 | return -EIO; |
286 | } | 285 | } |
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c index a69e774d0b13..2d1570273e99 100644 --- a/sound/pci/vx222/vx222_ops.c +++ b/sound/pci/vx222/vx222_ops.c | |||
@@ -108,7 +108,7 @@ static void vx2_outb(struct vx_core *chip, int offset, unsigned char val) | |||
108 | { | 108 | { |
109 | outb(val, vx2_reg_addr(chip, offset)); | 109 | outb(val, vx2_reg_addr(chip, offset)); |
110 | /* | 110 | /* |
111 | printk(KERN_DEBUG "outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); | 111 | dev_dbg(chip->card->dev, "outb: %x -> %x\n", val, vx2_reg_addr(chip, offset)); |
112 | */ | 112 | */ |
113 | } | 113 | } |
114 | 114 | ||
@@ -129,7 +129,7 @@ static unsigned int vx2_inl(struct vx_core *chip, int offset) | |||
129 | static void vx2_outl(struct vx_core *chip, int offset, unsigned int val) | 129 | static void vx2_outl(struct vx_core *chip, int offset, unsigned int val) |
130 | { | 130 | { |
131 | /* | 131 | /* |
132 | printk(KERN_DEBUG "outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); | 132 | dev_dbg(chip->card->dev, "outl: %x -> %x\n", val, vx2_reg_addr(chip, offset)); |
133 | */ | 133 | */ |
134 | outl(val, vx2_reg_addr(chip, offset)); | 134 | outl(val, vx2_reg_addr(chip, offset)); |
135 | } | 135 | } |
@@ -173,7 +173,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) | |||
173 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; | 173 | struct snd_vx222 *chip = (struct snd_vx222 *)_chip; |
174 | unsigned int data; | 174 | unsigned int data; |
175 | 175 | ||
176 | snd_printdd("testing xilinx...\n"); | 176 | dev_dbg(_chip->card->dev, "testing xilinx...\n"); |
177 | /* This test uses several write/read sequences on TEST0 and TEST1 bits | 177 | /* This test uses several write/read sequences on TEST0 and TEST1 bits |
178 | * to figure out whever or not the xilinx was correctly loaded | 178 | * to figure out whever or not the xilinx was correctly loaded |
179 | */ | 179 | */ |
@@ -183,7 +183,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) | |||
183 | vx_inl(chip, ISR); | 183 | vx_inl(chip, ISR); |
184 | data = vx_inl(chip, STATUS); | 184 | data = vx_inl(chip, STATUS); |
185 | if ((data & VX_STATUS_VAL_TEST0_MASK) == VX_STATUS_VAL_TEST0_MASK) { | 185 | if ((data & VX_STATUS_VAL_TEST0_MASK) == VX_STATUS_VAL_TEST0_MASK) { |
186 | snd_printdd("bad!\n"); | 186 | dev_dbg(_chip->card->dev, "bad!\n"); |
187 | return -ENODEV; | 187 | return -ENODEV; |
188 | } | 188 | } |
189 | 189 | ||
@@ -192,7 +192,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) | |||
192 | vx_inl(chip, ISR); | 192 | vx_inl(chip, ISR); |
193 | data = vx_inl(chip, STATUS); | 193 | data = vx_inl(chip, STATUS); |
194 | if (! (data & VX_STATUS_VAL_TEST0_MASK)) { | 194 | if (! (data & VX_STATUS_VAL_TEST0_MASK)) { |
195 | snd_printdd("bad! #2\n"); | 195 | dev_dbg(_chip->card->dev, "bad! #2\n"); |
196 | return -ENODEV; | 196 | return -ENODEV; |
197 | } | 197 | } |
198 | 198 | ||
@@ -203,7 +203,7 @@ static int vx2_test_xilinx(struct vx_core *_chip) | |||
203 | vx_inl(chip, ISR); | 203 | vx_inl(chip, ISR); |
204 | data = vx_inl(chip, STATUS); | 204 | data = vx_inl(chip, STATUS); |
205 | if ((data & VX_STATUS_VAL_TEST1_MASK) == VX_STATUS_VAL_TEST1_MASK) { | 205 | if ((data & VX_STATUS_VAL_TEST1_MASK) == VX_STATUS_VAL_TEST1_MASK) { |
206 | snd_printdd("bad! #3\n"); | 206 | dev_dbg(_chip->card->dev, "bad! #3\n"); |
207 | return -ENODEV; | 207 | return -ENODEV; |
208 | } | 208 | } |
209 | 209 | ||
@@ -212,11 +212,11 @@ static int vx2_test_xilinx(struct vx_core *_chip) | |||
212 | vx_inl(chip, ISR); | 212 | vx_inl(chip, ISR); |
213 | data = vx_inl(chip, STATUS); | 213 | data = vx_inl(chip, STATUS); |
214 | if (! (data & VX_STATUS_VAL_TEST1_MASK)) { | 214 | if (! (data & VX_STATUS_VAL_TEST1_MASK)) { |
215 | snd_printdd("bad! #4\n"); | 215 | dev_dbg(_chip->card->dev, "bad! #4\n"); |
216 | return -ENODEV; | 216 | return -ENODEV; |
217 | } | 217 | } |
218 | } | 218 | } |
219 | snd_printdd("ok, xilinx fine.\n"); | 219 | dev_dbg(_chip->card->dev, "ok, xilinx fine.\n"); |
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
@@ -397,7 +397,8 @@ static int vx2_load_xilinx_binary(struct vx_core *chip, const struct firmware *x | |||
397 | i = vx_inl(chip, GPIOC); | 397 | i = vx_inl(chip, GPIOC); |
398 | if (i & 0x0100) | 398 | if (i & 0x0100) |
399 | return 0; | 399 | return 0; |
400 | snd_printk(KERN_ERR "vx222: xilinx test failed after load, GPIOC=0x%x\n", i); | 400 | dev_err(chip->card->dev, |
401 | "xilinx test failed after load, GPIOC=0x%x\n", i); | ||
401 | return -EINVAL; | 402 | return -EINVAL; |
402 | } | 403 | } |
403 | 404 | ||