ALSA: portman2x4: 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-2-tiwai@suse.de
This commit is contained in:
parent
b977831342
commit
94cd66f8dc
@ -385,9 +385,8 @@ static void portman_flush_input(struct portman *pm, unsigned char port)
|
|||||||
command = RXDATA1;
|
command = RXDATA1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
snd_printk(KERN_WARNING
|
dev_warn(pm->card->dev, "%s Won't flush port %i\n",
|
||||||
"portman_flush_input() Won't flush port %i\n",
|
__func__, port);
|
||||||
port);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -712,7 +711,7 @@ static int snd_portman_probe(struct platform_device *pdev)
|
|||||||
err = snd_card_new(&pdev->dev, index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(&pdev->dev, index[dev], id[dev], THIS_MODULE,
|
||||||
0, &card);
|
0, &card);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_printd("Cannot create card\n");
|
dev_dbg(&pdev->dev, "Cannot create card\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
strcpy(card->driver, DRIVER_NAME);
|
strcpy(card->driver, DRIVER_NAME);
|
||||||
@ -726,21 +725,21 @@ static int snd_portman_probe(struct platform_device *pdev)
|
|||||||
&portman_cb, /* callbacks */
|
&portman_cb, /* callbacks */
|
||||||
pdev->id); /* device number */
|
pdev->id); /* device number */
|
||||||
if (pardev == NULL) {
|
if (pardev == NULL) {
|
||||||
snd_printd("Cannot register pardevice\n");
|
dev_dbg(card->dev, "Cannot register pardevice\n");
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
goto __err;
|
goto __err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* claim parport */
|
/* claim parport */
|
||||||
if (parport_claim(pardev)) {
|
if (parport_claim(pardev)) {
|
||||||
snd_printd("Cannot claim parport 0x%lx\n", pardev->port->base);
|
dev_dbg(card->dev, "Cannot claim parport 0x%lx\n", pardev->port->base);
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
goto free_pardev;
|
goto free_pardev;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = portman_create(card, pardev, &pm);
|
err = portman_create(card, pardev, &pm);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_printd("Cannot create main component\n");
|
dev_dbg(card->dev, "Cannot create main component\n");
|
||||||
goto release_pardev;
|
goto release_pardev;
|
||||||
}
|
}
|
||||||
card->private_data = pm;
|
card->private_data = pm;
|
||||||
@ -754,7 +753,7 @@ static int snd_portman_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
err = snd_portman_rawmidi_create(card);
|
err = snd_portman_rawmidi_create(card);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_printd("Creating Rawmidi component failed\n");
|
dev_dbg(card->dev, "Creating Rawmidi component failed\n");
|
||||||
goto __err;
|
goto __err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -768,11 +767,11 @@ static int snd_portman_probe(struct platform_device *pdev)
|
|||||||
/* At this point card will be usable */
|
/* At this point card will be usable */
|
||||||
err = snd_card_register(card);
|
err = snd_card_register(card);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_printd("Cannot register card\n");
|
dev_dbg(card->dev, "Cannot register card\n");
|
||||||
goto __err;
|
goto __err;
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_printk(KERN_INFO "Portman 2x4 on 0x%lx\n", p->base);
|
dev_info(card->dev, "Portman 2x4 on 0x%lx\n", p->base);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
release_pardev:
|
release_pardev:
|
||||||
|
Loading…
Reference in New Issue
Block a user