Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
snprintf(name, sizeof(name), "ea/%s", card_fw[fw_index].data);
err = request_firmware(fw_entry, name, pci_device(chip));
if (err < 0)
snprintf(name, sizeof(name), "ea/%s", card_fw[fw_index].data);
err = request_firmware(fw_entry, name, pci_device(chip));
if (err < 0)
- snd_printk(KERN_ERR "get_firmware(): Firmware not available (%d)\n", err);
+ dev_err(chip->card->dev,
+ "get_firmware(): Firmware not available (%d)\n", err);
#ifdef CONFIG_PM_SLEEP
else
chip->fw_cache[fw_index] = *fw_entry;
#ifdef CONFIG_PM_SLEEP
else
chip->fw_cache[fw_index] = *fw_entry;
err = snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params));
if (err < 0) {
err = snd_pcm_lib_malloc_pages(substream,
params_buffer_bytes(hw_params));
if (err < 0) {
- snd_printk(KERN_ERR "malloc_pages err=%d\n", err);
+ dev_err(chip->card->dev, "malloc_pages err=%d\n", err);
spin_lock_irq(&chip->lock);
free_pipes(chip, pipe);
spin_unlock_irq(&chip->lock);
spin_lock_irq(&chip->lock);
free_pipes(chip, pipe);
spin_unlock_irq(&chip->lock);
if ((chip->iores = request_mem_region(chip->dsp_registers_phys, sz,
ECHOCARD_NAME)) == NULL) {
snd_echo_free(chip);
if ((chip->iores = request_mem_region(chip->dsp_registers_phys, sz,
ECHOCARD_NAME)) == NULL) {
snd_echo_free(chip);
- snd_printk(KERN_ERR "cannot get memory region\n");
+ dev_err(chip->card->dev, "cannot get memory region\n");
return -EBUSY;
}
chip->dsp_registers = (volatile u32 __iomem *)
return -EBUSY;
}
chip->dsp_registers = (volatile u32 __iomem *)
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
KBUILD_MODNAME, chip)) {
snd_echo_free(chip);
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
KBUILD_MODNAME, chip)) {
snd_echo_free(chip);
- snd_printk(KERN_ERR "cannot grab irq\n");
+ dev_err(chip->card->dev, "cannot grab irq\n");
return -EBUSY;
}
chip->irq = pci->irq;
return -EBUSY;
}
chip->irq = pci->irq;
sizeof(struct comm_page),
&chip->commpage_dma_buf) < 0) {
snd_echo_free(chip);
sizeof(struct comm_page),
&chip->commpage_dma_buf) < 0) {
snd_echo_free(chip);
- snd_printk(KERN_ERR "cannot allocate the comm page\n");
+ dev_err(chip->card->dev, "cannot allocate the comm page\n");
return -ENOMEM;
}
chip->comm_page_phys = chip->commpage_dma_buf.addr;
return -ENOMEM;
}
chip->comm_page_phys = chip->commpage_dma_buf.addr;
chip->dsp_registers_phys, chip->irq);
if ((err = snd_echo_new_pcm(chip)) < 0) {
chip->dsp_registers_phys, chip->irq);
if ((err = snd_echo_new_pcm(chip)) < 0) {
- snd_printk(KERN_ERR "new pcm error %d\n", err);
+ dev_err(chip->card->dev, "new pcm error %d\n", err);
snd_card_free(card);
return err;
}
snd_card_free(card);
return err;
}
#ifdef ECHOCARD_HAS_MIDI
if (chip->has_midi) { /* Some Mia's do not have midi */
if ((err = snd_echo_midi_create(card, chip)) < 0) {
#ifdef ECHOCARD_HAS_MIDI
if (chip->has_midi) { /* Some Mia's do not have midi */
if ((err = snd_echo_midi_create(card, chip)) < 0) {
- snd_printk(KERN_ERR "new midi error %d\n", err);
+ dev_err(chip->card->dev, "new midi error %d\n", err);
snd_card_free(card);
return err;
}
snd_card_free(card);
return err;
}
err = snd_card_register(card);
if (err < 0)
goto ctl_error;
err = snd_card_register(card);
if (err < 0)
goto ctl_error;
- snd_printk(KERN_INFO "Card registered: %s\n", card->longname);
+ dev_info(card->dev, "Card registered: %s\n", card->longname);
pci_set_drvdata(pci, chip);
dev++;
return 0;
ctl_error:
pci_set_drvdata(pci, chip);
dev++;
return 0;
ctl_error:
- snd_printk(KERN_ERR "new control error %d\n", err);
+ dev_err(card->dev, "new control error %d\n", err);
snd_card_free(card);
return err;
}
snd_card_free(card);
return err;
}
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
KBUILD_MODNAME, chip)) {
snd_echo_free(chip);
if (request_irq(pci->irq, snd_echo_interrupt, IRQF_SHARED,
KBUILD_MODNAME, chip)) {
snd_echo_free(chip);
- snd_printk(KERN_ERR "cannot grab irq\n");
+ dev_err(chip->card->dev, "cannot grab irq\n");
return -EBUSY;
}
chip->irq = pci->irq;
return -EBUSY;
}
chip->irq = pci->irq;
- snd_printk(KERN_ERR "wait_handshake(): Timeout waiting for DSP\n");
+ dev_err(chip->card->dev, "wait_handshake(): Timeout waiting for DSP\n");
for (i = 0; i < 5; i++) {
if (read_dsp(chip, &sn[i])) {
for (i = 0; i < 5; i++) {
if (read_dsp(chip, &sn[i])) {
- snd_printk(KERN_ERR "Failed to read serial number\n");
+ dev_err(chip->card->dev,
+ "Failed to read serial number\n");
err = get_firmware(&fw, chip, asic);
if (err < 0) {
err = get_firmware(&fw, chip, asic);
if (err < 0) {
- snd_printk(KERN_WARNING "Firmware not found !\n");
+ dev_warn(chip->card->dev, "Firmware not found !\n");
i = get_firmware(&fw, chip, FW_361_LOADER);
if (i < 0) {
i = get_firmware(&fw, chip, FW_361_LOADER);
if (i < 0) {
- snd_printk(KERN_WARNING "Firmware not found !\n");
+ dev_warn(chip->card->dev, "Firmware not found !\n");
DE_MID(("Try to send %d bytes...\n", bytes));
sent = write_midi(chip, buf, bytes);
if (sent < 0) {
DE_MID(("Try to send %d bytes...\n", bytes));
sent = write_midi(chip, buf, bytes);
if (sent < 0) {
- snd_printk(KERN_ERR "write_midi() error %d\n", sent);
+ dev_err(chip->card->dev,
+ "write_midi() error %d\n", sent);
/* retry later */
sent = 9000;
chip->midi_full = 1;
/* retry later */
sent = 9000;
chip->midi_full = 1;