Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 2508acd

Browse files
committed
ALSA: als100: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked one. It gives better information and allows dynamically control of debug prints. Use the standard print API instead of open-coded printk(). Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240807133452.9424-20-tiwai@suse.de
1 parent 2086917 commit 2508acd

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

sound/isa/als100.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include <sound/opl3.h>
2424
#include <sound/sb.h>
2525

26-
#define PFX "als100: "
27-
2826
MODULE_DESCRIPTION("Avance Logic ALS007/ALS1X0");
2927
MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
3028
MODULE_LICENSE("GPL");
@@ -112,7 +110,7 @@ static int snd_card_als100_pnp(int dev, struct snd_card_als100 *acard,
112110

113111
err = pnp_activate_dev(pdev);
114112
if (err < 0) {
115-
snd_printk(KERN_ERR PFX "AUDIO pnp configure failure\n");
113+
dev_err(&pdev->dev, "AUDIO pnp configure failure\n");
116114
return err;
117115
}
118116
port[dev] = pnp_port_start(pdev, 0);
@@ -135,7 +133,7 @@ static int snd_card_als100_pnp(int dev, struct snd_card_als100 *acard,
135133
__mpu_error:
136134
if (pdev) {
137135
pnp_release_card_device(pdev);
138-
snd_printk(KERN_ERR PFX "MPU401 pnp configure failure, skipping\n");
136+
dev_err(&pdev->dev, "MPU401 pnp configure failure, skipping\n");
139137
}
140138
acard->devmpu = NULL;
141139
mpu_port[dev] = -1;
@@ -151,7 +149,7 @@ static int snd_card_als100_pnp(int dev, struct snd_card_als100 *acard,
151149
__fm_error:
152150
if (pdev) {
153151
pnp_release_card_device(pdev);
154-
snd_printk(KERN_ERR PFX "OPL3 pnp configure failure, skipping\n");
152+
dev_err(&pdev->dev, "OPL3 pnp configure failure, skipping\n");
155153
}
156154
acard->devopl = NULL;
157155
fm_port[dev] = -1;
@@ -230,15 +228,15 @@ static int snd_card_als100_probe(int dev,
230228
mpu_port[dev], 0,
231229
mpu_irq[dev],
232230
NULL) < 0)
233-
snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
231+
dev_err(card->dev, "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
234232
}
235233

236234
if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
237235
if (snd_opl3_create(card,
238236
fm_port[dev], fm_port[dev] + 2,
239237
OPL3_HW_AUTO, 0, &opl3) < 0) {
240-
snd_printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n",
241-
fm_port[dev], fm_port[dev] + 2);
238+
dev_err(card->dev, "no OPL device at 0x%lx-0x%lx\n",
239+
fm_port[dev], fm_port[dev] + 2);
242240
} else {
243241
error = snd_opl3_timer_new(opl3, 0, 1);
244242
if (error < 0)
@@ -324,7 +322,7 @@ static int __init alsa_card_als100_init(void)
324322
if (!als100_devices) {
325323
pnp_unregister_card_driver(&als100_pnpc_driver);
326324
#ifdef MODULE
327-
snd_printk(KERN_ERR "no Avance Logic based soundcards found\n");
325+
pr_err("no Avance Logic based soundcards found\n");
328326
#endif
329327
return -ENODEV;
330328
}

0 commit comments

Comments
 (0)