diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 08:31:35 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:18 -0500 |
commit | 9c7f9abf62169bb6546faeb61846bdfca63673bd (patch) | |
tree | f92a5da202b5e02f8d9ff79ccc70c670694c90ef /sound/pci/fm801.c | |
parent | 86cd372fe5c5611ffa310720c873e1d210175b5b (diff) |
ALSA: fm801: 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/fm801.c')
-rw-r--r-- | sound/pci/fm801.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 8b6af212cbfe..db18ccabadd6 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -254,7 +254,7 @@ static void snd_fm801_codec_write(struct snd_ac97 *ac97, | |||
254 | goto ok1; | 254 | goto ok1; |
255 | udelay(10); | 255 | udelay(10); |
256 | } | 256 | } |
257 | snd_printk(KERN_ERR "AC'97 interface is busy (1)\n"); | 257 | dev_err(chip->card->dev, "AC'97 interface is busy (1)\n"); |
258 | return; | 258 | return; |
259 | 259 | ||
260 | ok1: | 260 | ok1: |
@@ -269,7 +269,7 @@ static void snd_fm801_codec_write(struct snd_ac97 *ac97, | |||
269 | return; | 269 | return; |
270 | udelay(10); | 270 | udelay(10); |
271 | } | 271 | } |
272 | snd_printk(KERN_ERR "AC'97 interface #%d is busy (2)\n", ac97->num); | 272 | dev_err(chip->card->dev, "AC'97 interface #%d is busy (2)\n", ac97->num); |
273 | } | 273 | } |
274 | 274 | ||
275 | static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short reg) | 275 | static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short reg) |
@@ -285,7 +285,7 @@ static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short | |||
285 | goto ok1; | 285 | goto ok1; |
286 | udelay(10); | 286 | udelay(10); |
287 | } | 287 | } |
288 | snd_printk(KERN_ERR "AC'97 interface is busy (1)\n"); | 288 | dev_err(chip->card->dev, "AC'97 interface is busy (1)\n"); |
289 | return 0; | 289 | return 0; |
290 | 290 | ||
291 | ok1: | 291 | ok1: |
@@ -297,7 +297,7 @@ static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short | |||
297 | goto ok2; | 297 | goto ok2; |
298 | udelay(10); | 298 | udelay(10); |
299 | } | 299 | } |
300 | snd_printk(KERN_ERR "AC'97 interface #%d is busy (2)\n", ac97->num); | 300 | dev_err(chip->card->dev, "AC'97 interface #%d is busy (2)\n", ac97->num); |
301 | return 0; | 301 | return 0; |
302 | 302 | ||
303 | ok2: | 303 | ok2: |
@@ -306,7 +306,7 @@ static unsigned short snd_fm801_codec_read(struct snd_ac97 *ac97, unsigned short | |||
306 | goto ok3; | 306 | goto ok3; |
307 | udelay(10); | 307 | udelay(10); |
308 | } | 308 | } |
309 | snd_printk(KERN_ERR "AC'97 interface #%d is not valid (2)\n", ac97->num); | 309 | dev_err(chip->card->dev, "AC'97 interface #%d is not valid (2)\n", ac97->num); |
310 | return 0; | 310 | return 0; |
311 | 311 | ||
312 | ok3: | 312 | ok3: |
@@ -1100,8 +1100,8 @@ static int snd_fm801_chip_init(struct fm801 *chip, int resume) | |||
1100 | 1100 | ||
1101 | if (wait_for_codec(chip, 0, AC97_RESET, msecs_to_jiffies(750)) < 0) | 1101 | if (wait_for_codec(chip, 0, AC97_RESET, msecs_to_jiffies(750)) < 0) |
1102 | if (!resume) { | 1102 | if (!resume) { |
1103 | snd_printk(KERN_INFO "Primary AC'97 codec not found, " | 1103 | dev_info(chip->card->dev, |
1104 | "assume SF64-PCR (tuner-only)\n"); | 1104 | "Primary AC'97 codec not found, assume SF64-PCR (tuner-only)\n"); |
1105 | chip->tea575x_tuner = 3 | TUNER_ONLY; | 1105 | chip->tea575x_tuner = 3 | TUNER_ONLY; |
1106 | goto __ac97_ok; | 1106 | goto __ac97_ok; |
1107 | } | 1107 | } |
@@ -1225,7 +1225,7 @@ static int snd_fm801_create(struct snd_card *card, | |||
1225 | if ((tea575x_tuner & TUNER_ONLY) == 0) { | 1225 | if ((tea575x_tuner & TUNER_ONLY) == 0) { |
1226 | if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_SHARED, | 1226 | if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_SHARED, |
1227 | KBUILD_MODNAME, chip)) { | 1227 | KBUILD_MODNAME, chip)) { |
1228 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq); | 1228 | dev_err(card->dev, "unable to grab IRQ %d\n", chip->irq); |
1229 | snd_fm801_free(chip); | 1229 | snd_fm801_free(chip); |
1230 | return -EBUSY; | 1230 | return -EBUSY; |
1231 | } | 1231 | } |
@@ -1265,7 +1265,7 @@ static int snd_fm801_create(struct snd_card *card, | |||
1265 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && | 1265 | if ((tea575x_tuner & TUNER_TYPE_MASK) > 0 && |
1266 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { | 1266 | (tea575x_tuner & TUNER_TYPE_MASK) < 4) { |
1267 | if (snd_tea575x_init(&chip->tea, THIS_MODULE)) { | 1267 | if (snd_tea575x_init(&chip->tea, THIS_MODULE)) { |
1268 | snd_printk(KERN_ERR "TEA575x radio not found\n"); | 1268 | dev_err(card->dev, "TEA575x radio not found\n"); |
1269 | snd_fm801_free(chip); | 1269 | snd_fm801_free(chip); |
1270 | return -ENODEV; | 1270 | return -ENODEV; |
1271 | } | 1271 | } |
@@ -1274,13 +1274,14 @@ static int snd_fm801_create(struct snd_card *card, | |||
1274 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { | 1274 | for (tea575x_tuner = 1; tea575x_tuner <= 3; tea575x_tuner++) { |
1275 | chip->tea575x_tuner = tea575x_tuner; | 1275 | chip->tea575x_tuner = tea575x_tuner; |
1276 | if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) { | 1276 | if (!snd_tea575x_init(&chip->tea, THIS_MODULE)) { |
1277 | snd_printk(KERN_INFO "detected TEA575x radio type %s\n", | 1277 | dev_info(card->dev, |
1278 | "detected TEA575x radio type %s\n", | ||
1278 | get_tea575x_gpio(chip)->name); | 1279 | get_tea575x_gpio(chip)->name); |
1279 | break; | 1280 | break; |
1280 | } | 1281 | } |
1281 | } | 1282 | } |
1282 | if (tea575x_tuner == 4) { | 1283 | if (tea575x_tuner == 4) { |
1283 | snd_printk(KERN_ERR "TEA575x radio not found\n"); | 1284 | dev_err(card->dev, "TEA575x radio not found\n"); |
1284 | chip->tea575x_tuner = TUNER_DISABLED; | 1285 | chip->tea575x_tuner = TUNER_DISABLED; |
1285 | } | 1286 | } |
1286 | } | 1287 | } |
@@ -1410,8 +1411,7 @@ static int snd_fm801_resume(struct device *dev) | |||
1410 | pci_set_power_state(pci, PCI_D0); | 1411 | pci_set_power_state(pci, PCI_D0); |
1411 | pci_restore_state(pci); | 1412 | pci_restore_state(pci); |
1412 | if (pci_enable_device(pci) < 0) { | 1413 | if (pci_enable_device(pci) < 0) { |
1413 | printk(KERN_ERR "fm801: pci_enable_device failed, " | 1414 | dev_err(dev, "pci_enable_device failed, disabling device\n"); |
1414 | "disabling device\n"); | ||
1415 | snd_card_disconnect(card); | 1415 | snd_card_disconnect(card); |
1416 | return -EIO; | 1416 | return -EIO; |
1417 | } | 1417 | } |