diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-01-21 05:32:45 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-01-21 05:32:45 +0000 |
commit | 71326629dd760a5e8ac185a4516796f3d2c21aaa (patch) | |
tree | 0bcbd6d11623df43ac263fc687b74bb4588ca21a | |
parent | e97c21411eebba552a83f02bc99ed6c7dfbfdf57 (diff) |
"struct pci_device_id[]" -> "DEFINE_PCI_DEVICE_TABLE"
2.6.25 added the DEFINE_PCI_DEVICE_TABLE macro to make sure that the
pci_device_id tables are put into the correct section in the binary.
Convert all the places where the tables were defined to use them.
This is linux-2.6 commit where the change went in along with the
rationale: 90a1ba0c5e39eeea278f263c28ae02166c5911c8
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Kinsey Moore <kmoore@digium.com>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9584
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9691 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/pciradio.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/tor2-hw.h | 2 | ||||
-rw-r--r-- | drivers/dahdi/wcb4xxp/base.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wcfxo.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wct1xxp.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wct4xxp/base.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wctc4xxp/base.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wctdm.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wcte11xp.c | 2 | ||||
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 2 | ||||
-rw-r--r-- | include/dahdi/kernel.h | 5 |
12 files changed, 16 insertions, 11 deletions
diff --git a/drivers/dahdi/pciradio.c b/drivers/dahdi/pciradio.c index 3d69e5a..00d8168 100644 --- a/drivers/dahdi/pciradio.c +++ b/drivers/dahdi/pciradio.c @@ -1852,7 +1852,7 @@ static void __devexit pciradio_remove_one(struct pci_dev *pdev) } } -static struct pci_device_id pciradio_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(pciradio_pci_tbl) = { { 0xe159, 0x0001, 0xe16b, PCI_ANY_ID, 0, 0, (unsigned long)"PCIRADIO" }, { 0 } }; diff --git a/drivers/dahdi/tor2-hw.h b/drivers/dahdi/tor2-hw.h index 04f01d5..2dceab8 100644 --- a/drivers/dahdi/tor2-hw.h +++ b/drivers/dahdi/tor2-hw.h @@ -108,7 +108,7 @@ #define PCI_VENDOR_ID_PLX 0x10b5 #ifdef __KERNEL__ -static struct pci_device_id tor2_pci_ids[] = +static DEFINE_PCI_DEVICE_TABLE(tor2_pci_ids) = #else #define PCI_ANY_ID -1 static struct tor2_pci_id { diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index cfcc73d..bc7e09d 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -2946,7 +2946,7 @@ static void __devexit b4xxp_remove(struct pci_dev *pdev) return; } -static struct pci_device_id b4xx_ids[] __devinitdata = +static DEFINE_PCI_DEVICE_TABLE(b4xx_ids) = { { 0xd161, 0xb410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long)&wcb4xxp }, { 0x1397, 0x16b8, 0x1397, 0xb552, 0, 0, (unsigned long)&hfc8s }, diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c index 7893c87..6148e50 100644 --- a/drivers/dahdi/wcfxo.c +++ b/drivers/dahdi/wcfxo.c @@ -1031,7 +1031,7 @@ static void __devexit wcfxo_remove_one(struct pci_dev *pdev) } } -static struct pci_device_id wcfxo_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(wcfxo_pci_tbl) = { { 0xe159, 0x0001, 0x8084, PCI_ANY_ID, 0, 0, (unsigned long) &generic }, { 0xe159, 0x0001, 0x8085, PCI_ANY_ID, 0, 0, (unsigned long) &wcx101p }, { 0xe159, 0x0001, 0x8086, PCI_ANY_ID, 0, 0, (unsigned long) &generic }, diff --git a/drivers/dahdi/wct1xxp.c b/drivers/dahdi/wct1xxp.c index 76b038f..c233247 100644 --- a/drivers/dahdi/wct1xxp.c +++ b/drivers/dahdi/wct1xxp.c @@ -1402,7 +1402,7 @@ static void __devexit t1xxp_remove_one(struct pci_dev *pdev) } } -static struct pci_device_id t1xxp_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(t1xxp_pci_tbl) = { { 0xe159, 0x0001, 0x6159, PCI_ANY_ID, 0, 0, (unsigned long) "Digium Wildcard T100P T1/PRI or E100P E1/PRA Board" }, { 0 } }; diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c index 5725df1..506beae 100644 --- a/drivers/dahdi/wct4xxp/base.c +++ b/drivers/dahdi/wct4xxp/base.c @@ -4895,7 +4895,7 @@ static void __devexit t4_remove_one(struct pci_dev *pdev) } -static struct pci_device_id t4_pci_tbl[] __devinitdata = +static DEFINE_PCI_DEVICE_TABLE(t4_pci_tbl) = { { 0x10ee, 0x0314, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long)&wct4xxp }, diff --git a/drivers/dahdi/wctc4xxp/base.c b/drivers/dahdi/wctc4xxp/base.c index dea2ca9..5ff92e9 100644 --- a/drivers/dahdi/wctc4xxp/base.c +++ b/drivers/dahdi/wctc4xxp/base.c @@ -3712,7 +3712,7 @@ static void __devexit wctc4xxp_remove_one(struct pci_dev *pdev) kfree(wc); } -static struct pci_device_id wctc4xxp_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(wctc4xxp_pci_tbl) = { { 0xd161, 0x3400, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctc400p }, /* Digium board */ { 0xd161, 0x8004, PCI_ANY_ID, PCI_ANY_ID, diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c index 7ab1e32..3bf1378 100644 --- a/drivers/dahdi/wctdm.c +++ b/drivers/dahdi/wctdm.c @@ -2746,7 +2746,7 @@ static void __devexit wctdm_remove_one(struct pci_dev *pdev) } } -static struct pci_device_id wctdm_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(wctdm_pci_tbl) = { { 0xe159, 0x0001, 0xa159, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm }, { 0xe159, 0x0001, 0xe159, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm }, { 0xe159, 0x0001, 0xb100, PCI_ANY_ID, 0, 0, (unsigned long) &wctdme }, diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 5b463d9..2fb4e0f 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -5225,7 +5225,7 @@ static void __devexit wctdm_remove_one(struct pci_dev *pdev) } } -static struct pci_device_id wctdm_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(wctdm_pci_tbl) = { { 0xd161, 0x2400, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm2400 }, { 0xd161, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm800 }, { 0xd161, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex800 }, diff --git a/drivers/dahdi/wcte11xp.c b/drivers/dahdi/wcte11xp.c index 3a1eef2..7a1ea74 100644 --- a/drivers/dahdi/wcte11xp.c +++ b/drivers/dahdi/wcte11xp.c @@ -1586,7 +1586,7 @@ static void __devexit t1xxp_remove_one(struct pci_dev *pdev) } } -static struct pci_device_id t1xxp_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(t1xxp_pci_tbl) = { { 0xe159, 0x0001, 0x71fe, PCI_ANY_ID, 0, 0, (unsigned long) "Digium Wildcard TE110P T1/E1 Board" }, { 0xe159, 0x0001, 0x79fe, PCI_ANY_ID, 0, 0, (unsigned long) "Digium Wildcard TE110P T1/E1 Board" }, { 0xe159, 0x0001, 0x795e, PCI_ANY_ID, 0, 0, (unsigned long) "Digium Wildcard TE110P T1/E1 Board" }, diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index fde868b..9d66ebc 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -2406,7 +2406,7 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev) t1_release(wc); } -static struct pci_device_id te12xp_pci_tbl[] = { +static DEFINE_PCI_DEVICE_TABLE(te12xp_pci_tbl) = { { 0xd161, 0x0120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &te120p}, { 0xd161, 0x8000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &te121}, { 0xd161, 0x8001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &te122}, diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 27ab02b..7e28738 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1273,6 +1273,11 @@ wait_for_completion_interruptible_timeout(struct completion *x, #define mutex_unlock(_x) up(_x) #endif +#ifndef DEFINE_PCI_DEVICE_TABLE +#define DEFINE_PCI_DEVICE_TABLE(_x) \ + const struct pci_device_id _x[] __devinitdata +#endif + #ifndef DMA_BIT_MASK #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1)) #endif |