mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
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>
This commit is contained in:
parent
b1f68dc1d6
commit
aa65d22ae6
1 changed files with 6 additions and 2 deletions
|
@ -53,7 +53,8 @@ Passing a zero for an option is the same as leaving it unspecified.
|
||||||
* Some drivers use arrays such as this, other do not.
|
* Some drivers use arrays such as this, other do not.
|
||||||
*/
|
*/
|
||||||
struct pcidio_board {
|
struct pcidio_board {
|
||||||
const char *name; /* anme of the board */
|
const char *name; /* name of the board */
|
||||||
|
int dev_id;
|
||||||
int n_8255; /* number of 8255 chips on board */
|
int n_8255; /* number of 8255 chips on board */
|
||||||
|
|
||||||
/* indices of base address regions */
|
/* indices of base address regions */
|
||||||
|
@ -64,18 +65,21 @@ struct pcidio_board {
|
||||||
static const struct pcidio_board pcidio_boards[] = {
|
static const struct pcidio_board pcidio_boards[] = {
|
||||||
{
|
{
|
||||||
.name = "pci-dio24",
|
.name = "pci-dio24",
|
||||||
|
.dev_id = 0x0028,
|
||||||
.n_8255 = 1,
|
.n_8255 = 1,
|
||||||
.pcicontroler_badrindex = 1,
|
.pcicontroler_badrindex = 1,
|
||||||
.dioregs_badrindex = 2,
|
.dioregs_badrindex = 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "pci-dio24h",
|
.name = "pci-dio24h",
|
||||||
|
.dev_id = 0x0014,
|
||||||
.n_8255 = 1,
|
.n_8255 = 1,
|
||||||
.pcicontroler_badrindex = 1,
|
.pcicontroler_badrindex = 1,
|
||||||
.dioregs_badrindex = 2,
|
.dioregs_badrindex = 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "pci-dio48h",
|
.name = "pci-dio48h",
|
||||||
|
.dev_id = 0x000b,
|
||||||
.n_8255 = 2,
|
.n_8255 = 2,
|
||||||
.pcicontroler_badrindex = 0,
|
.pcicontroler_badrindex = 0,
|
||||||
.dioregs_badrindex = 1,
|
.dioregs_badrindex = 1,
|
||||||
|
@ -206,7 +210,7 @@ static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||||
continue;
|
continue;
|
||||||
/* loop through cards supported by this driver */
|
/* loop through cards supported by this driver */
|
||||||
for (index = 0; index < ARRAY_SIZE(pcidio_boards); index++) {
|
for (index = 0; index < ARRAY_SIZE(pcidio_boards); index++) {
|
||||||
if (pcidio_pci_table[index].device != pcidev->device)
|
if (pcidio_boards[index].dev_id != pcidev->device)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* was a particular bus/slot requested? */
|
/* was a particular bus/slot requested? */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue