The following patch adds a pci_device_id table and a MODULE_DEVICE_TABLE delcaration to each remaining PCI driver in linux-2.4.0-test11/drivers/char/. I have used the named initializer format for drivers that have only one or two PCI entries, initialize from anonymous integers or where the unlabelled format would still result in more than one line per entry in spite of any spacing tricks. I believe I have now posted patches that completes pci_device_id table coverage for the following directories: drivers/block drivers/char drivers/net drivers/scsi drivers/sound Here is a summary of the number of files in other kernel directories remaining to be updated (generated by counting the number of files with "pci_find" and without "MODULE_DEVICE_TABLE" and removing some obviously inapplicable cases): drivers/acpi 1 drivers/atm 6 drivers/ide 5 drivers/ieee1394 3 drivers/isdn/avmb1 3 drivers/isdn/eicon 2 drivers/isdn/hisax 13 drivers/isdn/hysdn 1 drivers/media/radio 1 drivers/media/video 4 drivers/mtd 1 drivers/net/tokenring 1 drivers/pcmcia 1 drivers/sbus/char 1 drivers/telephony 1 drivers/video 7 As you can see, we are converging on complete MODULE_DEVICE_TABLE coverage for all PCI drivers. -- Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104 [EMAIL PROTECTED] \ / San Jose, California 95129-1034 +1 408 261-6630 | g g d r a s i l United States of America fax +1 408 261-6631 "Free Software For The Rest Of Us."
--- linux-2.4.0-test11/drivers/char/agp/agpgart_be.c Thu Nov 16 13:59:53 2000 +++ linux/drivers/char/agp/agpgart_be.c Wed Nov 22 17:28:09 2000 @@ -56,6 +56,18 @@ EXPORT_SYMBOL(agp_enable); EXPORT_SYMBOL(agp_backend_acquire); EXPORT_SYMBOL(agp_backend_release); +static struct pci_device_id specialix_pci_tbl[] __initdata = { + { + vendor: PCI_ANY_ID, + device: PCI_ANY_ID, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID, + class: PCI_CLASS_BRIDGE_PCI << 8, + class_mask: 0xffff00, + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, specialix_pci_tbl); static void flush_cache(void); --- linux-2.4.0-test11/drivers/char/applicom.c Wed Jul 12 21:58:42 2000 +++ linux/drivers/char/applicom.c Wed Nov 22 16:54:48 2000 @@ -72,6 +72,31 @@ "PCI2000PFB" }; +#if LINUX_VERSION_CODE < 0x20300 +static struct pci_device_id mxser_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_APPLICOM, + device: PCI_DEVICE_ID_APPLICOM_PCIGENERIC, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { + vendor: PCI_VENDOR_ID_APPLICOM, + device: PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { + vendor: PCI_VENDOR_ID_APPLICOM, + device: PCI_DEVICE_ID_APPLICOM_PCI2000PFB, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, mxser_pci_tbl); +#endif + MODULE_AUTHOR("David Woodhouse & Applicom International"); MODULE_DESCRIPTION("Driver for Applicom Profibus card"); MODULE_PARM(irq, "i"); --- linux-2.4.0-test11/drivers/char/cyclades.c Wed Nov 15 00:41:03 2000 +++ linux/drivers/char/cyclades.c Wed Nov 22 18:19:49 2000 @@ -877,6 +877,20 @@ PCI_DEVICE_ID_CYCLOM_Z_Hi, /* Z PCI > 1Mb */ 0 /* end of table */ }; + +static struct pci_device_id cyclades_pci_tbl[] __initdata = { + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Lo, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Y_Hi, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_4Y_Lo, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_4Y_Hi, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_8Y_Lo, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_8Y_Hi, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Z_Lo, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_CYCLADES, PCI_DEVICE_ID_CYCLOM_Z_Hi, PCI_ANY_ID, PCI_ANY_ID}, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, cyclades_pci_tbl); + #endif static void cy_start(struct tty_struct *); --- linux-2.4.0-test11/drivers/char/i810-tco.c Sun Oct 1 19:45:29 2000 +++ linux/drivers/char/i810-tco.c Wed Nov 22 16:55:39 2000 @@ -51,6 +51,17 @@ #define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 #endif +static struct pci_device_id i810_tco_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_INTEL, + device: PCI_DEVICE_ID_INTEL_82801AA_0, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, i810_tco_pci_tbl); + /* Default expire timeout */ #define TIMER_MARGIN 50 /* steps of 0.6sec, 2<n<64. Default is 30 seconds */ --- linux-2.4.0-test11/drivers/char/ip2main.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/char/ip2main.c Wed Nov 22 16:56:41 2000 @@ -370,6 +370,18 @@ MODULE_AUTHOR("Doug McNash"); MODULE_DESCRIPTION("Computone IntelliPort Plus Driver"); # endif /* LINUX_VERSION */ +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + static struct pci_device_id ip2_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_COMPUTONE, + device: PCI_DEVICE_ID_COMPUTONE_IP2EX, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ + }; + MODULE_DEVICE_TABLE(pci, ip2_pci_tbl); +# endif /* LINUX_VERSION >= 2.4.0 */ #endif /* MODULE */ static int poll_only; --- linux-2.4.0-test11/drivers/char/isicom.c Tue Jun 20 07:32:13 2000 +++ linux/drivers/char/isicom.c Wed Nov 22 18:20:32 2000 @@ -46,6 +46,7 @@ #include <linux/interrupt.h> #include <linux/timer.h> #include <linux/ioport.h> +#include <linux/init.h> #include <asm/segment.h> #include <asm/uaccess.h> @@ -66,6 +67,21 @@ 0x2057, 0x2058 }; + +static struct pci_device_id isicom_pci_tbl[] __initdata = { + { VENDOR_ID, 0x2028, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2051, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2052, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2053, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2054, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2055, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2056, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2057, PCI_ANY_ID, PCI_ANY_ID }, + { VENDOR_ID, 0x2058, PCI_ANY_ID, PCI_ANY_ID }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, isicom_pci_tbl); + static int isicom_refcount = 0; static int prev_card = 3; /* start servicing isi_card[0] */ --- linux-2.4.0-test11/drivers/char/istallion.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/char/istallion.c Wed Nov 22 16:57:20 2000 @@ -430,6 +430,17 @@ #ifndef PCI_DEVICE_ID_ECRA #define PCI_DEVICE_ID_ECRA 0x0004 #endif + +static struct pci_device_id istallion_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_STALLION, + device: PCI_DEVICE_ID_ECRA, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, istallion_pci_tbl); #endif /*****************************************************************************/ --- linux-2.4.0-test11/drivers/char/moxa.c Wed May 3 01:45:18 2000 +++ linux/drivers/char/moxa.c Wed Nov 22 16:58:13 2000 @@ -50,6 +50,7 @@ #include <linux/tty_driver.h> #include <linux/delay.h> #include <linux/pci.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -117,6 +118,14 @@ {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C320, MOXA_BOARD_C320_PCI}, {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_CP204J, MOXA_BOARD_CP204J}, }; + +static struct pci_device_id moxa_pci_tbl[] __initdata = { + {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C218, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C320, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_CP204J, PCI_ANY_ID, PCI_ANY_ID}, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, moxa_pci_tbl); typedef struct _moxa_isa_board_conf { int boardType; --- linux-2.4.0-test11/drivers/char/mxser.c Sun Nov 12 20:38:38 2000 +++ linux/drivers/char/mxser.c Wed Nov 22 18:20:41 2000 @@ -53,6 +53,7 @@ #include <linux/mm.h> #include <linux/smp_lock.h> #include <linux/pci.h> +#include <linux/init.h> #include <asm/system.h> #include <asm/io.h> @@ -86,6 +87,10 @@ #define SERIAL_TYPE_NORMAL 1 #define SERIAL_TYPE_CALLOUT 2 +#ifndef SERIAL_XMIT_SIZE +# define SERIAL_XMIT_SIZE (MIN(PAGE_SIZE, 4096)) +#endif + #define WAKEUP_CHARS 256 #define UART_MCR_AFE 0x20 @@ -169,6 +174,13 @@ {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C168, MXSER_BOARD_C168_PCI}, {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C104, MXSER_BOARD_C104_PCI}, }; + +static struct pci_device_id mxser_pci_tbl[] __initdata = { + {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C168, PCI_ANY_ID, PCI_ANY_ID}, + {PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C104, PCI_ANY_ID, PCI_ANY_ID}, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, mxser_pci_tbl); static int ioaddr[MXSER_BOARDS]; static int ttymajor = MXSERMAJOR; --- linux-2.4.0-test11/drivers/char/rocket.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/char/rocket.c Wed Nov 22 16:32:32 2000 @@ -190,8 +190,27 @@ MODULE_PARM(controller, "i"); MODULE_PARM_DESC(controller, "I/O port for (ISA) rocketport controller"); MODULE_PARM(support_low_speed, "i"); -MODULE_PARM_DESC(support_low_speed, "0 means support 50 baud, 1 means support 460400 baud"); -#endif +MODULE_PARM_DESC(support_low_speed, "0 means support 50 baud, 1 means support 460400 +baud"); + +# if LINUX_VERSION_CODE >= 0x020400 +static struct pci_device_id rocket_pci_tbl[] __initdata = { + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP4QUAD, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8J, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8OCTA, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8INTF, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8INTF, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8INTF, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP16INTF, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP32INTF, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RPP4, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RPP8, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_RP, PCI_DEVICE_ID_RP8M, PCI_ANY_ID, PCI_ANY_ID}, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, rocket_pci_tbl); +# endif + +#endif /* > 2.1.11 and MODULE */ #if (LINUX_VERSION_CODE < 131336) int copy_from_user(void *to, const void *from_user, unsigned long len) --- linux-2.4.0-test11/drivers/char/specialix.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/char/specialix.c Wed Nov 22 18:20:50 2000 @@ -93,6 +93,7 @@ #include <linux/tqueue.h> #include <linux/version.h> #include <linux/pci.h> +#include <linux/init.h> /* ************************************************************** */ @@ -2378,6 +2379,16 @@ MODULE_PARM(iobase,"1-" __MODULE_STRING(SX_NBOARD) "i"); MODULE_PARM(irq,"1-" __MODULE_STRING(SX_NBOARD) "i"); +static struct pci_device_id specialix_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_SPECIALIX, + device: PCI_DEVICE_ID_SPECIALIX_IO8, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, specialix_pci_tbl); /* * You can setup up to 4 boards. --- linux-2.4.0-test11/drivers/char/stallion.c Mon Oct 16 12:58:51 2000 +++ linux/drivers/char/stallion.c Wed Nov 22 16:24:13 2000 @@ -448,6 +448,14 @@ static int stl_nrpcibrds = sizeof(stl_pcibrds) / sizeof(stlpcibrd_t); +static struct pci_device_id stallion_pci_tbl[] __initdata = { + { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_EIOPCI, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_STALLION, PCI_DEVICE_ID_ECHPCI832, PCI_ANY_ID, PCI_ANY_ID}, + { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410, PCI_ANY_ID, PCI_ANY_ID}, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, stallion_pci_tbl); + #endif /*****************************************************************************/ --- linux-2.4.0-test11/drivers/char/sx.c Thu Nov 16 12:51:27 2000 +++ linux/drivers/char/sx.c Wed Nov 22 18:21:03 2000 @@ -32,7 +32,10 @@ * USA. * * Revision history: - * $Log: sx.c,v $ + * $Log$ + * Revision 1.1.1.12 2000/08/24 17:00:39 adam + * Import from archive + * * Revision 1.33 2000/03/09 10:00:00 pvdl,wolff * - Fixed module and port counting * - Fixed signal handling @@ -200,8 +203,8 @@ * */ -#define RCS_ID "$Id: sx.c,v 1.33 2000/03/08 10:01:02 wolff, pvdl Exp $" -#define RCS_REV "$Revision: 1.33 $" +#define RCS_ID "$Id$" +#define RCS_REV "$Revision$" #include <linux/module.h> @@ -225,6 +228,7 @@ #include <linux/pci.h> #include <linux/malloc.h> #include <linux/miscdevice.h> +#include <linux/init.h> /* The 3.0.0 version of sxboards/sxwindow.h uses BYTE and WORD.... */ #define BYTE u8 @@ -365,6 +369,16 @@ MODULE_PARM(sx_maxints, "i"); MODULE_PARM(sx_debug, "i"); MODULE_PARM(sx_irqmask, "i"); +static struct pci_device_id sx_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_SPECIALIX, + device: PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, sx_pci_tbl); #endif #endif --- linux-2.4.0-test11/drivers/char/drm/gamma_drv.c Sat Nov 11 18:34:38 2000 +++ linux/drivers/char/drm/gamma_drv.c Wed Nov 22 17:20:18 2000 @@ -115,6 +115,24 @@ MODULE_PARM(devices, "i"); MODULE_PARM_DESC(devices, "devices=x, where x is the number of MX chips on card\n"); + +static struct pci_device_id gamma_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_3DLABS, + device: PCI_DEVICE_ID_3DLABS_GAMMA, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { + vendor: PCI_VENDOR_ID_3DLABS, + device: PCI_DEVICE_ID_3DLABS_MX, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, gamma_pci_tbl); + #ifndef MODULE /* gamma_options is called by the kernel to parse command-line options * passed via the boot-loader (e.g., LILO). It calls the insmod option --- linux-2.4.0-test11/drivers/char/rio/rio_linux.c Thu Nov 16 12:51:27 2000 +++ linux/drivers/char/rio/rio_linux.c Wed Nov 22 17:30:50 2000 @@ -58,6 +58,7 @@ #include <linux/pci.h> #include <linux/malloc.h> #include <linux/miscdevice.h> +#include <linux/init.h> #include <linux/compatmac.h> #include <linux/generic_serial.h> @@ -254,6 +255,16 @@ MODULE_PARM(rio_poll, "i"); MODULE_PARM(rio_debug, "i"); MODULE_PARM(rio_irqmask, "i"); +static struct pci_device_id rio_pci_tbl[] __initdata = { + { + vendor: PCI_VENDOR_ID_SPECIALIX, + device: PCI_DEVICE_ID_SPECIALIX_RIO, + subvendor: PCI_ANY_ID, + subdevice: PCI_ANY_ID + }, + { } /* Terminating entry */ +}; +MODULE_DEVICE_TABLE(pci, rio_pci_tbl); #endif #endif