hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/pci/netup_unidvb/netup_unidvb_core.c
....@@ -697,7 +697,7 @@
697697 netup_unidvb_dma_enable(dma, 0);
698698 msleep(50);
699699 cancel_work_sync(&dma->work);
700
- del_timer(&dma->timeout);
700
+ del_timer_sync(&dma->timeout);
701701 }
702702
703703 static int netup_unidvb_dma_setup(struct netup_unidvb_dev *ndev)
....@@ -887,12 +887,7 @@
887887 ndev->lmmio0, (u32)pci_resource_len(pci_dev, 0),
888888 ndev->lmmio1, (u32)pci_resource_len(pci_dev, 1),
889889 pci_dev->irq);
890
- if (request_irq(pci_dev->irq, netup_unidvb_isr, IRQF_SHARED,
891
- "netup_unidvb", pci_dev) < 0) {
892
- dev_err(&pci_dev->dev,
893
- "%s(): can't get IRQ %d\n", __func__, pci_dev->irq);
894
- goto irq_request_err;
895
- }
890
+
896891 ndev->dma_size = 2 * 188 *
897892 NETUP_DMA_BLOCKS_COUNT * NETUP_DMA_PACKETS_COUNT;
898893 ndev->dma_virt = dma_alloc_coherent(&pci_dev->dev,
....@@ -933,6 +928,14 @@
933928 dev_err(&pci_dev->dev, "netup_unidvb: DMA setup failed\n");
934929 goto dma_setup_err;
935930 }
931
+
932
+ if (request_irq(pci_dev->irq, netup_unidvb_isr, IRQF_SHARED,
933
+ "netup_unidvb", pci_dev) < 0) {
934
+ dev_err(&pci_dev->dev,
935
+ "%s(): can't get IRQ %d\n", __func__, pci_dev->irq);
936
+ goto dma_setup_err;
937
+ }
938
+
936939 dev_info(&pci_dev->dev,
937940 "netup_unidvb: device has been initialized\n");
938941 return 0;
....@@ -951,8 +954,6 @@
951954 dma_free_coherent(&pci_dev->dev, ndev->dma_size,
952955 ndev->dma_virt, ndev->dma_phys);
953956 dma_alloc_err:
954
- free_irq(pci_dev->irq, pci_dev);
955
-irq_request_err:
956957 iounmap(ndev->lmmio1);
957958 pci_bar1_error:
958959 iounmap(ndev->lmmio0);