Ignore:
Timestamp:
Apr 21, 2025, 7:17:25 PM (7 months ago)
Author:
David Azarewicz
Message:

Merge from uniaud32-exp branch

Location:
GPL/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/alsa-kernel/drivers/mpu401/mpu401.c

    r717 r777  
    6969
    7070        if (!uart_enter[dev])
    71                 snd_printk(KERN_ERR "the uart_enter option is obsolete; remove it\n");
     71                dev_err(devptr, "the uart_enter option is obsolete; remove it\n");
    7272
    7373        *rcard = NULL;
     
    8888                                  irq[dev], NULL);
    8989        if (err < 0) {
    90                 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]);
     90                dev_err(devptr, "MPU401 not detected at 0x%lx\n", port[dev]);
    9191                return err;
    9292        }
     
    103103
    104104        if (port[dev] == SNDRV_AUTO_PORT) {
    105                 snd_printk(KERN_ERR "specify port\n");
     105                dev_err(&devptr->dev, "specify port\n");
    106106                return -EINVAL;
    107107        }
    108108        if (irq[dev] == SNDRV_AUTO_IRQ) {
    109                 snd_printk(KERN_ERR "specify or disable IRQ\n");
     109                dev_err(&devptr->dev, "specify or disable IRQ\n");
    110110                return -EINVAL;
    111111        }
     
    146146        if (!pnp_port_valid(device, 0) ||
    147147            pnp_port_flags(device, 0) & IORESOURCE_DISABLED) {
    148                 snd_printk(KERN_ERR "no PnP port\n");
     148                dev_err(&device->dev, "no PnP port\n");
    149149                return -ENODEV;
    150150        }
    151151        if (pnp_port_len(device, 0) < IO_EXTENT) {
    152                 snd_printk(KERN_ERR "PnP port length is %llu, expected %d\n",
     152                dev_err(&device->dev, "PnP port length is %llu, expected %d\n",
    153153                           (unsigned long long)pnp_port_len(device, 0),
    154154                           IO_EXTENT);
     
    159159        if (!pnp_irq_valid(device, 0) ||
    160160            pnp_irq_flags(device, 0) & IORESOURCE_DISABLED) {
    161                 snd_printk(KERN_WARNING "no PnP irq, using polling\n");
     161                dev_warn(&device->dev, "no PnP irq, using polling\n");
    162162                irq[dev] = -1;
    163163        } else {
     
    247247        if (!snd_mpu401_devices) {
    248248#ifdef MODULE
    249                 printk(KERN_ERR "MPU-401 device not found or device busy\n");
     249                pr_err("MPU-401 device not found or device busy\n");
    250250#endif
    251251                snd_mpu401_unregister_all();
  • GPL/trunk/alsa-kernel/drivers/mpu401/mpu401_uart.c

    r703 r777  
    7474#ifdef CONFIG_SND_DEBUG
    7575        if (timeout <= 0)
    76                 snd_printk(KERN_ERR "cmd: clear rx timeout (status = 0x%x)\n",
     76                dev_err(mpu->rmidi->dev,
     77                        "cmd: clear rx timeout (status = 0x%x)\n",
    7778                           mpu->read(mpu, MPU401C(mpu)));
    7879#endif
     
    236237#ifdef CONFIG_SND_DEBUG
    237238                if (!timeout)
    238                         snd_printk(KERN_ERR "cmd: tx timeout (status = 0x%x)\n",
     239                        dev_err(mpu->rmidi->dev,
     240                                "cmd: tx timeout (status = 0x%x)\n",
    239241                                   mpu->read(mpu, MPU401C(mpu)));
    240242#endif
     
    256258        spin_unlock_irqrestore(&mpu->input_lock, flags);
    257259        if (!ok) {
    258                 snd_printk(KERN_ERR "cmd: 0x%x failed at 0x%lx "
    259                            "(status = 0x%x, data = 0x%x)\n", cmd, mpu->port,
     260                dev_err(mpu->rmidi->dev,
     261                        "cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)\n",
     262                        cmd, mpu->port,
    260263                           mpu->read(mpu, MPU401C(mpu)),
    261264                           mpu->read(mpu, MPU401D(mpu)));
     
    558561        mpu->hardware = hardware;
    559562        mpu->irq = -1;
     563        mpu->rmidi = rmidi;
    560564        if (! (info_flags & MPU401_INFO_INTEGRATED)) {
    561565                int res_size = hardware == MPU401_HW_PC98II ? 4 : 2;
    562566                mpu->res = request_region(port, res_size, "MPU401 UART");
    563567                if (!mpu->res) {
    564                         snd_printk(KERN_ERR "mpu401_uart: "
    565                                    "unable to grab port 0x%lx size %d\n",
     568                        dev_err(rmidi->dev,
     569                                "mpu401_uart: unable to grab port 0x%lx size %d\n",
    566570                                   port, res_size);
    567571                        err = -EBUSY;
     
    584588                if (request_irq(irq, snd_mpu401_uart_interrupt, 0,
    585589                                "MPU401 UART", (void *) mpu)) {
    586                         snd_printk(KERN_ERR "mpu401_uart: "
    587                                    "unable to grab IRQ %d\n", irq);
     590                        dev_err(rmidi->dev,
     591                                "mpu401_uart: unable to grab IRQ %d\n", irq);
    588592                        err = -EBUSY;
    589593                        goto free_device;
     
    611615                        rmidi->info_flags |= SNDRV_RAWMIDI_INFO_DUPLEX;
    612616        }
    613         mpu->rmidi = rmidi;
    614617        if (rrawmidi)
    615618                *rrawmidi = rmidi;
Note: See TracChangeset for help on using the changeset viewer.