Staging: comedi: cb_pcidio: fix "section mismatch" error

Store PCI device IDs in the board info and use this for matching IDs in
the code instead of using the module device table.

This avoids a "section mismatch" error.

Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Ian Abbott and committed by Greg Kroah-Hartman aa65d22a b1f68dc1

+6 -2
+6 -2
drivers/staging/comedi/drivers/cb_pcidio.c
··· 53 * Some drivers use arrays such as this, other do not. 54 */ 55 struct pcidio_board { 56 - const char *name; /* anme of the board */ 57 int n_8255; /* number of 8255 chips on board */ 58 59 /* indices of base address regions */ ··· 65 static const struct pcidio_board pcidio_boards[] = { 66 { 67 .name = "pci-dio24", 68 .n_8255 = 1, 69 .pcicontroler_badrindex = 1, 70 .dioregs_badrindex = 2, 71 }, 72 { 73 .name = "pci-dio24h", 74 .n_8255 = 1, 75 .pcicontroler_badrindex = 1, 76 .dioregs_badrindex = 2, 77 }, 78 { 79 .name = "pci-dio48h", 80 .n_8255 = 2, 81 .pcicontroler_badrindex = 0, 82 .dioregs_badrindex = 1, ··· 210 continue; 211 /* loop through cards supported by this driver */ 212 for (index = 0; index < ARRAY_SIZE(pcidio_boards); index++) { 213 - if (pcidio_pci_table[index].device != pcidev->device) 214 continue; 215 216 /* was a particular bus/slot requested? */
··· 53 * Some drivers use arrays such as this, other do not. 54 */ 55 struct pcidio_board { 56 + const char *name; /* name of the board */ 57 + int dev_id; 58 int n_8255; /* number of 8255 chips on board */ 59 60 /* indices of base address regions */ ··· 64 static const struct pcidio_board pcidio_boards[] = { 65 { 66 .name = "pci-dio24", 67 + .dev_id = 0x0028, 68 .n_8255 = 1, 69 .pcicontroler_badrindex = 1, 70 .dioregs_badrindex = 2, 71 }, 72 { 73 .name = "pci-dio24h", 74 + .dev_id = 0x0014, 75 .n_8255 = 1, 76 .pcicontroler_badrindex = 1, 77 .dioregs_badrindex = 2, 78 }, 79 { 80 .name = "pci-dio48h", 81 + .dev_id = 0x000b, 82 .n_8255 = 2, 83 .pcicontroler_badrindex = 0, 84 .dioregs_badrindex = 1, ··· 206 continue; 207 /* loop through cards supported by this driver */ 208 for (index = 0; index < ARRAY_SIZE(pcidio_boards); index++) { 209 + if (pcidio_boards[index].dev_id != pcidev->device) 210 continue; 211 212 /* was a particular bus/slot requested? */