Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
return;
}
}
- snd_printk(KERN_ERR "AC'97 write timeout\n");
+ dev_err(chip->card->dev, "AC'97 write timeout\n");
}
EXPORT_SYMBOL(oxygen_write_ac97);
reg ^= 0xffff;
}
}
- snd_printk(KERN_ERR "AC'97 read timeout on codec %u\n", codec);
+ dev_err(chip->card->dev, "AC'97 read timeout on codec %u\n", codec);
return 0;
}
EXPORT_SYMBOL(oxygen_read_ac97);
OXYGEN_SPI_BUSY) == 0)
return 0;
}
- snd_printk(KERN_ERR "oxygen: SPI wait timeout\n");
+ dev_err(chip->card->dev, "oxygen: SPI wait timeout\n");
return -EIO;
}
& OXYGEN_EEPROM_BUSY))
return;
}
- snd_printk(KERN_ERR "EEPROM write timeout\n");
+ dev_err(chip->card->dev, "EEPROM write timeout\n");
}
oxygen_clear_bits8(chip, OXYGEN_MISC,
OXYGEN_MISC_WRITE_PCI_SUBID);
- snd_printk(KERN_INFO "EEPROM ID restored\n");
+ dev_info(chip->card->dev, "EEPROM ID restored\n");
}
}
err = pci_request_regions(pci, DRIVER);
if (err < 0) {
- snd_printk(KERN_ERR "cannot reserve PCI resources\n");
+ dev_err(card->dev, "cannot reserve PCI resources\n");
goto err_pci_enable;
}
if (!(pci_resource_flags(pci, 0) & IORESOURCE_IO) ||
pci_resource_len(pci, 0) < OXYGEN_IO_SIZE) {
- snd_printk(KERN_ERR "invalid PCI I/O range\n");
+ dev_err(card->dev, "invalid PCI I/O range\n");
err = -ENXIO;
goto err_pci_regions;
}
err = request_irq(pci->irq, oxygen_interrupt, IRQF_SHARED,
KBUILD_MODNAME, chip);
if (err < 0) {
- snd_printk(KERN_ERR "cannot grab interrupt %d\n", pci->irq);
+ dev_err(card->dev, "cannot grab interrupt %d\n", pci->irq);
goto err_card;
}
chip->irq = pci->irq;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
if (pci_enable_device(pci) < 0) {
- snd_printk(KERN_ERR "cannot reenable device");
+ dev_err(dev, "cannot reenable device");
snd_card_disconnect(card);
return -EIO;
}
if (chip->uart_input_count >= 2 &&
chip->uart_input[chip->uart_input_count - 2] == 'O' &&
chip->uart_input[chip->uart_input_count - 1] == 'K') {
- printk(KERN_DEBUG "message from HDMI chip received:\n");
+ dev_dbg(chip->card->dev, "message from HDMI chip received:\n");
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
chip->uart_input, chip->uart_input_count);
chip->uart_input_count = 0;
if (has_power != data->has_power) {
data->has_power = has_power;
if (has_power) {
- snd_printk(KERN_NOTICE "power restored\n");
+ dev_notice(chip->card->dev, "power restored\n");
} else {
- snd_printk(KERN_CRIT
+ dev_crit(chip->card->dev,
"Hey! Don't unplug the power cable!\n");
/* TODO: stop PCMs */
}