lkml.org 
[lkml]   [2001]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
Subject[PATCH] MODULE_DEVICE_TABLE for stallion serial card drivers
From
Hi,

Untested, but compiles ...

Best regards.

--
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.ascdiff -ur -X /usr/dontdiff /linux.vanilla/drivers/char/istallion.c /linux/drivers/char/istallion.c
--- /linux.vanilla/drivers/char/istallion.c Wed Oct 17 11:25:39 2001
+++ /linux/drivers/char/istallion.c Thu Oct 18 12:28:21 2001
@@ -431,6 +431,12 @@
#endif
#endif

+static struct pci_device_id istallion_pci_tbl[] = {
+ { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECRA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { 0 }
+};
+MODULE_DEVICE_TABLE(pci, istallion_pci_tbl);
+
/*****************************************************************************/

/*diff -urN -X /usr/dontdiff linux.vanilla/drivers/char/stallion.c linux/drivers/char/stallion.c
--- linux.vanilla/drivers/char/stallion.c Wed Oct 17 11:25:42 2001
+++ linux/drivers/char/stallion.c Fri Oct 19 12:13:18 2001
@@ -442,14 +442,20 @@
int brdtype;
} stlpcibrd_t;

-static stlpcibrd_t stl_pcibrds[] = {
- { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECHPCI864, BRD_ECH64PCI },
- { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_EIOPCI, BRD_EASYIOPCI },
- { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECHPCI832, BRD_ECHPCI },
- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410, BRD_ECHPCI },
+static struct pci_device_id stl_pcibrds[] = {
+ { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECHPCI864,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, BRD_ECH64PCI },
+ { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_EIOPCI,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, BRD_EASYIOPCI },
+ { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECHPCI832,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, BRD_ECHPCI },
+ { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, BRD_ECHPCI },
+ { 0 }
};
+MODULE_DEVICE_TABLE(pci, stl_pcibrds);

-static int stl_nrpcibrds = sizeof(stl_pcibrds) / sizeof(stlpcibrd_t);
+static int stl_nrpcibrds = (sizeof(stl_pcibrds) / sizeof(stlpcibrd_t)) - 1;

#endif

@@ -2850,8 +2856,8 @@
return(0);

for (i = 0; (i < stl_nrpcibrds); i++)
- while ((dev = pci_find_device(stl_pcibrds[i].vendid,
- stl_pcibrds[i].devid, dev))) {
+ while ((dev = pci_find_device(stl_pcibrds[i].vendor,
+ stl_pcibrds[i].device, dev))) {

/*
* Found a device on the PCI bus that has our vendor and
@@ -2860,7 +2866,7 @@
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE)
continue;

- rc = stl_initpcibrd(stl_pcibrds[i].brdtype, dev);
+ rc = stl_initpcibrd(stl_pcibrds[i].driver_data, dev);
if (rc)
return(rc);
}[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:08    [W:0.048 / U:2.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site