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