Messages in this thread |  | | From | Peter Samuelson <> | Date | Mon, 11 Dec 2000 18:09:31 -0600 (CST) | Subject | Re: [PATCH] remove warning from drivers/net/hp100.c (240-test12-pre7) |
| |
[Rasmus Andersen] > How about this patch? It moves the offending struct to the __init > function where it is used and inside an existing #ifdef CONFIG_PCI.
Hmmmm, if you're messing around with the pci device table, why not just convert it to use new-style PCI init? This is fairly easy to do (I did one driver myself, and that *proves* it's easy). The main points:
1) convert the device table to a 'struct pci_device_id' and reference this struct with a call to MODULE_DEVICE_TABLE(my_struct) 2) create a 'struct pci_driver' function table, rearranging the driver housekeeping functions to fit this table 3) convert your PCI probe loop inn your init function to use pci_module_init(my_pci_driver_struct), which does the looping for you
Thanks to Adam Richter's hard work, there are lots of examples of drivers that have already been converted to this scheme. I don't remember if Adam purposely skipped hp100.c or if it was an oversight.
Peter - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |