aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-25 12:00:26 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-26 10:45:30 -0500
commit03d3ac21780be4d78f8d7679e428bb98fa9411ea (patch)
tree8632f5b2c249cad9369fee85496fbbc45420d892
parenta3fe03f412daf40ab39ba0fbd3f78bf1f0d62856 (diff)
ALSA: oxygen: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/oxygen/oxygen_io.c8
-rw-r--r--sound/pci/oxygen/oxygen_lib.c10
-rw-r--r--sound/pci/oxygen/xonar_hdmi.c2
-rw-r--r--sound/pci/oxygen/xonar_lib.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/sound/pci/oxygen/oxygen_io.c b/sound/pci/oxygen/oxygen_io.c
index 3274907189fe..4b8a32c37e31 100644
--- a/sound/pci/oxygen/oxygen_io.c
+++ b/sound/pci/oxygen/oxygen_io.c
@@ -147,7 +147,7 @@ void oxygen_write_ac97(struct oxygen *chip, unsigned int codec,
147 return; 147 return;
148 } 148 }
149 } 149 }
150 snd_printk(KERN_ERR "AC'97 write timeout\n"); 150 dev_err(chip->card->dev, "AC'97 write timeout\n");
151} 151}
152EXPORT_SYMBOL(oxygen_write_ac97); 152EXPORT_SYMBOL(oxygen_write_ac97);
153 153
@@ -179,7 +179,7 @@ u16 oxygen_read_ac97(struct oxygen *chip, unsigned int codec,
179 reg ^= 0xffff; 179 reg ^= 0xffff;
180 } 180 }
181 } 181 }
182 snd_printk(KERN_ERR "AC'97 read timeout on codec %u\n", codec); 182 dev_err(chip->card->dev, "AC'97 read timeout on codec %u\n", codec);
183 return 0; 183 return 0;
184} 184}
185EXPORT_SYMBOL(oxygen_read_ac97); 185EXPORT_SYMBOL(oxygen_read_ac97);
@@ -208,7 +208,7 @@ static int oxygen_wait_spi(struct oxygen *chip)
208 OXYGEN_SPI_BUSY) == 0) 208 OXYGEN_SPI_BUSY) == 0)
209 return 0; 209 return 0;
210 } 210 }
211 snd_printk(KERN_ERR "oxygen: SPI wait timeout\n"); 211 dev_err(chip->card->dev, "oxygen: SPI wait timeout\n");
212 return -EIO; 212 return -EIO;
213} 213}
214 214
@@ -288,5 +288,5 @@ void oxygen_write_eeprom(struct oxygen *chip, unsigned int index, u16 value)
288 & OXYGEN_EEPROM_BUSY)) 288 & OXYGEN_EEPROM_BUSY))
289 return; 289 return;
290 } 290 }
291 snd_printk(KERN_ERR "EEPROM write timeout\n"); 291 dev_err(chip->card->dev, "EEPROM write timeout\n");
292} 292}
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index efa610cd735c..b67e30602473 100644
--- a/sound/pci/oxygen/oxygen_lib.c
+++ b/sound/pci/oxygen/oxygen_lib.c
@@ -313,7 +313,7 @@ static void oxygen_restore_eeprom(struct oxygen *chip,
313 oxygen_clear_bits8(chip, OXYGEN_MISC, 313 oxygen_clear_bits8(chip, OXYGEN_MISC,
314 OXYGEN_MISC_WRITE_PCI_SUBID); 314 OXYGEN_MISC_WRITE_PCI_SUBID);
315 315
316 snd_printk(KERN_INFO "EEPROM ID restored\n"); 316 dev_info(chip->card->dev, "EEPROM ID restored\n");
317 } 317 }
318} 318}
319 319
@@ -617,13 +617,13 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
617 617
618 err = pci_request_regions(pci, DRIVER); 618 err = pci_request_regions(pci, DRIVER);
619 if (err < 0) { 619 if (err < 0) {
620 snd_printk(KERN_ERR "cannot reserve PCI resources\n"); 620 dev_err(card->dev, "cannot reserve PCI resources\n");
621 goto err_pci_enable; 621 goto err_pci_enable;
622 } 622 }
623 623
624 if (!(pci_resource_flags(pci, 0) & IORESOURCE_IO) || 624 if (!(pci_resource_flags(pci, 0) & IORESOURCE_IO) ||
625 pci_resource_len(pci, 0) < OXYGEN_IO_SIZE) { 625 pci_resource_len(pci, 0) < OXYGEN_IO_SIZE) {
626 snd_printk(KERN_ERR "invalid PCI I/O range\n"); 626 dev_err(card->dev, "invalid PCI I/O range\n");
627 err = -ENXIO; 627 err = -ENXIO;
628 goto err_pci_regions; 628 goto err_pci_regions;
629 } 629 }
@@ -658,7 +658,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
658 err = request_irq(pci->irq, oxygen_interrupt, IRQF_SHARED, 658 err = request_irq(pci->irq, oxygen_interrupt, IRQF_SHARED,
659 KBUILD_MODNAME, chip); 659 KBUILD_MODNAME, chip);
660 if (err < 0) { 660 if (err < 0) {
661 snd_printk(KERN_ERR "cannot grab interrupt %d\n", pci->irq); 661 dev_err(card->dev, "cannot grab interrupt %d\n", pci->irq);
662 goto err_card; 662 goto err_card;
663 } 663 }
664 chip->irq = pci->irq; 664 chip->irq = pci->irq;
@@ -796,7 +796,7 @@ static int oxygen_pci_resume(struct device *dev)
796 pci_set_power_state(pci, PCI_D0); 796 pci_set_power_state(pci, PCI_D0);
797 pci_restore_state(pci); 797 pci_restore_state(pci);
798 if (pci_enable_device(pci) < 0) { 798 if (pci_enable_device(pci) < 0) {
799 snd_printk(KERN_ERR "cannot reenable device"); 799 dev_err(dev, "cannot reenable device");
800 snd_card_disconnect(card); 800 snd_card_disconnect(card);
801 return -EIO; 801 return -EIO;
802 } 802 }
diff --git a/sound/pci/oxygen/xonar_hdmi.c b/sound/pci/oxygen/xonar_hdmi.c
index 136dac6a3964..91d92bc32b75 100644
--- a/sound/pci/oxygen/xonar_hdmi.c
+++ b/sound/pci/oxygen/xonar_hdmi.c
@@ -120,7 +120,7 @@ void xonar_hdmi_uart_input(struct oxygen *chip)
120 if (chip->uart_input_count >= 2 && 120 if (chip->uart_input_count >= 2 &&
121 chip->uart_input[chip->uart_input_count - 2] == 'O' && 121 chip->uart_input[chip->uart_input_count - 2] == 'O' &&
122 chip->uart_input[chip->uart_input_count - 1] == 'K') { 122 chip->uart_input[chip->uart_input_count - 1] == 'K') {
123 printk(KERN_DEBUG "message from HDMI chip received:\n"); 123 dev_dbg(chip->card->dev, "message from HDMI chip received:\n");
124 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, 124 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
125 chip->uart_input, chip->uart_input_count); 125 chip->uart_input, chip->uart_input_count);
126 chip->uart_input_count = 0; 126 chip->uart_input_count = 0;
diff --git a/sound/pci/oxygen/xonar_lib.c b/sound/pci/oxygen/xonar_lib.c
index 0ebe7f5916f9..706b1a42163f 100644
--- a/sound/pci/oxygen/xonar_lib.c
+++ b/sound/pci/oxygen/xonar_lib.c
@@ -56,9 +56,9 @@ static void xonar_ext_power_gpio_changed(struct oxygen *chip)
56 if (has_power != data->has_power) { 56 if (has_power != data->has_power) {
57 data->has_power = has_power; 57 data->has_power = has_power;
58 if (has_power) { 58 if (has_power) {
59 snd_printk(KERN_NOTICE "power restored\n"); 59 dev_notice(chip->card->dev, "power restored\n");
60 } else { 60 } else {
61 snd_printk(KERN_CRIT 61 dev_crit(chip->card->dev,
62 "Hey! Don't unplug the power cable!\n"); 62 "Hey! Don't unplug the power cable!\n");
63 /* TODO: stop PCMs */ 63 /* TODO: stop PCMs */
64 } 64 }