diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 10:04:05 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:24 -0500 |
commit | 74103227a6eee19654a915cbd56307fc8bc78ba6 (patch) | |
tree | a5971613b1fc5bb72fb4e991430f34d9e663493e /sound/pci/ca0106 | |
parent | 179bb7f16abdcca6cfb18d34de2e209947c893e5 (diff) |
ALSA: ca0106: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
A couple of prints are difficult to convert with dev_err() so they are
converted to pr_err() at least.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ca0106')
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 84 | ||||
-rw-r--r-- | sound/pci/ca0106/ca_midi.c | 4 |
2 files changed, 49 insertions, 39 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index f659c7a89c0c..f94cc6e97d4a 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -417,13 +417,13 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, | |||
417 | int status; | 417 | int status; |
418 | int retry; | 418 | int retry; |
419 | if ((reg > 0x7f) || (value > 0x1ff)) { | 419 | if ((reg > 0x7f) || (value > 0x1ff)) { |
420 | snd_printk(KERN_ERR "i2c_write: invalid values.\n"); | 420 | dev_err(emu->card->dev, "i2c_write: invalid values.\n"); |
421 | return -EINVAL; | 421 | return -EINVAL; |
422 | } | 422 | } |
423 | 423 | ||
424 | tmp = reg << 25 | value << 16; | 424 | tmp = reg << 25 | value << 16; |
425 | /* | 425 | /* |
426 | snd_printk(KERN_DEBUG "I2C-write:reg=0x%x, value=0x%x\n", reg, value); | 426 | dev_dbg(emu->card->dev, "I2C-write:reg=0x%x, value=0x%x\n", reg, value); |
427 | */ | 427 | */ |
428 | /* Not sure what this I2C channel controls. */ | 428 | /* Not sure what this I2C channel controls. */ |
429 | /* snd_ca0106_ptr_write(emu, I2C_D0, 0, tmp); */ | 429 | /* snd_ca0106_ptr_write(emu, I2C_D0, 0, tmp); */ |
@@ -442,7 +442,7 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, | |||
442 | /* Wait till the transaction ends */ | 442 | /* Wait till the transaction ends */ |
443 | while (1) { | 443 | while (1) { |
444 | status = snd_ca0106_ptr_read(emu, I2C_A, 0); | 444 | status = snd_ca0106_ptr_read(emu, I2C_A, 0); |
445 | /*snd_printk(KERN_DEBUG "I2C:status=0x%x\n", status);*/ | 445 | /*dev_dbg(emu->card->dev, "I2C:status=0x%x\n", status);*/ |
446 | timeout++; | 446 | timeout++; |
447 | if ((status & I2C_A_ADC_START) == 0) | 447 | if ((status & I2C_A_ADC_START) == 0) |
448 | break; | 448 | break; |
@@ -456,7 +456,7 @@ int snd_ca0106_i2c_write(struct snd_ca0106 *emu, | |||
456 | } | 456 | } |
457 | 457 | ||
458 | if (retry == 10) { | 458 | if (retry == 10) { |
459 | snd_printk(KERN_ERR "Writing to ADC failed!\n"); | 459 | dev_err(emu->card->dev, "Writing to ADC failed!\n"); |
460 | return -EINVAL; | 460 | return -EINVAL; |
461 | } | 461 | } |
462 | 462 | ||
@@ -516,7 +516,8 @@ static void restore_spdif_bits(struct snd_ca0106 *chip, int idx) | |||
516 | } | 516 | } |
517 | } | 517 | } |
518 | 518 | ||
519 | static int snd_ca0106_channel_dac(struct snd_ca0106_details *details, | 519 | static int snd_ca0106_channel_dac(struct snd_ca0106 *chip, |
520 | struct snd_ca0106_details *details, | ||
520 | int channel_id) | 521 | int channel_id) |
521 | { | 522 | { |
522 | switch (channel_id) { | 523 | switch (channel_id) { |
@@ -529,7 +530,7 @@ static int snd_ca0106_channel_dac(struct snd_ca0106_details *details, | |||
529 | case PCM_UNKNOWN_CHANNEL: | 530 | case PCM_UNKNOWN_CHANNEL: |
530 | return (details->spi_dac & 0x000f) >> (4 * 0); | 531 | return (details->spi_dac & 0x000f) >> (4 * 0); |
531 | default: | 532 | default: |
532 | snd_printk(KERN_DEBUG "ca0106: unknown channel_id %d\n", | 533 | dev_dbg(chip->card->dev, "ca0106: unknown channel_id %d\n", |
533 | channel_id); | 534 | channel_id); |
534 | } | 535 | } |
535 | return 0; | 536 | return 0; |
@@ -539,7 +540,7 @@ static int snd_ca0106_pcm_power_dac(struct snd_ca0106 *chip, int channel_id, | |||
539 | int power) | 540 | int power) |
540 | { | 541 | { |
541 | if (chip->details->spi_dac) { | 542 | if (chip->details->spi_dac) { |
542 | const int dac = snd_ca0106_channel_dac(chip->details, | 543 | const int dac = snd_ca0106_channel_dac(chip, chip->details, |
543 | channel_id); | 544 | channel_id); |
544 | const int reg = spi_dacd_reg[dac]; | 545 | const int reg = spi_dacd_reg[dac]; |
545 | const int bit = spi_dacd_bit[dac]; | 546 | const int bit = spi_dacd_bit[dac]; |
@@ -583,7 +584,7 @@ static int snd_ca0106_pcm_open_playback_channel(struct snd_pcm_substream *substr | |||
583 | 584 | ||
584 | channel->use = 1; | 585 | channel->use = 1; |
585 | /* | 586 | /* |
586 | printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n", | 587 | dev_dbg(chip->card->dev, "open:channel_id=%d, chip=%p, channel=%p\n", |
587 | channel_id, chip, channel); | 588 | channel_id, chip, channel); |
588 | */ | 589 | */ |
589 | //channel->interrupt = snd_ca0106_pcm_channel_interrupt; | 590 | //channel->interrupt = snd_ca0106_pcm_channel_interrupt; |
@@ -660,7 +661,8 @@ static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substre | |||
660 | 661 | ||
661 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); | 662 | epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); |
662 | if (epcm == NULL) { | 663 | if (epcm == NULL) { |
663 | snd_printk(KERN_ERR "open_capture_channel: failed epcm alloc\n"); | 664 | dev_err(chip->card->dev, |
665 | "open_capture_channel: failed epcm alloc\n"); | ||
664 | return -ENOMEM; | 666 | return -ENOMEM; |
665 | } | 667 | } |
666 | epcm->emu = chip; | 668 | epcm->emu = chip; |
@@ -677,7 +679,7 @@ static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substre | |||
677 | 679 | ||
678 | channel->use = 1; | 680 | channel->use = 1; |
679 | /* | 681 | /* |
680 | printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n", | 682 | dev_dbg(chip->card->dev, "open:channel_id=%d, chip=%p, channel=%p\n", |
681 | channel_id, chip, channel); | 683 | channel_id, chip, channel); |
682 | */ | 684 | */ |
683 | //channel->interrupt = snd_ca0106_pcm_channel_interrupt; | 685 | //channel->interrupt = snd_ca0106_pcm_channel_interrupt; |
@@ -771,7 +773,7 @@ static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream) | |||
771 | int i; | 773 | int i; |
772 | 774 | ||
773 | #if 0 /* debug */ | 775 | #if 0 /* debug */ |
774 | snd_printk(KERN_DEBUG | 776 | dev_dbg(emu->card->dev, |
775 | "prepare:channel_number=%d, rate=%d, format=0x%x, " | 777 | "prepare:channel_number=%d, rate=%d, format=0x%x, " |
776 | "channels=%d, buffer_size=%ld, period_size=%ld, " | 778 | "channels=%d, buffer_size=%ld, period_size=%ld, " |
777 | "periods=%u, frames_to_bytes=%d\n", | 779 | "periods=%u, frames_to_bytes=%d\n", |
@@ -779,9 +781,11 @@ static int snd_ca0106_pcm_prepare_playback(struct snd_pcm_substream *substream) | |||
779 | runtime->channels, runtime->buffer_size, | 781 | runtime->channels, runtime->buffer_size, |
780 | runtime->period_size, runtime->periods, | 782 | runtime->period_size, runtime->periods, |
781 | frames_to_bytes(runtime, 1)); | 783 | frames_to_bytes(runtime, 1)); |
782 | snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, table_base=%p\n", | 784 | dev_dbg(emu->card->dev, |
785 | "dma_addr=%x, dma_area=%p, table_base=%p\n", | ||
783 | runtime->dma_addr, runtime->dma_area, table_base); | 786 | runtime->dma_addr, runtime->dma_area, table_base); |
784 | snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n", | 787 | dev_dbg(emu->card->dev, |
788 | "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n", | ||
785 | emu->buffer.addr, emu->buffer.area, emu->buffer.bytes); | 789 | emu->buffer.addr, emu->buffer.area, emu->buffer.bytes); |
786 | #endif /* debug */ | 790 | #endif /* debug */ |
787 | /* Rate can be set per channel. */ | 791 | /* Rate can be set per channel. */ |
@@ -876,7 +880,7 @@ static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream) | |||
876 | u32 reg71; | 880 | u32 reg71; |
877 | 881 | ||
878 | #if 0 /* debug */ | 882 | #if 0 /* debug */ |
879 | snd_printk(KERN_DEBUG | 883 | dev_dbg(emu->card->dev, |
880 | "prepare:channel_number=%d, rate=%d, format=0x%x, " | 884 | "prepare:channel_number=%d, rate=%d, format=0x%x, " |
881 | "channels=%d, buffer_size=%ld, period_size=%ld, " | 885 | "channels=%d, buffer_size=%ld, period_size=%ld, " |
882 | "periods=%u, frames_to_bytes=%d\n", | 886 | "periods=%u, frames_to_bytes=%d\n", |
@@ -884,9 +888,11 @@ static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream) | |||
884 | runtime->channels, runtime->buffer_size, | 888 | runtime->channels, runtime->buffer_size, |
885 | runtime->period_size, runtime->periods, | 889 | runtime->period_size, runtime->periods, |
886 | frames_to_bytes(runtime, 1)); | 890 | frames_to_bytes(runtime, 1)); |
887 | snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, table_base=%p\n", | 891 | dev_dbg(emu->card->dev, |
892 | "dma_addr=%x, dma_area=%p, table_base=%p\n", | ||
888 | runtime->dma_addr, runtime->dma_area, table_base); | 893 | runtime->dma_addr, runtime->dma_area, table_base); |
889 | snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n", | 894 | dev_dbg(emu->card->dev, |
895 | "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n", | ||
890 | emu->buffer.addr, emu->buffer.area, emu->buffer.bytes); | 896 | emu->buffer.addr, emu->buffer.area, emu->buffer.bytes); |
891 | #endif /* debug */ | 897 | #endif /* debug */ |
892 | /* reg71 controls ADC rate. */ | 898 | /* reg71 controls ADC rate. */ |
@@ -934,7 +940,7 @@ static int snd_ca0106_pcm_prepare_capture(struct snd_pcm_substream *substream) | |||
934 | 940 | ||
935 | 941 | ||
936 | /* | 942 | /* |
937 | printk(KERN_DEBUG | 943 | dev_dbg(emu->card->dev, |
938 | "prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, " | 944 | "prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, " |
939 | "buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n", | 945 | "buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n", |
940 | channel, runtime->rate, runtime->format, runtime->channels, | 946 | channel, runtime->rate, runtime->format, runtime->channels, |
@@ -982,13 +988,13 @@ static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream, | |||
982 | runtime = s->runtime; | 988 | runtime = s->runtime; |
983 | epcm = runtime->private_data; | 989 | epcm = runtime->private_data; |
984 | channel = epcm->channel_id; | 990 | channel = epcm->channel_id; |
985 | /* snd_printk(KERN_DEBUG "channel=%d\n", channel); */ | 991 | /* dev_dbg(emu->card->dev, "channel=%d\n", channel); */ |
986 | epcm->running = running; | 992 | epcm->running = running; |
987 | basic |= (0x1 << channel); | 993 | basic |= (0x1 << channel); |
988 | extended |= (0x10 << channel); | 994 | extended |= (0x10 << channel); |
989 | snd_pcm_trigger_done(s, substream); | 995 | snd_pcm_trigger_done(s, substream); |
990 | } | 996 | } |
991 | /* snd_printk(KERN_DEBUG "basic=0x%x, extended=0x%x\n",basic, extended); */ | 997 | /* dev_dbg(emu->card->dev, "basic=0x%x, extended=0x%x\n",basic, extended); */ |
992 | 998 | ||
993 | switch (cmd) { | 999 | switch (cmd) { |
994 | case SNDRV_PCM_TRIGGER_START: | 1000 | case SNDRV_PCM_TRIGGER_START: |
@@ -1070,7 +1076,7 @@ snd_ca0106_pcm_pointer_playback(struct snd_pcm_substream *substream) | |||
1070 | return ptr; | 1076 | return ptr; |
1071 | prev_ptr = ptr; | 1077 | prev_ptr = ptr; |
1072 | } while (--timeout); | 1078 | } while (--timeout); |
1073 | snd_printk(KERN_WARNING "ca0106: unstable DMA pointer!\n"); | 1079 | dev_warn(emu->card->dev, "ca0106: unstable DMA pointer!\n"); |
1074 | return 0; | 1080 | return 0; |
1075 | } | 1081 | } |
1076 | 1082 | ||
@@ -1093,7 +1099,7 @@ snd_ca0106_pcm_pointer_capture(struct snd_pcm_substream *substream) | |||
1093 | if (ptr >= runtime->buffer_size) | 1099 | if (ptr >= runtime->buffer_size) |
1094 | ptr -= runtime->buffer_size; | 1100 | ptr -= runtime->buffer_size; |
1095 | /* | 1101 | /* |
1096 | printk(KERN_DEBUG "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, " | 1102 | dev_dbg(emu->card->dev, "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, " |
1097 | "buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", | 1103 | "buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", |
1098 | ptr1, ptr2, ptr, (int)runtime->buffer_size, | 1104 | ptr1, ptr2, ptr, (int)runtime->buffer_size, |
1099 | (int)runtime->period_size, (int)runtime->frame_bits, | 1105 | (int)runtime->period_size, (int)runtime->frame_bits, |
@@ -1284,9 +1290,9 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id) | |||
1284 | 1290 | ||
1285 | stat76 = snd_ca0106_ptr_read(chip, EXTENDED_INT, 0); | 1291 | stat76 = snd_ca0106_ptr_read(chip, EXTENDED_INT, 0); |
1286 | /* | 1292 | /* |
1287 | snd_printk(KERN_DEBUG "interrupt status = 0x%08x, stat76=0x%08x\n", | 1293 | dev_dbg(emu->card->dev, "interrupt status = 0x%08x, stat76=0x%08x\n", |
1288 | status, stat76); | 1294 | status, stat76); |
1289 | snd_printk(KERN_DEBUG "ptr=0x%08x\n", | 1295 | dev_dbg(emu->card->dev, "ptr=0x%08x\n", |
1290 | snd_ca0106_ptr_read(chip, PLAYBACK_POINTER, 0)); | 1296 | snd_ca0106_ptr_read(chip, PLAYBACK_POINTER, 0)); |
1291 | */ | 1297 | */ |
1292 | mask = 0x11; /* 0x1 for one half, 0x10 for the other half period. */ | 1298 | mask = 0x11; /* 0x1 for one half, 0x10 for the other half period. */ |
@@ -1296,11 +1302,13 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id) | |||
1296 | /* FIXME: Select the correct substream for period elapsed */ | 1302 | /* FIXME: Select the correct substream for period elapsed */ |
1297 | if(pchannel->use) { | 1303 | if(pchannel->use) { |
1298 | snd_pcm_period_elapsed(pchannel->epcm->substream); | 1304 | snd_pcm_period_elapsed(pchannel->epcm->substream); |
1299 | //printk(KERN_INFO "interrupt [%d] used\n", i); | 1305 | /* dev_dbg(emu->card->dev, "interrupt [%d] used\n", i); */ |
1300 | } | 1306 | } |
1301 | } | 1307 | } |
1302 | //printk(KERN_INFO "channel=%p\n",pchannel); | 1308 | /* |
1303 | //printk(KERN_INFO "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number); | 1309 | dev_dbg(emu->card->dev, "channel=%p\n", pchannel); |
1310 | dev_dbg(emu->card->dev, "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number); | ||
1311 | */ | ||
1304 | mask <<= 1; | 1312 | mask <<= 1; |
1305 | } | 1313 | } |
1306 | mask = 0x110000; /* 0x1 for one half, 0x10 for the other half period. */ | 1314 | mask = 0x110000; /* 0x1 for one half, 0x10 for the other half period. */ |
@@ -1310,11 +1318,13 @@ static irqreturn_t snd_ca0106_interrupt(int irq, void *dev_id) | |||
1310 | /* FIXME: Select the correct substream for period elapsed */ | 1318 | /* FIXME: Select the correct substream for period elapsed */ |
1311 | if(pchannel->use) { | 1319 | if(pchannel->use) { |
1312 | snd_pcm_period_elapsed(pchannel->epcm->substream); | 1320 | snd_pcm_period_elapsed(pchannel->epcm->substream); |
1313 | //printk(KERN_INFO "interrupt [%d] used\n", i); | 1321 | /* dev_dbg(emu->card->dev, "interrupt [%d] used\n", i); */ |
1314 | } | 1322 | } |
1315 | } | 1323 | } |
1316 | //printk(KERN_INFO "channel=%p\n",pchannel); | 1324 | /* |
1317 | //printk(KERN_INFO "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number); | 1325 | dev_dbg(emu->card->dev, "channel=%p\n", pchannel); |
1326 | dev_dbg(emu->card->dev, "interrupt stat76[%d] = %08x, use=%d, channel=%d\n", i, stat76, pchannel->use, pchannel->number); | ||
1327 | */ | ||
1318 | mask <<= 1; | 1328 | mask <<= 1; |
1319 | } | 1329 | } |
1320 | 1330 | ||
@@ -1603,7 +1613,7 @@ static void ca0106_init_chip(struct snd_ca0106 *chip, int resume) | |||
1603 | int size, n; | 1613 | int size, n; |
1604 | 1614 | ||
1605 | size = ARRAY_SIZE(i2c_adc_init); | 1615 | size = ARRAY_SIZE(i2c_adc_init); |
1606 | /* snd_printk(KERN_DEBUG "I2C:array size=0x%x\n", size); */ | 1616 | /* dev_dbg(emu->card->dev, "I2C:array size=0x%x\n", size); */ |
1607 | for (n = 0; n < size; n++) | 1617 | for (n = 0; n < size; n++) |
1608 | snd_ca0106_i2c_write(chip, i2c_adc_init[n][0], | 1618 | snd_ca0106_i2c_write(chip, i2c_adc_init[n][0], |
1609 | i2c_adc_init[n][1]); | 1619 | i2c_adc_init[n][1]); |
@@ -1668,7 +1678,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card, | |||
1668 | return err; | 1678 | return err; |
1669 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || | 1679 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || |
1670 | pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { | 1680 | pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { |
1671 | printk(KERN_ERR "error to set 32bit mask DMA\n"); | 1681 | dev_err(card->dev, "error to set 32bit mask DMA\n"); |
1672 | pci_disable_device(pci); | 1682 | pci_disable_device(pci); |
1673 | return -ENXIO; | 1683 | return -ENXIO; |
1674 | } | 1684 | } |
@@ -1689,14 +1699,14 @@ static int snd_ca0106_create(int dev, struct snd_card *card, | |||
1689 | chip->res_port = request_region(chip->port, 0x20, "snd_ca0106"); | 1699 | chip->res_port = request_region(chip->port, 0x20, "snd_ca0106"); |
1690 | if (!chip->res_port) { | 1700 | if (!chip->res_port) { |
1691 | snd_ca0106_free(chip); | 1701 | snd_ca0106_free(chip); |
1692 | printk(KERN_ERR "cannot allocate the port\n"); | 1702 | dev_err(card->dev, "cannot allocate the port\n"); |
1693 | return -EBUSY; | 1703 | return -EBUSY; |
1694 | } | 1704 | } |
1695 | 1705 | ||
1696 | if (request_irq(pci->irq, snd_ca0106_interrupt, | 1706 | if (request_irq(pci->irq, snd_ca0106_interrupt, |
1697 | IRQF_SHARED, KBUILD_MODNAME, chip)) { | 1707 | IRQF_SHARED, KBUILD_MODNAME, chip)) { |
1698 | snd_ca0106_free(chip); | 1708 | snd_ca0106_free(chip); |
1699 | printk(KERN_ERR "cannot grab irq\n"); | 1709 | dev_err(card->dev, "cannot grab irq\n"); |
1700 | return -EBUSY; | 1710 | return -EBUSY; |
1701 | } | 1711 | } |
1702 | chip->irq = pci->irq; | 1712 | chip->irq = pci->irq; |
@@ -1712,7 +1722,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card, | |||
1712 | /* read serial */ | 1722 | /* read serial */ |
1713 | pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); | 1723 | pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); |
1714 | pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); | 1724 | pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); |
1715 | printk(KERN_INFO "snd-ca0106: Model %04x Rev %08x Serial %08x\n", | 1725 | dev_info(card->dev, "Model %04x Rev %08x Serial %08x\n", |
1716 | chip->model, pci->revision, chip->serial); | 1726 | chip->model, pci->revision, chip->serial); |
1717 | strcpy(card->driver, "CA0106"); | 1727 | strcpy(card->driver, "CA0106"); |
1718 | strcpy(card->shortname, "CA0106"); | 1728 | strcpy(card->shortname, "CA0106"); |
@@ -1726,7 +1736,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card, | |||
1726 | } | 1736 | } |
1727 | chip->details = c; | 1737 | chip->details = c; |
1728 | if (subsystem[dev]) { | 1738 | if (subsystem[dev]) { |
1729 | printk(KERN_INFO "snd-ca0106: Sound card name=%s, " | 1739 | dev_info(card->dev, "Sound card name=%s, " |
1730 | "subsystem=0x%x. Forced to subsystem=0x%x\n", | 1740 | "subsystem=0x%x. Forced to subsystem=0x%x\n", |
1731 | c->name, chip->serial, subsystem[dev]); | 1741 | c->name, chip->serial, subsystem[dev]); |
1732 | } | 1742 | } |
@@ -1869,11 +1879,11 @@ static int snd_ca0106_probe(struct pci_dev *pci, | |||
1869 | if (err < 0) | 1879 | if (err < 0) |
1870 | goto error; | 1880 | goto error; |
1871 | 1881 | ||
1872 | snd_printdd("ca0106: probe for MIDI channel A ..."); | 1882 | dev_dbg(card->dev, "probe for MIDI channel A ..."); |
1873 | err = snd_ca0106_midi(chip, CA0106_MIDI_CHAN_A); | 1883 | err = snd_ca0106_midi(chip, CA0106_MIDI_CHAN_A); |
1874 | if (err < 0) | 1884 | if (err < 0) |
1875 | goto error; | 1885 | goto error; |
1876 | snd_printdd(" done.\n"); | 1886 | dev_dbg(card->dev, " done.\n"); |
1877 | 1887 | ||
1878 | #ifdef CONFIG_PROC_FS | 1888 | #ifdef CONFIG_PROC_FS |
1879 | snd_ca0106_proc_init(chip); | 1889 | snd_ca0106_proc_init(chip); |
diff --git a/sound/pci/ca0106/ca_midi.c b/sound/pci/ca0106/ca_midi.c index 8bbdf265d11d..b91c7f6d19f9 100644 --- a/sound/pci/ca0106/ca_midi.c +++ b/sound/pci/ca0106/ca_midi.c | |||
@@ -46,7 +46,7 @@ static void ca_midi_clear_rx(struct snd_ca_midi *midi) | |||
46 | ca_midi_read_data(midi); | 46 | ca_midi_read_data(midi); |
47 | #ifdef CONFIG_SND_DEBUG | 47 | #ifdef CONFIG_SND_DEBUG |
48 | if (timeout <= 0) | 48 | if (timeout <= 0) |
49 | snd_printk(KERN_ERR "ca_midi_clear_rx: timeout (status = 0x%x)\n", | 49 | pr_err("ca_midi_clear_rx: timeout (status = 0x%x)\n", |
50 | ca_midi_read_stat(midi)); | 50 | ca_midi_read_stat(midi)); |
51 | #endif | 51 | #endif |
52 | } | 52 | } |
@@ -113,7 +113,7 @@ static void ca_midi_cmd(struct snd_ca_midi *midi, unsigned char cmd, int ack) | |||
113 | } | 113 | } |
114 | spin_unlock_irqrestore(&midi->input_lock, flags); | 114 | spin_unlock_irqrestore(&midi->input_lock, flags); |
115 | if (!ok) | 115 | if (!ok) |
116 | snd_printk(KERN_ERR "ca_midi_cmd: 0x%x failed at 0x%x (status = 0x%x, data = 0x%x)!!!\n", | 116 | pr_err("ca_midi_cmd: 0x%x failed at 0x%x (status = 0x%x, data = 0x%x)!!!\n", |
117 | cmd, | 117 | cmd, |
118 | midi->get_dev_id_port(midi->dev_id), | 118 | midi->get_dev_id_port(midi->dev_id), |
119 | ca_midi_read_stat(midi), | 119 | ca_midi_read_stat(midi), |