mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] MODULE_DEVICE_TABLE for stallion serial card drivers
@ 2001-10-19 11:48 Andrey Panin
  0 siblings, 0 replies; only message in thread
From: Andrey Panin @ 2001-10-19 11:48 UTC (permalink / raw)
  To: linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 200 bytes --]

Hi,

Untested, but compiles ...

Best regards.

-- 
Andrey Panin            | Embedded systems software engineer
pazke@orbita1.ru        | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc

[-- Attachment #1.2: patch-istallion --]
[-- Type: text/plain, Size: 566 bytes --]

diff -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);
+
 /*****************************************************************************/
 
 /*

[-- Attachment #1.3: patch-stallion --]
[-- Type: text/plain, Size: 1863 bytes --]

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);
 		}

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-19 11:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-19 11:48 [PATCH] MODULE_DEVICE_TABLE for stallion serial card drivers Andrey Panin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®