MODULE_DEVICE_TABLE for stallion serial card drivers
PATCH 1/1 MODULE_DEVICE_TABLE for stallion serial card drivers
Hi,
Untested, but compiles ...
Best regards.
Signature · 2 lines
Andrey Panin | Embedded systems software engineer [email protected] | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
linux/drivers/char/istallion.c renamed from linux.vanilla/drivers/char/istallion.c +6 -0
@@ -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); +/*****************************************************************************/ /*
drivers/char/stallion.c +15 -9
@@ -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); }