[lkml]   [2000]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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

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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.088 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site