diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 08:37:14 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:18 -0500 |
commit | f493e7bcaa313870c2b3b94dfae3e5cb5a863565 (patch) | |
tree | f8005851f7c79b4a99a1577ab4c8a63e90f1573d /sound/pci/intel8x0.c | |
parent | 9c7f9abf62169bb6546faeb61846bdfca63673bd (diff) |
ALSA: intel8x0: 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/intel8x0.c')
-rw-r--r-- | sound/pci/intel8x0.c | 86 |
1 files changed, 49 insertions, 37 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index ff24acf06bdd..68340d7df76d 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -547,7 +547,8 @@ static int snd_intel8x0_codec_semaphore(struct intel8x0 *chip, unsigned int code | |||
547 | /* access to some forbidden (non existent) ac97 registers will not | 547 | /* access to some forbidden (non existent) ac97 registers will not |
548 | * reset the semaphore. So even if you don't get the semaphore, still | 548 | * reset the semaphore. So even if you don't get the semaphore, still |
549 | * continue the access. We don't need the semaphore anyway. */ | 549 | * continue the access. We don't need the semaphore anyway. */ |
550 | snd_printk(KERN_ERR "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n", | 550 | dev_err(chip->card->dev, |
551 | "codec_semaphore: semaphore is not ready [0x%x][0x%x]\n", | ||
551 | igetbyte(chip, ICHREG(ACC_SEMA)), igetdword(chip, ICHREG(GLOB_STA))); | 552 | igetbyte(chip, ICHREG(ACC_SEMA)), igetdword(chip, ICHREG(GLOB_STA))); |
552 | iagetword(chip, 0); /* clear semaphore flag */ | 553 | iagetword(chip, 0); /* clear semaphore flag */ |
553 | /* I don't care about the semaphore */ | 554 | /* I don't care about the semaphore */ |
@@ -562,7 +563,9 @@ static void snd_intel8x0_codec_write(struct snd_ac97 *ac97, | |||
562 | 563 | ||
563 | if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) { | 564 | if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) { |
564 | if (! chip->in_ac97_init) | 565 | if (! chip->in_ac97_init) |
565 | snd_printk(KERN_ERR "codec_write %d: semaphore is not ready for register 0x%x\n", ac97->num, reg); | 566 | dev_err(chip->card->dev, |
567 | "codec_write %d: semaphore is not ready for register 0x%x\n", | ||
568 | ac97->num, reg); | ||
566 | } | 569 | } |
567 | iaputword(chip, reg + ac97->num * 0x80, val); | 570 | iaputword(chip, reg + ac97->num * 0x80, val); |
568 | } | 571 | } |
@@ -576,7 +579,9 @@ static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97, | |||
576 | 579 | ||
577 | if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) { | 580 | if (snd_intel8x0_codec_semaphore(chip, ac97->num) < 0) { |
578 | if (! chip->in_ac97_init) | 581 | if (! chip->in_ac97_init) |
579 | snd_printk(KERN_ERR "codec_read %d: semaphore is not ready for register 0x%x\n", ac97->num, reg); | 582 | dev_err(chip->card->dev, |
583 | "codec_read %d: semaphore is not ready for register 0x%x\n", | ||
584 | ac97->num, reg); | ||
580 | res = 0xffff; | 585 | res = 0xffff; |
581 | } else { | 586 | } else { |
582 | res = iagetword(chip, reg + ac97->num * 0x80); | 587 | res = iagetword(chip, reg + ac97->num * 0x80); |
@@ -585,7 +590,9 @@ static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97, | |||
585 | iputdword(chip, ICHREG(GLOB_STA), tmp & | 590 | iputdword(chip, ICHREG(GLOB_STA), tmp & |
586 | ~(chip->codec_ready_bits | ICH_GSCI)); | 591 | ~(chip->codec_ready_bits | ICH_GSCI)); |
587 | if (! chip->in_ac97_init) | 592 | if (! chip->in_ac97_init) |
588 | snd_printk(KERN_ERR "codec_read %d: read timeout for register 0x%x\n", ac97->num, reg); | 593 | dev_err(chip->card->dev, |
594 | "codec_read %d: read timeout for register 0x%x\n", | ||
595 | ac97->num, reg); | ||
589 | res = 0xffff; | 596 | res = 0xffff; |
590 | } | 597 | } |
591 | } | 598 | } |
@@ -619,7 +626,7 @@ static int snd_intel8x0_ali_codec_ready(struct intel8x0 *chip, int mask) | |||
619 | return 0; | 626 | return 0; |
620 | } | 627 | } |
621 | if (! chip->in_ac97_init) | 628 | if (! chip->in_ac97_init) |
622 | snd_printd(KERN_WARNING "intel8x0: AC97 codec ready timeout.\n"); | 629 | dev_warn(chip->card->dev, "AC97 codec ready timeout.\n"); |
623 | return -EBUSY; | 630 | return -EBUSY; |
624 | } | 631 | } |
625 | 632 | ||
@@ -631,7 +638,7 @@ static int snd_intel8x0_ali_codec_semaphore(struct intel8x0 *chip) | |||
631 | while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) | 638 | while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY)) |
632 | udelay(1); | 639 | udelay(1); |
633 | if (! time && ! chip->in_ac97_init) | 640 | if (! time && ! chip->in_ac97_init) |
634 | snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n"); | 641 | dev_warn(chip->card->dev, "ali_codec_semaphore timeout\n"); |
635 | return snd_intel8x0_ali_codec_ready(chip, ALI_CSPSR_CODEC_READY); | 642 | return snd_intel8x0_ali_codec_ready(chip, ALI_CSPSR_CODEC_READY); |
636 | } | 643 | } |
637 | 644 | ||
@@ -700,7 +707,7 @@ static void snd_intel8x0_setup_periods(struct intel8x0 *chip, struct ichdev *ich | |||
700 | bdbar[idx + 1] = cpu_to_le32(0x80000000 | /* interrupt on completion */ | 707 | bdbar[idx + 1] = cpu_to_le32(0x80000000 | /* interrupt on completion */ |
701 | ichdev->fragsize >> ichdev->pos_shift); | 708 | ichdev->fragsize >> ichdev->pos_shift); |
702 | #if 0 | 709 | #if 0 |
703 | printk(KERN_DEBUG "bdbar[%i] = 0x%x [0x%x]\n", | 710 | dev_dbg(chip->card->dev, "bdbar[%i] = 0x%x [0x%x]\n", |
704 | idx + 0, bdbar[idx + 0], bdbar[idx + 1]); | 711 | idx + 0, bdbar[idx + 0], bdbar[idx + 1]); |
705 | #endif | 712 | #endif |
706 | } | 713 | } |
@@ -712,8 +719,8 @@ static void snd_intel8x0_setup_periods(struct intel8x0 *chip, struct ichdev *ich | |||
712 | ichdev->lvi_frag = ICH_REG_LVI_MASK % ichdev->frags; | 719 | ichdev->lvi_frag = ICH_REG_LVI_MASK % ichdev->frags; |
713 | ichdev->position = 0; | 720 | ichdev->position = 0; |
714 | #if 0 | 721 | #if 0 |
715 | printk(KERN_DEBUG "lvi_frag = %i, frags = %i, period_size = 0x%x, " | 722 | dev_dbg(chip->card->dev, |
716 | "period_size1 = 0x%x\n", | 723 | "lvi_frag = %i, frags = %i, period_size = 0x%x, period_size1 = 0x%x\n", |
717 | ichdev->lvi_frag, ichdev->frags, ichdev->fragsize, | 724 | ichdev->lvi_frag, ichdev->frags, ichdev->fragsize, |
718 | ichdev->fragsize1); | 725 | ichdev->fragsize1); |
719 | #endif | 726 | #endif |
@@ -781,8 +788,8 @@ static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ich | |||
781 | ichdev->lvi_frag %= ichdev->frags; | 788 | ichdev->lvi_frag %= ichdev->frags; |
782 | ichdev->bdbar[ichdev->lvi * 2] = cpu_to_le32(ichdev->physbuf + ichdev->lvi_frag * ichdev->fragsize1); | 789 | ichdev->bdbar[ichdev->lvi * 2] = cpu_to_le32(ichdev->physbuf + ichdev->lvi_frag * ichdev->fragsize1); |
783 | #if 0 | 790 | #if 0 |
784 | printk(KERN_DEBUG "new: bdbar[%i] = 0x%x [0x%x], prefetch = %i, " | 791 | dev_dbg(chip->card->dev, |
785 | "all = 0x%x, 0x%x\n", | 792 | "new: bdbar[%i] = 0x%x [0x%x], prefetch = %i, all = 0x%x, 0x%x\n", |
786 | ichdev->lvi * 2, ichdev->bdbar[ichdev->lvi * 2], | 793 | ichdev->lvi * 2, ichdev->bdbar[ichdev->lvi * 2], |
787 | ichdev->bdbar[ichdev->lvi * 2 + 1], inb(ICH_REG_OFF_PIV + port), | 794 | ichdev->bdbar[ichdev->lvi * 2 + 1], inb(ICH_REG_OFF_PIV + port), |
788 | inl(port + 4), inb(port + ICH_REG_OFF_CR)); | 795 | inl(port + 4), inb(port + ICH_REG_OFF_CR)); |
@@ -2289,7 +2296,8 @@ static int snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock, | |||
2289 | ac97.num = i; | 2296 | ac97.num = i; |
2290 | if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { | 2297 | if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97[i])) < 0) { |
2291 | if (err != -EACCES) | 2298 | if (err != -EACCES) |
2292 | snd_printk(KERN_ERR "Unable to initialize codec #%d\n", i); | 2299 | dev_err(chip->card->dev, |
2300 | "Unable to initialize codec #%d\n", i); | ||
2293 | if (i == 0) | 2301 | if (i == 0) |
2294 | goto __err; | 2302 | goto __err; |
2295 | } | 2303 | } |
@@ -2441,7 +2449,7 @@ static int snd_intel8x0_ich_chip_reset(struct intel8x0 *chip) | |||
2441 | return 0; | 2449 | return 0; |
2442 | schedule_timeout_uninterruptible(1); | 2450 | schedule_timeout_uninterruptible(1); |
2443 | } while (time_after_eq(end_time, jiffies)); | 2451 | } while (time_after_eq(end_time, jiffies)); |
2444 | snd_printk(KERN_ERR "AC'97 warm reset still in progress? [0x%x]\n", | 2452 | dev_err(chip->card->dev, "AC'97 warm reset still in progress? [0x%x]\n", |
2445 | igetdword(chip, ICHREG(GLOB_CNT))); | 2453 | igetdword(chip, ICHREG(GLOB_CNT))); |
2446 | return -EIO; | 2454 | return -EIO; |
2447 | } | 2455 | } |
@@ -2483,7 +2491,8 @@ static int snd_intel8x0_ich_chip_init(struct intel8x0 *chip, int probing) | |||
2483 | } while (time_after_eq(end_time, jiffies)); | 2491 | } while (time_after_eq(end_time, jiffies)); |
2484 | if (! status) { | 2492 | if (! status) { |
2485 | /* no codec is found */ | 2493 | /* no codec is found */ |
2486 | snd_printk(KERN_ERR "codec_ready: codec is not ready [0x%x]\n", | 2494 | dev_err(chip->card->dev, |
2495 | "codec_ready: codec is not ready [0x%x]\n", | ||
2487 | igetdword(chip, ICHREG(GLOB_STA))); | 2496 | igetdword(chip, ICHREG(GLOB_STA))); |
2488 | return -EIO; | 2497 | return -EIO; |
2489 | } | 2498 | } |
@@ -2547,7 +2556,7 @@ static int snd_intel8x0_ali_chip_init(struct intel8x0 *chip, int probing) | |||
2547 | goto __ok; | 2556 | goto __ok; |
2548 | schedule_timeout_uninterruptible(1); | 2557 | schedule_timeout_uninterruptible(1); |
2549 | } | 2558 | } |
2550 | snd_printk(KERN_ERR "AC'97 reset failed.\n"); | 2559 | dev_err(chip->card->dev, "AC'97 reset failed.\n"); |
2551 | if (probing) | 2560 | if (probing) |
2552 | return -EIO; | 2561 | return -EIO; |
2553 | 2562 | ||
@@ -2591,7 +2600,7 @@ static int snd_intel8x0_chip_init(struct intel8x0 *chip, int probing) | |||
2591 | break; | 2600 | break; |
2592 | } | 2601 | } |
2593 | if (timeout == 0) | 2602 | if (timeout == 0) |
2594 | printk(KERN_ERR "intel8x0: reset of registers failed?\n"); | 2603 | dev_err(chip->card->dev, "reset of registers failed?\n"); |
2595 | } | 2604 | } |
2596 | /* initialize Buffer Descriptor Lists */ | 2605 | /* initialize Buffer Descriptor Lists */ |
2597 | for (i = 0; i < chip->bdbars_count; i++) | 2606 | for (i = 0; i < chip->bdbars_count; i++) |
@@ -2692,8 +2701,7 @@ static int intel8x0_resume(struct device *dev) | |||
2692 | pci_set_power_state(pci, PCI_D0); | 2701 | pci_set_power_state(pci, PCI_D0); |
2693 | pci_restore_state(pci); | 2702 | pci_restore_state(pci); |
2694 | if (pci_enable_device(pci) < 0) { | 2703 | if (pci_enable_device(pci) < 0) { |
2695 | printk(KERN_ERR "intel8x0: pci_enable_device failed, " | 2704 | dev_err(dev, "pci_enable_device failed, disabling device\n"); |
2696 | "disabling device\n"); | ||
2697 | snd_card_disconnect(card); | 2705 | snd_card_disconnect(card); |
2698 | return -EIO; | 2706 | return -EIO; |
2699 | } | 2707 | } |
@@ -2701,8 +2709,8 @@ static int intel8x0_resume(struct device *dev) | |||
2701 | snd_intel8x0_chip_init(chip, 0); | 2709 | snd_intel8x0_chip_init(chip, 0); |
2702 | if (request_irq(pci->irq, snd_intel8x0_interrupt, | 2710 | if (request_irq(pci->irq, snd_intel8x0_interrupt, |
2703 | IRQF_SHARED, KBUILD_MODNAME, chip)) { | 2711 | IRQF_SHARED, KBUILD_MODNAME, chip)) { |
2704 | printk(KERN_ERR "intel8x0: unable to grab IRQ %d, " | 2712 | dev_err(dev, "unable to grab IRQ %d, disabling device\n", |
2705 | "disabling device\n", pci->irq); | 2713 | pci->irq); |
2706 | snd_card_disconnect(card); | 2714 | snd_card_disconnect(card); |
2707 | return -EIO; | 2715 | return -EIO; |
2708 | } | 2716 | } |
@@ -2779,7 +2787,8 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) | |||
2779 | __again: | 2787 | __again: |
2780 | subs = chip->pcm[0]->streams[0].substream; | 2788 | subs = chip->pcm[0]->streams[0].substream; |
2781 | if (! subs || subs->dma_buffer.bytes < INTEL8X0_TESTBUF_SIZE) { | 2789 | if (! subs || subs->dma_buffer.bytes < INTEL8X0_TESTBUF_SIZE) { |
2782 | snd_printk(KERN_WARNING "no playback buffer allocated - aborting measure ac97 clock\n"); | 2790 | dev_warn(chip->card->dev, |
2791 | "no playback buffer allocated - aborting measure ac97 clock\n"); | ||
2783 | return; | 2792 | return; |
2784 | } | 2793 | } |
2785 | ichdev = &chip->ichd[ICHD_PCMOUT]; | 2794 | ichdev = &chip->ichd[ICHD_PCMOUT]; |
@@ -2789,7 +2798,8 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) | |||
2789 | 2798 | ||
2790 | /* set rate */ | 2799 | /* set rate */ |
2791 | if (snd_ac97_set_rate(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 48000) < 0) { | 2800 | if (snd_ac97_set_rate(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 48000) < 0) { |
2792 | snd_printk(KERN_ERR "cannot set ac97 rate: clock = %d\n", chip->ac97_bus->clock); | 2801 | dev_err(chip->card->dev, "cannot set ac97 rate: clock = %d\n", |
2802 | chip->ac97_bus->clock); | ||
2793 | return; | 2803 | return; |
2794 | } | 2804 | } |
2795 | snd_intel8x0_setup_periods(chip, ichdev); | 2805 | snd_intel8x0_setup_periods(chip, ichdev); |
@@ -2843,7 +2853,8 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) | |||
2843 | spin_unlock_irq(&chip->reg_lock); | 2853 | spin_unlock_irq(&chip->reg_lock); |
2844 | 2854 | ||
2845 | if (pos == 0) { | 2855 | if (pos == 0) { |
2846 | snd_printk(KERN_ERR "intel8x0: measure - unreliable DMA position..\n"); | 2856 | dev_err(chip->card->dev, |
2857 | "measure - unreliable DMA position..\n"); | ||
2847 | __retry: | 2858 | __retry: |
2848 | if (attempt < 3) { | 2859 | if (attempt < 3) { |
2849 | msleep(300); | 2860 | msleep(300); |
@@ -2857,16 +2868,17 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) | |||
2857 | t = stop_time.tv_sec - start_time.tv_sec; | 2868 | t = stop_time.tv_sec - start_time.tv_sec; |
2858 | t *= 1000000; | 2869 | t *= 1000000; |
2859 | t += (stop_time.tv_nsec - start_time.tv_nsec) / 1000; | 2870 | t += (stop_time.tv_nsec - start_time.tv_nsec) / 1000; |
2860 | printk(KERN_INFO "%s: measured %lu usecs (%lu samples)\n", __func__, t, pos); | 2871 | dev_info(chip->card->dev, |
2872 | "%s: measured %lu usecs (%lu samples)\n", __func__, t, pos); | ||
2861 | if (t == 0) { | 2873 | if (t == 0) { |
2862 | snd_printk(KERN_ERR "intel8x0: ?? calculation error..\n"); | 2874 | dev_err(chip->card->dev, "?? calculation error..\n"); |
2863 | goto __retry; | 2875 | goto __retry; |
2864 | } | 2876 | } |
2865 | pos *= 1000; | 2877 | pos *= 1000; |
2866 | pos = (pos / t) * 1000 + ((pos % t) * 1000) / t; | 2878 | pos = (pos / t) * 1000 + ((pos % t) * 1000) / t; |
2867 | if (pos < 40000 || pos >= 60000) { | 2879 | if (pos < 40000 || pos >= 60000) { |
2868 | /* abnormal value. hw problem? */ | 2880 | /* abnormal value. hw problem? */ |
2869 | printk(KERN_INFO "intel8x0: measured clock %ld rejected\n", pos); | 2881 | dev_info(chip->card->dev, "measured clock %ld rejected\n", pos); |
2870 | goto __retry; | 2882 | goto __retry; |
2871 | } else if (pos > 40500 && pos < 41500) | 2883 | } else if (pos > 40500 && pos < 41500) |
2872 | /* first exception - 41000Hz reference clock */ | 2884 | /* first exception - 41000Hz reference clock */ |
@@ -2878,7 +2890,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) | |||
2878 | /* not 48000Hz, tuning the clock.. */ | 2890 | /* not 48000Hz, tuning the clock.. */ |
2879 | chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos; | 2891 | chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos; |
2880 | __end: | 2892 | __end: |
2881 | printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock); | 2893 | dev_info(chip->card->dev, "clocking to %d\n", chip->ac97_bus->clock); |
2882 | snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); | 2894 | snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); |
2883 | } | 2895 | } |
2884 | 2896 | ||
@@ -2899,7 +2911,7 @@ static int intel8x0_in_clock_list(struct intel8x0 *chip) | |||
2899 | wl = snd_pci_quirk_lookup(pci, intel8x0_clock_list); | 2911 | wl = snd_pci_quirk_lookup(pci, intel8x0_clock_list); |
2900 | if (!wl) | 2912 | if (!wl) |
2901 | return 0; | 2913 | return 0; |
2902 | printk(KERN_INFO "intel8x0: white list rate for %04x:%04x is %i\n", | 2914 | dev_info(chip->card->dev, "white list rate for %04x:%04x is %i\n", |
2903 | pci->subsystem_vendor, pci->subsystem_device, wl->value); | 2915 | pci->subsystem_vendor, pci->subsystem_device, wl->value); |
2904 | chip->ac97_bus->clock = wl->value; | 2916 | chip->ac97_bus->clock = wl->value; |
2905 | return 1; | 2917 | return 1; |
@@ -3003,7 +3015,7 @@ static int snd_intel8x0_inside_vm(struct pci_dev *pci) | |||
3003 | 3015 | ||
3004 | fini: | 3016 | fini: |
3005 | if (msg != NULL) | 3017 | if (msg != NULL) |
3006 | printk(KERN_INFO "intel8x0: %s optimization\n", msg); | 3018 | dev_info(&pci->dev, "%s optimization\n", msg); |
3007 | 3019 | ||
3008 | return result; | 3020 | return result; |
3009 | } | 3021 | } |
@@ -3098,7 +3110,7 @@ static int snd_intel8x0_create(struct snd_card *card, | |||
3098 | else | 3110 | else |
3099 | chip->addr = pci_iomap(pci, 0, 0); | 3111 | chip->addr = pci_iomap(pci, 0, 0); |
3100 | if (!chip->addr) { | 3112 | if (!chip->addr) { |
3101 | snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); | 3113 | dev_err(card->dev, "AC'97 space ioremap problem\n"); |
3102 | snd_intel8x0_free(chip); | 3114 | snd_intel8x0_free(chip); |
3103 | return -EIO; | 3115 | return -EIO; |
3104 | } | 3116 | } |
@@ -3107,7 +3119,7 @@ static int snd_intel8x0_create(struct snd_card *card, | |||
3107 | else | 3119 | else |
3108 | chip->bmaddr = pci_iomap(pci, 1, 0); | 3120 | chip->bmaddr = pci_iomap(pci, 1, 0); |
3109 | if (!chip->bmaddr) { | 3121 | if (!chip->bmaddr) { |
3110 | snd_printk(KERN_ERR "Controller space ioremap problem\n"); | 3122 | dev_err(card->dev, "Controller space ioremap problem\n"); |
3111 | snd_intel8x0_free(chip); | 3123 | snd_intel8x0_free(chip); |
3112 | return -EIO; | 3124 | return -EIO; |
3113 | } | 3125 | } |
@@ -3152,7 +3164,7 @@ static int snd_intel8x0_create(struct snd_card *card, | |||
3152 | chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, | 3164 | chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, |
3153 | &chip->bdbars) < 0) { | 3165 | &chip->bdbars) < 0) { |
3154 | snd_intel8x0_free(chip); | 3166 | snd_intel8x0_free(chip); |
3155 | snd_printk(KERN_ERR "intel8x0: cannot allocate buffer descriptors\n"); | 3167 | dev_err(card->dev, "cannot allocate buffer descriptors\n"); |
3156 | return -ENOMEM; | 3168 | return -ENOMEM; |
3157 | } | 3169 | } |
3158 | /* tables must be aligned to 8 bytes here, but the kernel pages | 3170 | /* tables must be aligned to 8 bytes here, but the kernel pages |
@@ -3206,7 +3218,7 @@ static int snd_intel8x0_create(struct snd_card *card, | |||
3206 | /* request irq after initializaing int_sta_mask, etc */ | 3218 | /* request irq after initializaing int_sta_mask, etc */ |
3207 | if (request_irq(pci->irq, snd_intel8x0_interrupt, | 3219 | if (request_irq(pci->irq, snd_intel8x0_interrupt, |
3208 | IRQF_SHARED, KBUILD_MODNAME, chip)) { | 3220 | IRQF_SHARED, KBUILD_MODNAME, chip)) { |
3209 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 3221 | dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); |
3210 | snd_intel8x0_free(chip); | 3222 | snd_intel8x0_free(chip); |
3211 | return -EBUSY; | 3223 | return -EBUSY; |
3212 | } | 3224 | } |
@@ -3263,12 +3275,12 @@ static int check_default_spdif_aclink(struct pci_dev *pci) | |||
3263 | w = snd_pci_quirk_lookup(pci, spdif_aclink_defaults); | 3275 | w = snd_pci_quirk_lookup(pci, spdif_aclink_defaults); |
3264 | if (w) { | 3276 | if (w) { |
3265 | if (w->value) | 3277 | if (w->value) |
3266 | snd_printdd(KERN_INFO | 3278 | dev_dbg(&pci->dev, |
3267 | "intel8x0: Using SPDIF over AC-Link for %s\n", | 3279 | "Using SPDIF over AC-Link for %s\n", |
3268 | snd_pci_quirk_name(w)); | 3280 | snd_pci_quirk_name(w)); |
3269 | else | 3281 | else |
3270 | snd_printdd(KERN_INFO | 3282 | dev_dbg(&pci->dev, |
3271 | "intel8x0: Using integrated SPDIF DMA for %s\n", | 3283 | "Using integrated SPDIF DMA for %s\n", |
3272 | snd_pci_quirk_name(w)); | 3284 | snd_pci_quirk_name(w)); |
3273 | return w->value; | 3285 | return w->value; |
3274 | } | 3286 | } |