From e5733592f8e50ee04120a147dc3306dd9a44243c Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 4 Oct 2005 23:08:49 +0000 Subject: 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 --- pciradio.c | 2 +- tor2.c | 2 +- wcfxo.c | 2 +- wct1xxp.c | 2 +- wct4xxp.c | 2 +- wctdm.c | 2 +- wcte11xp.c | 2 +- zaptel.h | 6 ++++++ 8 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pciradio.c b/pciradio.c index 58df840..0d122aa 100755 --- a/pciradio.c +++ b/pciradio.c @@ -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; diff --git a/tor2.c b/tor2.c index 51d7452..02aba05 100755 --- a/tor2.c +++ b/tor2.c @@ -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; } diff --git a/wcfxo.c b/wcfxo.c index c765f3d..93cc96a 100755 --- a/wcfxo.c +++ b/wcfxo.c @@ -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; diff --git a/wct1xxp.c b/wct1xxp.c index 63f8baf..760bf2b 100755 --- a/wct1xxp.c +++ b/wct1xxp.c @@ -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; diff --git a/wct4xxp.c b/wct4xxp.c index 5adb915..201bcff 100755 --- a/wct4xxp.c +++ b/wct4xxp.c @@ -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; diff --git a/wctdm.c b/wctdm.c index 6e35189..d1e5049 100755 --- a/wctdm.c +++ b/wctdm.c @@ -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; diff --git a/wcte11xp.c b/wcte11xp.c index c217cd3..2c5e372 100755 --- a/wcte11xp.c +++ b/wcte11xp.c @@ -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; diff --git a/zaptel.h b/zaptel.h index ace69e5..59b4aa5 100755 --- a/zaptel.h +++ b/zaptel.h @@ -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 -- cgit v1.2.3