diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 06:56:40 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:13 -0500 |
commit | ca6aafd82f547f57be6689c0fd19f5a630dcf720 (patch) | |
tree | 53a56682c103e78b750909d845d33e3e52925e95 /sound/pci/atiixp_modem.c | |
parent | 25135fdcd2b6d3829e3b44560f0b680b7739d988 (diff) |
ALSA: atiixp-modem: 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/atiixp_modem.c')
-rw-r--r-- | sound/pci/atiixp_modem.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 2b3244a85cf8..b9dc96c5d21e 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -400,7 +400,7 @@ static int snd_atiixp_acquire_codec(struct atiixp_modem *chip) | |||
400 | 400 | ||
401 | while (atiixp_read(chip, PHYS_OUT_ADDR) & ATI_REG_PHYS_OUT_ADDR_EN) { | 401 | while (atiixp_read(chip, PHYS_OUT_ADDR) & ATI_REG_PHYS_OUT_ADDR_EN) { |
402 | if (! timeout--) { | 402 | if (! timeout--) { |
403 | snd_printk(KERN_WARNING "atiixp-modem: codec acquire timeout\n"); | 403 | dev_warn(chip->card->dev, "codec acquire timeout\n"); |
404 | return -EBUSY; | 404 | return -EBUSY; |
405 | } | 405 | } |
406 | udelay(1); | 406 | udelay(1); |
@@ -433,7 +433,7 @@ static unsigned short snd_atiixp_codec_read(struct atiixp_modem *chip, | |||
433 | } while (--timeout); | 433 | } while (--timeout); |
434 | /* time out may happen during reset */ | 434 | /* time out may happen during reset */ |
435 | if (reg < 0x7c) | 435 | if (reg < 0x7c) |
436 | snd_printk(KERN_WARNING "atiixp-modem: codec read timeout (reg %x)\n", reg); | 436 | dev_warn(chip->card->dev, "codec read timeout (reg %x)\n", reg); |
437 | return 0xffff; | 437 | return 0xffff; |
438 | } | 438 | } |
439 | 439 | ||
@@ -499,7 +499,7 @@ static int snd_atiixp_aclink_reset(struct atiixp_modem *chip) | |||
499 | msleep(1); | 499 | msleep(1); |
500 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); | 500 | atiixp_update(chip, CMD, ATI_REG_CMD_AC_RESET, ATI_REG_CMD_AC_RESET); |
501 | if (!--timeout) { | 501 | if (!--timeout) { |
502 | snd_printk(KERN_ERR "atiixp-modem: codec reset timeout\n"); | 502 | dev_err(chip->card->dev, "codec reset timeout\n"); |
503 | break; | 503 | break; |
504 | } | 504 | } |
505 | } | 505 | } |
@@ -553,7 +553,7 @@ static int snd_atiixp_codec_detect(struct atiixp_modem *chip) | |||
553 | atiixp_write(chip, IER, 0); /* disable irqs */ | 553 | atiixp_write(chip, IER, 0); /* disable irqs */ |
554 | 554 | ||
555 | if ((chip->codec_not_ready_bits & ALL_CODEC_NOT_READY) == ALL_CODEC_NOT_READY) { | 555 | if ((chip->codec_not_ready_bits & ALL_CODEC_NOT_READY) == ALL_CODEC_NOT_READY) { |
556 | snd_printk(KERN_ERR "atiixp-modem: no codec detected!\n"); | 556 | dev_err(chip->card->dev, "no codec detected!\n"); |
557 | return -ENXIO; | 557 | return -ENXIO; |
558 | } | 558 | } |
559 | return 0; | 559 | return 0; |
@@ -624,7 +624,7 @@ static snd_pcm_uframes_t snd_atiixp_pcm_pointer(struct snd_pcm_substream *substr | |||
624 | continue; | 624 | continue; |
625 | return bytes_to_frames(runtime, curptr); | 625 | return bytes_to_frames(runtime, curptr); |
626 | } | 626 | } |
627 | snd_printd("atiixp-modem: invalid DMA pointer read 0x%x (buf=%x)\n", | 627 | dev_dbg(chip->card->dev, "invalid DMA pointer read 0x%x (buf=%x)\n", |
628 | readl(chip->remap_addr + dma->ops->dt_cur), dma->buf_addr); | 628 | readl(chip->remap_addr + dma->ops->dt_cur), dma->buf_addr); |
629 | return 0; | 629 | return 0; |
630 | } | 630 | } |
@@ -637,7 +637,7 @@ static void snd_atiixp_xrun_dma(struct atiixp_modem *chip, | |||
637 | { | 637 | { |
638 | if (! dma->substream || ! dma->running) | 638 | if (! dma->substream || ! dma->running) |
639 | return; | 639 | return; |
640 | snd_printdd("atiixp-modem: XRUN detected (DMA %d)\n", dma->ops->type); | 640 | dev_dbg(chip->card->dev, "XRUN detected (DMA %d)\n", dma->ops->type); |
641 | snd_pcm_stream_lock(dma->substream); | 641 | snd_pcm_stream_lock(dma->substream); |
642 | snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); | 642 | snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN); |
643 | snd_pcm_stream_unlock(dma->substream); | 643 | snd_pcm_stream_unlock(dma->substream); |
@@ -1098,14 +1098,15 @@ static int snd_atiixp_mixer_new(struct atiixp_modem *chip, int clock) | |||
1098 | ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE; | 1098 | ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE; |
1099 | if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { | 1099 | if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { |
1100 | chip->ac97[i] = NULL; /* to be sure */ | 1100 | chip->ac97[i] = NULL; /* to be sure */ |
1101 | snd_printdd("atiixp-modem: codec %d not available for modem\n", i); | 1101 | dev_dbg(chip->card->dev, |
1102 | "codec %d not available for modem\n", i); | ||
1102 | continue; | 1103 | continue; |
1103 | } | 1104 | } |
1104 | codec_count++; | 1105 | codec_count++; |
1105 | } | 1106 | } |
1106 | 1107 | ||
1107 | if (! codec_count) { | 1108 | if (! codec_count) { |
1108 | snd_printk(KERN_ERR "atiixp-modem: no codec available\n"); | 1109 | dev_err(chip->card->dev, "no codec available\n"); |
1109 | return -ENODEV; | 1110 | return -ENODEV; |
1110 | } | 1111 | } |
1111 | 1112 | ||
@@ -1150,8 +1151,7 @@ static int snd_atiixp_resume(struct device *dev) | |||
1150 | pci_set_power_state(pci, PCI_D0); | 1151 | pci_set_power_state(pci, PCI_D0); |
1151 | pci_restore_state(pci); | 1152 | pci_restore_state(pci); |
1152 | if (pci_enable_device(pci) < 0) { | 1153 | if (pci_enable_device(pci) < 0) { |
1153 | printk(KERN_ERR "atiixp-modem: pci_enable_device failed, " | 1154 | dev_err(dev, "pci_enable_device failed, disabling device\n"); |
1154 | "disabling device\n"); | ||
1155 | snd_card_disconnect(card); | 1155 | snd_card_disconnect(card); |
1156 | return -EIO; | 1156 | return -EIO; |
1157 | } | 1157 | } |
@@ -1262,14 +1262,14 @@ static int snd_atiixp_create(struct snd_card *card, | |||
1262 | chip->addr = pci_resource_start(pci, 0); | 1262 | chip->addr = pci_resource_start(pci, 0); |
1263 | chip->remap_addr = pci_ioremap_bar(pci, 0); | 1263 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
1264 | if (chip->remap_addr == NULL) { | 1264 | if (chip->remap_addr == NULL) { |
1265 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); | 1265 | dev_err(card->dev, "AC'97 space ioremap problem\n"); |
1266 | snd_atiixp_free(chip); | 1266 | snd_atiixp_free(chip); |
1267 | return -EIO; | 1267 | return -EIO; |
1268 | } | 1268 | } |
1269 | 1269 | ||
1270 | if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED, | 1270 | if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_SHARED, |
1271 | KBUILD_MODNAME, chip)) { | 1271 | KBUILD_MODNAME, chip)) { |
1272 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1272 | dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); |
1273 | snd_atiixp_free(chip); | 1273 | snd_atiixp_free(chip); |
1274 | return -EBUSY; | 1274 | return -EBUSY; |
1275 | } | 1275 | } |