ALSA: cmi8330: 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. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240807133452.9424-23-tiwai@suse.de
This commit is contained in:
parent
09d1e9b4c1
commit
6aa5cb8540
@ -342,7 +342,7 @@ static int snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
|
||||
|
||||
err = pnp_activate_dev(pdev);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR "AD1848 PnP configure failure\n");
|
||||
dev_err(&pdev->dev, "AD1848 PnP configure failure\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
wssport[dev] = pnp_port_start(pdev, 0);
|
||||
@ -356,7 +356,7 @@ static int snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
|
||||
|
||||
err = pnp_activate_dev(pdev);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR "SB16 PnP configure failure\n");
|
||||
dev_err(&pdev->dev, "SB16 PnP configure failure\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
sbport[dev] = pnp_port_start(pdev, 0);
|
||||
@ -376,7 +376,7 @@ static int snd_cmi8330_pnp(int dev, struct snd_cmi8330 *acard,
|
||||
|
||||
err = pnp_activate_dev(pdev);
|
||||
if (err < 0)
|
||||
snd_printk(KERN_ERR "MPU-401 PnP configure failure: will be disabled\n");
|
||||
dev_err(&pdev->dev, "MPU-401 PnP configure failure: will be disabled\n");
|
||||
else {
|
||||
mpuport[dev] = pnp_port_start(pdev, 0);
|
||||
mpuirq[dev] = pnp_irq(pdev, 0);
|
||||
@ -498,8 +498,6 @@ static int snd_cmi8330_resume(struct snd_card *card)
|
||||
#define is_isapnp_selected(dev) 0
|
||||
#endif
|
||||
|
||||
#define PFX "cmi8330: "
|
||||
|
||||
static int snd_cmi8330_card_new(struct device *pdev, int dev,
|
||||
struct snd_card **cardp)
|
||||
{
|
||||
@ -510,7 +508,7 @@ static int snd_cmi8330_card_new(struct device *pdev, int dev,
|
||||
err = snd_devm_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||
sizeof(struct snd_cmi8330), &card);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR PFX "could not get a new card\n");
|
||||
dev_err(pdev, "could not get a new card\n");
|
||||
return err;
|
||||
}
|
||||
acard = card->private_data;
|
||||
@ -531,11 +529,11 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev)
|
||||
wssdma[dev], -1,
|
||||
WSS_HW_DETECT, 0, &acard->wss);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR PFX "AD1848 device busy??\n");
|
||||
dev_err(card->dev, "AD1848 device busy??\n");
|
||||
return err;
|
||||
}
|
||||
if (acard->wss->hardware != WSS_HW_CMI8330) {
|
||||
snd_printk(KERN_ERR PFX "AD1848 not found during probe\n");
|
||||
dev_err(card->dev, "AD1848 not found during probe\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -546,11 +544,11 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev)
|
||||
sbdma16[dev],
|
||||
SB_HW_AUTO, &acard->sb);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR PFX "SB16 device busy??\n");
|
||||
dev_err(card->dev, "SB16 device busy??\n");
|
||||
return err;
|
||||
}
|
||||
if (acard->sb->hardware != SB_HW_16) {
|
||||
snd_printk(KERN_ERR PFX "SB16 not found during probe\n");
|
||||
dev_err(card->dev, "SB16 not found during probe\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -561,22 +559,22 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev)
|
||||
|
||||
err = snd_cmi8330_mixer(card, acard);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR PFX "failed to create mixers\n");
|
||||
dev_err(card->dev, "failed to create mixers\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
err = snd_cmi8330_pcm(card, acard);
|
||||
if (err < 0) {
|
||||
snd_printk(KERN_ERR PFX "failed to create pcms\n");
|
||||
dev_err(card->dev, "failed to create pcms\n");
|
||||
return err;
|
||||
}
|
||||
if (fmport[dev] != SNDRV_AUTO_PORT) {
|
||||
if (snd_opl3_create(card,
|
||||
fmport[dev], fmport[dev] + 2,
|
||||
OPL3_HW_AUTO, 0, &opl3) < 0) {
|
||||
snd_printk(KERN_ERR PFX
|
||||
"no OPL device at 0x%lx-0x%lx ?\n",
|
||||
fmport[dev], fmport[dev] + 2);
|
||||
dev_err(card->dev,
|
||||
"no OPL device at 0x%lx-0x%lx ?\n",
|
||||
fmport[dev], fmport[dev] + 2);
|
||||
} else {
|
||||
err = snd_opl3_hwdep_new(opl3, 0, 1, NULL);
|
||||
if (err < 0)
|
||||
@ -588,7 +586,7 @@ static int snd_cmi8330_probe(struct snd_card *card, int dev)
|
||||
if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
|
||||
mpuport[dev], 0, mpuirq[dev],
|
||||
NULL) < 0)
|
||||
printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n",
|
||||
dev_err(card->dev, "no MPU-401 device at 0x%lx.\n",
|
||||
mpuport[dev]);
|
||||
}
|
||||
|
||||
@ -609,11 +607,11 @@ static int snd_cmi8330_isa_match(struct device *pdev,
|
||||
if (!enable[dev] || is_isapnp_selected(dev))
|
||||
return 0;
|
||||
if (wssport[dev] == SNDRV_AUTO_PORT) {
|
||||
snd_printk(KERN_ERR PFX "specify wssport\n");
|
||||
dev_err(pdev, "specify wssport\n");
|
||||
return 0;
|
||||
}
|
||||
if (sbport[dev] == SNDRV_AUTO_PORT) {
|
||||
snd_printk(KERN_ERR PFX "specify sbport\n");
|
||||
dev_err(pdev, "specify sbport\n");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@ -683,7 +681,7 @@ static int snd_cmi8330_pnp_detect(struct pnp_card_link *pcard,
|
||||
return res;
|
||||
res = snd_cmi8330_pnp(dev, card->private_data, pcard, pid);
|
||||
if (res < 0) {
|
||||
snd_printk(KERN_ERR PFX "PnP detection failed\n");
|
||||
dev_err(card->dev, "PnP detection failed\n");
|
||||
return res;
|
||||
}
|
||||
res = snd_cmi8330_probe(card, dev);
|
||||
|
Loading…
Reference in New Issue
Block a user