--- zzzz-none-000/linux-3.10.107/sound/pci/ctxfi/cthw20k1.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/sound/pci/ctxfi/cthw20k1.c 2021-02-04 17:41:59.000000000 +0000 @@ -1262,7 +1262,8 @@ /* Set up device page table */ if ((~0UL) == info->vm_pgt_phys) { - printk(KERN_ERR "Wrong device page table page address!\n"); + dev_err(hw->card->dev, + "Wrong device page table page address!\n"); return -1; } @@ -1321,7 +1322,7 @@ mdelay(40); } if (i >= 3) { - printk(KERN_ALERT "PLL initialization failed!!!\n"); + dev_alert(hw->card->dev, "PLL initialization failed!!!\n"); return -EBUSY; } @@ -1345,7 +1346,7 @@ break; } if (!get_field(gctl, GCTL_AID)) { - printk(KERN_ALERT "Card Auto-init failed!!!\n"); + dev_alert(hw->card->dev, "Card Auto-init failed!!!\n"); return -EBUSY; } @@ -1796,7 +1797,7 @@ unsigned int is_uaa; unsigned int data[4] = {0}; unsigned int io_base; - void *mem_base; + void __iomem *mem_base; int i; const u32 CTLX = CTLBITS('C', 'T', 'L', 'X'); const u32 CTL_ = CTLBITS('C', 'T', 'L', '-'); @@ -1935,7 +1936,8 @@ err = request_irq(pci->irq, ct_20k1_interrupt, IRQF_SHARED, KBUILD_MODNAME, hw); if (err < 0) { - printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq); + dev_err(hw->card->dev, + "XFi: Cannot get irq %d\n", pci->irq); goto error2; } hw->irq = pci->irq; @@ -1976,11 +1978,8 @@ free_irq(hw->irq, hw); hw->irq = -1; - - if (hw->mem_base) - iounmap((void *)hw->mem_base); - - hw->mem_base = (unsigned long)NULL; + iounmap(hw->mem_base); + hw->mem_base = NULL; if (hw->io_base) pci_release_regions(hw->pci); @@ -2090,20 +2089,11 @@ pci_write_config_dword(pci, UAA_CFG_SPACE_FLAG, 0x0); } - pci_disable_device(pci); - pci_save_state(pci); - pci_set_power_state(pci, PCI_D3hot); - return 0; } static int hw_resume(struct hw *hw, struct card_conf *info) { - struct pci_dev *pci = hw->pci; - - pci_set_power_state(pci, PCI_D0); - pci_restore_state(pci); - /* Re-initialize card hardware. */ return hw_card_init(hw, info); }