diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-08-07 15:34:09 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-08-08 07:47:24 +0200 |
commit | 2508acd40301685f362eb6fdaf79da191ba8ec4f (patch) | |
tree | bad754d59c1ae200f6548db75e687d64f3c941d1 /sound/isa | |
parent | 20869176d7a7509bad9ea6b895469aebea9c8f21 (diff) | |
download | linux-stable-2508acd40301685f362eb6fdaf79da191ba8ec4f.tar.gz linux-stable-2508acd40301685f362eb6fdaf79da191ba8ec4f.tar.bz2 linux-stable-2508acd40301685f362eb6fdaf79da191ba8ec4f.zip |
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
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/als100.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/isa/als100.c b/sound/isa/als100.c index d582eff64082..e70dbf0b099a 100644 --- a/sound/isa/als100.c +++ b/sound/isa/als100.c @@ -23,8 +23,6 @@ #include <sound/opl3.h> #include <sound/sb.h> -#define PFX "als100: " - MODULE_DESCRIPTION("Avance Logic ALS007/ALS1X0"); MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>"); MODULE_LICENSE("GPL"); @@ -112,7 +110,7 @@ static int snd_card_als100_pnp(int dev, struct snd_card_als100 *acard, err = pnp_activate_dev(pdev); if (err < 0) { - snd_printk(KERN_ERR PFX "AUDIO pnp configure failure\n"); + dev_err(&pdev->dev, "AUDIO pnp configure failure\n"); return err; } port[dev] = pnp_port_start(pdev, 0); @@ -135,7 +133,7 @@ static int snd_card_als100_pnp(int dev, struct snd_card_als100 *acard, __mpu_error: if (pdev) { pnp_release_card_device(pdev); - snd_printk(KERN_ERR PFX "MPU401 pnp configure failure, skipping\n"); + dev_err(&pdev->dev, "MPU401 pnp configure failure, skipping\n"); } acard->devmpu = NULL; mpu_port[dev] = -1; @@ -151,7 +149,7 @@ static int snd_card_als100_pnp(int dev, struct snd_card_als100 *acard, __fm_error: if (pdev) { pnp_release_card_device(pdev); - snd_printk(KERN_ERR PFX "OPL3 pnp configure failure, skipping\n"); + dev_err(&pdev->dev, "OPL3 pnp configure failure, skipping\n"); } acard->devopl = NULL; fm_port[dev] = -1; @@ -230,15 +228,15 @@ static int snd_card_als100_probe(int dev, mpu_port[dev], 0, mpu_irq[dev], NULL) < 0) - snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); + dev_err(card->dev, "no MPU-401 device at 0x%lx\n", mpu_port[dev]); } if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) { if (snd_opl3_create(card, fm_port[dev], fm_port[dev] + 2, OPL3_HW_AUTO, 0, &opl3) < 0) { - snd_printk(KERN_ERR PFX "no OPL device at 0x%lx-0x%lx\n", - fm_port[dev], fm_port[dev] + 2); + dev_err(card->dev, "no OPL device at 0x%lx-0x%lx\n", + fm_port[dev], fm_port[dev] + 2); } else { error = snd_opl3_timer_new(opl3, 0, 1); if (error < 0) @@ -324,7 +322,7 @@ static int __init alsa_card_als100_init(void) if (!als100_devices) { pnp_unregister_card_driver(&als100_pnpc_driver); #ifdef MODULE - snd_printk(KERN_ERR "no Avance Logic based soundcards found\n"); + pr_err("no Avance Logic based soundcards found\n"); #endif return -ENODEV; } |