Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: opl4: 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-8-tiwai@suse.de

+5 -5
+4 -4
sound/drivers/opl4/opl4_lib.c
··· 114 114 snd_opl4_enable_opl4(opl4); 115 115 116 116 id1 = snd_opl4_read(opl4, OPL4_REG_MEMORY_CONFIGURATION); 117 - snd_printdd("OPL4[02]=%02x\n", id1); 117 + dev_dbg(opl4->card->dev, "OPL4[02]=%02x\n", id1); 118 118 switch (id1 & OPL4_DEVICE_ID_MASK) { 119 119 case 0x20: 120 120 opl4->hardware = OPL3_HW_OPL4; ··· 130 130 snd_opl4_write(opl4, OPL4_REG_MIX_CONTROL_PCM, 0xff); 131 131 id1 = snd_opl4_read(opl4, OPL4_REG_MIX_CONTROL_FM); 132 132 id2 = snd_opl4_read(opl4, OPL4_REG_MIX_CONTROL_PCM); 133 - snd_printdd("OPL4 id1=%02x id2=%02x\n", id1, id2); 133 + dev_dbg(opl4->card->dev, "OPL4 id1=%02x id2=%02x\n", id1, id2); 134 134 if (id1 != 0x00 || id2 != 0xff) 135 135 return -ENODEV; 136 136 ··· 200 200 opl4->res_fm_port = request_region(fm_port, 8, "OPL4 FM"); 201 201 opl4->res_pcm_port = request_region(pcm_port, 8, "OPL4 PCM/MIX"); 202 202 if (!opl4->res_fm_port || !opl4->res_pcm_port) { 203 - snd_printk(KERN_ERR "opl4: can't grab ports 0x%lx, 0x%lx\n", fm_port, pcm_port); 203 + dev_err(card->dev, "opl4: can't grab ports 0x%lx, 0x%lx\n", fm_port, pcm_port); 204 204 snd_opl4_free(opl4); 205 205 return -EBUSY; 206 206 } ··· 214 214 err = snd_opl4_detect(opl4); 215 215 if (err < 0) { 216 216 snd_opl4_free(opl4); 217 - snd_printd("OPL4 chip not detected at %#lx/%#lx\n", fm_port, pcm_port); 217 + dev_dbg(card->dev, "OPL4 chip not detected at %#lx/%#lx\n", fm_port, pcm_port); 218 218 return err; 219 219 } 220 220
+1 -1
sound/drivers/opl4/yrw801.c
··· 43 43 snd_opl4_read_memory(opl4, buf, 0x1ffffe, 2); 44 44 if (buf[0] != 0x01) 45 45 return -ENODEV; 46 - snd_printdd("YRW801 ROM version %02x.%02x\n", buf[0], buf[1]); 46 + dev_dbg(opl4->card->dev, "YRW801 ROM version %02x.%02x\n", buf[0], buf[1]); 47 47 return 0; 48 48 } 49 49