--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/dec/tulip/xircom_cb.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/dec/tulip/xircom_cb.c 2021-02-04 17:41:59.000000000 +0000 @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -138,7 +137,7 @@ -static DEFINE_PCI_DEVICE_TABLE(xircom_pci_table) = { +static const struct pci_device_id xircom_pci_table[] = { { PCI_VDEVICE(XIRCOM, 0x0003), }, {0,}, }; @@ -289,7 +288,6 @@ err_unmap: pci_iounmap(pdev, private->ioaddr); reg_fail: - pci_set_drvdata(pdev, NULL); dma_free_coherent(d, 8192, private->tx_buffer, private->tx_dma_handle); tx_buf_fail: dma_free_coherent(d, 8192, private->rx_buffer, private->rx_dma_handle); @@ -317,7 +315,6 @@ unregister_netdev(dev); pci_iounmap(pdev, card->ioaddr); - pci_set_drvdata(pdev, NULL); dma_free_coherent(d, 8192, card->tx_buffer, card->tx_dma_handle); dma_free_coherent(d, 8192, card->rx_buffer, card->rx_dma_handle); free_netdev(dev); @@ -1171,16 +1168,4 @@ } } -static int __init xircom_init(void) -{ - return pci_register_driver(&xircom_ops); -} - -static void __exit xircom_exit(void) -{ - pci_unregister_driver(&xircom_ops); -} - -module_init(xircom_init) -module_exit(xircom_exit) - +module_pci_driver(xircom_ops);