sunhme.c patch for new PCI interface (UNTESTED)
Quoted 4 lines · I wrote:
[...] the cost of incorrectly
using__initdatawhen__devinitdatawas correct is that the user's KERNEL WILL CRASH when the notebook is inserted or removed from such a docking station, even when the kernel is built withCONFIG_HOTPLUG.
My statement above, without some missing qualification, is wrong.
I should have qualified this statement more carefully. (I'm sure the flames are already in the mail about this.) The kernel will crash in any case if the relevant driver does not support hot plugging.and the notebook is being removed with the PCI driver still loaded.
For drivers that do not support hot plugging, we could use__initdata instead of __devinitdata, since they will crash in any case. However, violating the instructions in Documentation/pci.txt ("The ID table array should be marked __devinitdata") in this way will provoke a slew of driver bugs as the over one hundred remaining PCI drivers are converted to the new PCI interface and some authors overlook the need to change the MODULE_DEVICE_TABLE storage class.
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."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/