--- zzzz-none-000/linux-3.10.107/drivers/media/pci/bt8xx/bt878.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/pci/bt8xx/bt878.c 2021-02-04 17:41:59.000000000 +0000 @@ -101,28 +101,20 @@ if (!bt->buf_cpu) { bt->buf_size = 128 * 1024; - bt->buf_cpu = - pci_alloc_consistent(bt->dev, bt->buf_size, - &bt->buf_dma); - + bt->buf_cpu = pci_zalloc_consistent(bt->dev, bt->buf_size, + &bt->buf_dma); if (!bt->buf_cpu) return -ENOMEM; - - memset(bt->buf_cpu, 0, bt->buf_size); } if (!bt->risc_cpu) { bt->risc_size = PAGE_SIZE; - bt->risc_cpu = - pci_alloc_consistent(bt->dev, bt->risc_size, - &bt->risc_dma); - + bt->risc_cpu = pci_zalloc_consistent(bt->dev, bt->risc_size, + &bt->risc_dma); if (!bt->risc_cpu) { bt878_mem_free(bt); return -ENOMEM; } - - memset(bt->risc_cpu, 0, bt->risc_size); } return 0; @@ -424,9 +416,6 @@ int result = 0; unsigned char lat; struct bt878 *bt; -#if defined(__powerpc__) - unsigned int cmd; -#endif unsigned int cardid; printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n", @@ -469,15 +458,6 @@ printk("irq: %d, latency: %d, memory: 0x%lx\n", bt->irq, lat, bt->bt878_adr); - -#if defined(__powerpc__) - /* on OpenFirmware machines (PowerMac at least), PCI memory cycle */ - /* response on cards with no firmware is not enabled by OF */ - pci_read_config_dword(dev, PCI_COMMAND, &cmd); - cmd = (cmd | PCI_COMMAND_MEMORY); - pci_write_config_dword(dev, PCI_COMMAND, cmd); -#endif - #ifdef __sparc__ bt->bt878_mem = (unsigned char *) bt->bt878_adr; #else @@ -488,8 +468,7 @@ btwrite(0, BT848_INT_MASK); result = request_irq(bt->irq, bt878_irq, - IRQF_SHARED | IRQF_DISABLED, "bt878", - (void *) bt); + IRQF_SHARED, "bt878", (void *) bt); if (result == -EINVAL) { printk(KERN_ERR "bt878(%d): Bad irq number or handler\n", bt878_num); @@ -563,7 +542,6 @@ bt->shutdown = 1; bt878_mem_free(bt); - pci_set_drvdata(pci_dev, NULL); pci_disable_device(pci_dev); return; } @@ -600,9 +578,3 @@ module_exit(bt878_cleanup_module); MODULE_LICENSE("GPL"); - -/* - * Local variables: - * c-basic-offset: 8 - * End: - */