diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-10-04 23:08:49 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2005-10-04 23:08:49 +0000 |
commit | e5733592f8e50ee04120a147dc3306dd9a44243c (patch) | |
tree | 8ba0e90819056b0b1fd0c42bfb0e8025739a1781 | |
parent | 7f098d0f207c327e94117599f796411a33d52e94 (diff) |
use pci_register_driver() on recent kernels (issue #5375, compatibility fix only, no functional difference)
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@791 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | pciradio.c | 2 | ||||
-rwxr-xr-x | tor2.c | 2 | ||||
-rwxr-xr-x | wcfxo.c | 2 | ||||
-rwxr-xr-x | wct1xxp.c | 2 | ||||
-rwxr-xr-x | wct4xxp.c | 2 | ||||
-rwxr-xr-x | wctdm.c | 2 | ||||
-rwxr-xr-x | wcte11xp.c | 2 | ||||
-rwxr-xr-x | zaptel.h | 6 |
8 files changed, 13 insertions, 7 deletions
@@ -1796,7 +1796,7 @@ static int __init pciradio_init(void) { int res; - res = pci_module_init(&pciradio_driver); + res = zap_pci_module(&pciradio_driver); if (res) return -ENODEV; return 0; @@ -647,7 +647,7 @@ static struct pci_driver tor2_driver = { static int __init tor2_init(void) { int res; - res = pci_module_init(&tor2_driver); + res = zap_pci_module(&tor2_driver); printk("Registered Tormenta2 PCI\n"); return res; } @@ -1006,7 +1006,7 @@ static int __init wcfxo_init(void) printk("%d: %s\n", x, fxo_modes[x].name); return -ENODEV; } - res = pci_module_init(&wcfxo_driver); + res = zap_pci_module(&wcfxo_driver); if (res) return -ENODEV; return 0; @@ -1390,7 +1390,7 @@ static struct pci_driver t1xxp_driver = { static int __init t1xxp_init(void) { int res; - res = pci_module_init(&t1xxp_driver); + res = zap_pci_module(&t1xxp_driver); if (res) return -ENODEV; return 0; @@ -2935,7 +2935,7 @@ static struct pci_driver t4_driver = { static int __init t4_init(void) { int res; - res = pci_module_init(&t4_driver); + res = zap_pci_module(&t4_driver); if (res) return -ENODEV; return 0; @@ -2357,7 +2357,7 @@ static int __init wctdm_init(void) return -ENODEV; } - res = pci_module_init(&wctdm_driver); + res = zap_pci_module(&wctdm_driver); if (res) return -ENODEV; return 0; @@ -1565,7 +1565,7 @@ static struct pci_driver t1xxp_driver = { static int __init t1xxp_init(void) { int res; - res = pci_module_init(&t1xxp_driver); + res = zap_pci_module(&t1xxp_driver); if (res) return -ENODEV; return 0; @@ -48,6 +48,12 @@ #define LINUX26 #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10) +#define zap_pci_module pci_register_driver +#else +#define zap_pci_module pci_module_init +#endif + #include "ecdis.h" #include "fasthdlc.h" #endif |