On Tue, Jan 13, 2004 at 06:09:26PM -0800, Andrew Morton wrote: > Why is kyro_modedb[] and the code which touches it under #ifdef MODULE? > No particular reason, really. I hadn't been following some of the recent fbdev changes, so I wasn't sure if this was necessary or not (I was using tdfxfb as a reference when tracking API changes, and noticed that it did the #ifdef MODULE stuff which it never did earlier). I'll happily drop the #ifdef MODULE bits if this isn't necessary. James? > kyrofb_pci_tbl[] cannot be marked __devinitdata - it is linked into > system-wide PCI tables and will be walked at various times in the kernel. > If it is in a discarded section the kernel oopses. > Okay, I'll remove that. > Shouldn't the module_exit(kyrofb_exit); be inside #ifdef MODULE too? > Yes, I suppose. > > In general, what are the fbdev drivers doing here btw? It's very strange > that some core file (fbmem.c) has to "know" about individual card drivers. > It should be sufficient for the driver to just register itself with the core > at the drivers's module_init() time. > This is done for device ordering as far as I recall. Devices listed first on the command line are numbered first, with the rest coming up in the order that they're listed in fb_drivers[]. I had some patches against this awhile ago that redid some of this, getting rid of fb_drivers[], putting ordered devices in a list and logically assigning IDs based off of that, etc. but still letting the drivers come up on their own through module_init(). I was planning on working on this for 2.7, as I didn't have enough time under 2.5. > Sigh. Too late to fix that now I guess. I'll send you another patch for this as soon as I hear back from James or someone else about the modedb / #ifdef MODULE stuff, I don't see any reason why it would be required, though.