diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 08:08:22 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:14 -0500 |
commit | 02c33520b35fe7a910028f9e678a311a4d1ad103 (patch) | |
tree | 87b00ab1722491320fe6e7c11e31f574c6f08b8d /sound/pci/bt87x.c | |
parent | 4a8d9d717f9498fb80f8e34d5c779a2bf62379f1 (diff) |
ALSA: bt87x: 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/bt87x.c')
-rw-r--r-- | sound/pci/bt87x.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 06dc7d97cc0c..8546711d12f9 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -293,17 +293,23 @@ static void snd_bt87x_pci_error(struct snd_bt87x *chip, unsigned int status) | |||
293 | PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY; | 293 | PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY; |
294 | pci_write_config_word(chip->pci, PCI_STATUS, pci_status); | 294 | pci_write_config_word(chip->pci, PCI_STATUS, pci_status); |
295 | if (pci_status != PCI_STATUS_DETECTED_PARITY) | 295 | if (pci_status != PCI_STATUS_DETECTED_PARITY) |
296 | snd_printk(KERN_ERR "Aieee - PCI error! status %#08x, PCI status %#04x\n", | 296 | dev_err(chip->card->dev, |
297 | "Aieee - PCI error! status %#08x, PCI status %#04x\n", | ||
297 | status & ERROR_INTERRUPTS, pci_status); | 298 | status & ERROR_INTERRUPTS, pci_status); |
298 | else { | 299 | else { |
299 | snd_printk(KERN_ERR "Aieee - PCI parity error detected!\n"); | 300 | dev_err(chip->card->dev, |
301 | "Aieee - PCI parity error detected!\n"); | ||
300 | /* error 'handling' similar to aic7xxx_pci.c: */ | 302 | /* error 'handling' similar to aic7xxx_pci.c: */ |
301 | chip->pci_parity_errors++; | 303 | chip->pci_parity_errors++; |
302 | if (chip->pci_parity_errors > 20) { | 304 | if (chip->pci_parity_errors > 20) { |
303 | snd_printk(KERN_ERR "Too many PCI parity errors observed.\n"); | 305 | dev_err(chip->card->dev, |
304 | snd_printk(KERN_ERR "Some device on this bus is generating bad parity.\n"); | 306 | "Too many PCI parity errors observed.\n"); |
305 | snd_printk(KERN_ERR "This is an error *observed by*, not *generated by*, this card.\n"); | 307 | dev_err(chip->card->dev, |
306 | snd_printk(KERN_ERR "PCI parity error checking has been disabled.\n"); | 308 | "Some device on this bus is generating bad parity.\n"); |
309 | dev_err(chip->card->dev, | ||
310 | "This is an error *observed by*, not *generated by*, this card.\n"); | ||
311 | dev_err(chip->card->dev, | ||
312 | "PCI parity error checking has been disabled.\n"); | ||
307 | chip->interrupt_mask &= ~(INT_PPERR | INT_RIPERR); | 313 | chip->interrupt_mask &= ~(INT_PPERR | INT_RIPERR); |
308 | snd_bt87x_writel(chip, REG_INT_MASK, chip->interrupt_mask); | 314 | snd_bt87x_writel(chip, REG_INT_MASK, chip->interrupt_mask); |
309 | } | 315 | } |
@@ -323,9 +329,11 @@ static irqreturn_t snd_bt87x_interrupt(int irq, void *dev_id) | |||
323 | 329 | ||
324 | if (irq_status & ERROR_INTERRUPTS) { | 330 | if (irq_status & ERROR_INTERRUPTS) { |
325 | if (irq_status & (INT_FBUS | INT_FTRGT)) | 331 | if (irq_status & (INT_FBUS | INT_FTRGT)) |
326 | snd_printk(KERN_WARNING "FIFO overrun, status %#08x\n", status); | 332 | dev_warn(chip->card->dev, |
333 | "FIFO overrun, status %#08x\n", status); | ||
327 | if (irq_status & INT_OCERR) | 334 | if (irq_status & INT_OCERR) |
328 | snd_printk(KERN_ERR "internal RISC error, status %#08x\n", status); | 335 | dev_err(chip->card->dev, |
336 | "internal RISC error, status %#08x\n", status); | ||
329 | if (irq_status & (INT_PPERR | INT_RIPERR | INT_PABORT)) | 337 | if (irq_status & (INT_PPERR | INT_RIPERR | INT_PABORT)) |
330 | snd_bt87x_pci_error(chip, irq_status); | 338 | snd_bt87x_pci_error(chip, irq_status); |
331 | } | 339 | } |
@@ -747,7 +755,7 @@ static int snd_bt87x_create(struct snd_card *card, | |||
747 | } | 755 | } |
748 | chip->mmio = pci_ioremap_bar(pci, 0); | 756 | chip->mmio = pci_ioremap_bar(pci, 0); |
749 | if (!chip->mmio) { | 757 | if (!chip->mmio) { |
750 | snd_printk(KERN_ERR "cannot remap io memory\n"); | 758 | dev_err(card->dev, "cannot remap io memory\n"); |
751 | err = -ENOMEM; | 759 | err = -ENOMEM; |
752 | goto fail; | 760 | goto fail; |
753 | } | 761 | } |
@@ -762,7 +770,7 @@ static int snd_bt87x_create(struct snd_card *card, | |||
762 | err = request_irq(pci->irq, snd_bt87x_interrupt, IRQF_SHARED, | 770 | err = request_irq(pci->irq, snd_bt87x_interrupt, IRQF_SHARED, |
763 | KBUILD_MODNAME, chip); | 771 | KBUILD_MODNAME, chip); |
764 | if (err < 0) { | 772 | if (err < 0) { |
765 | snd_printk(KERN_ERR "cannot grab irq %d\n", pci->irq); | 773 | dev_err(card->dev, "cannot grab irq %d\n", pci->irq); |
766 | goto fail; | 774 | goto fail; |
767 | } | 775 | } |
768 | chip->irq = pci->irq; | 776 | chip->irq = pci->irq; |
@@ -850,14 +858,15 @@ static int snd_bt87x_detect_card(struct pci_dev *pci) | |||
850 | for (i = 0; i < ARRAY_SIZE(blacklist); ++i) | 858 | for (i = 0; i < ARRAY_SIZE(blacklist); ++i) |
851 | if (blacklist[i].subvendor == pci->subsystem_vendor && | 859 | if (blacklist[i].subvendor == pci->subsystem_vendor && |
852 | blacklist[i].subdevice == pci->subsystem_device) { | 860 | blacklist[i].subdevice == pci->subsystem_device) { |
853 | snd_printdd(KERN_INFO "card %#04x-%#04x:%#04x has no audio\n", | 861 | dev_dbg(&pci->dev, |
862 | "card %#04x-%#04x:%#04x has no audio\n", | ||
854 | pci->device, pci->subsystem_vendor, pci->subsystem_device); | 863 | pci->device, pci->subsystem_vendor, pci->subsystem_device); |
855 | return -EBUSY; | 864 | return -EBUSY; |
856 | } | 865 | } |
857 | 866 | ||
858 | snd_printk(KERN_INFO "unknown card %#04x-%#04x:%#04x\n", | 867 | dev_info(&pci->dev, "unknown card %#04x-%#04x:%#04x\n", |
859 | pci->device, pci->subsystem_vendor, pci->subsystem_device); | 868 | pci->device, pci->subsystem_vendor, pci->subsystem_device); |
860 | snd_printk(KERN_DEBUG "please mail id, board name, and, " | 869 | dev_info(&pci->dev, "please mail id, board name, and, " |
861 | "if it works, the correct digital_rate option to " | 870 | "if it works, the correct digital_rate option to " |
862 | "<alsa-devel@alsa-project.org>\n"); | 871 | "<alsa-devel@alsa-project.org>\n"); |
863 | return SND_BT87X_BOARD_UNKNOWN; | 872 | return SND_BT87X_BOARD_UNKNOWN; |
@@ -925,7 +934,7 @@ static int snd_bt87x_probe(struct pci_dev *pci, | |||
925 | if (err < 0) | 934 | if (err < 0) |
926 | goto _error; | 935 | goto _error; |
927 | } | 936 | } |
928 | snd_printk(KERN_INFO "bt87x%d: Using board %d, %sanalog, %sdigital " | 937 | dev_info(card->dev, "bt87x%d: Using board %d, %sanalog, %sdigital " |
929 | "(rate %d Hz)\n", dev, boardid, | 938 | "(rate %d Hz)\n", dev, boardid, |
930 | chip->board.no_analog ? "no " : "", | 939 | chip->board.no_analog ? "no " : "", |
931 | chip->board.no_digital ? "no " : "", chip->board.dig_rate); | 940 | chip->board.no_digital ? "no " : "", chip->board.dig_rate); |