]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ALSA: mtpav: Use standard print API
authorTakashi Iwai <tiwai@suse.de>
Wed, 7 Aug 2024 13:33:55 +0000 (15:33 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 8 Aug 2024 05:47:22 +0000 (07:47 +0200)
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.

The commented-out debug prints got removed, too.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20240807133452.9424-6-tiwai@suse.de
sound/drivers/mtpav.c

index f212f233ea618efffb6ebe1d0395aaef80bb651e..946184a2a7589152891b5eccf64ce70c02102b40 100644 (file)
@@ -285,10 +285,6 @@ static void snd_mtpav_output_port_write(struct mtpav *mtp_card,
 
                snd_mtpav_send_byte(mtp_card, 0xf5);
                snd_mtpav_send_byte(mtp_card, portp->hwport);
-               /*
-               snd_printk(KERN_DEBUG "new outport: 0x%x\n",
-                          (unsigned int) portp->hwport);
-               */
                if (!(outbyte & 0x80) && portp->running_status)
                        snd_mtpav_send_byte(mtp_card, portp->running_status);
        }
@@ -522,8 +518,6 @@ static void snd_mtpav_read_bytes(struct mtpav *mcrd)
 
        u8 sbyt = snd_mtpav_getreg(mcrd, SREG);
 
-       /* printk(KERN_DEBUG "snd_mtpav_read_bytes() sbyt: 0x%x\n", sbyt); */
-
        if (!(sbyt & SIGS_BYTE))
                return;
 
@@ -569,13 +563,13 @@ static int snd_mtpav_get_ISA(struct mtpav *mcard)
        mcard->res_port = devm_request_region(mcard->card->dev, port, 3,
                                              "MotuMTPAV MIDI");
        if (!mcard->res_port) {
-               snd_printk(KERN_ERR "MTVAP port 0x%lx is busy\n", port);
+               dev_err(mcard->card->dev, "MTVAP port 0x%lx is busy\n", port);
                return -EBUSY;
        }
        mcard->port = port;
        if (devm_request_irq(mcard->card->dev, irq, snd_mtpav_irqh, 0,
                             "MOTU MTPAV", mcard)) {
-               snd_printk(KERN_ERR "MTVAP IRQ %d busy\n", irq);
+               dev_err(mcard->card->dev, "MTVAP IRQ %d busy\n", irq);
                return -EBUSY;
        }
        mcard->irq = irq;
@@ -717,7 +711,9 @@ static int snd_mtpav_probe(struct platform_device *dev)
        card->private_free = snd_mtpav_free;
 
        platform_set_drvdata(dev, card);
-       printk(KERN_INFO "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n", irq, port);
+       dev_info(card->dev,
+                "Motu MidiTimePiece on parallel port irq: %d ioport: 0x%lx\n",
+                irq, port);
        return 0;
 }