Hello, Dmitry. On Thu, Mar 19, 2015 at 09:52:31AM -0700, Dmitry Torokhov wrote: > I do not think you can teach it to the driver model in general: there is > no definite point when probing is "done". The drivers and devices come > and go, at random moments in time.
I mean, it can check right after the initial iteration is complete. More below. > So here the driver just assumes that all devices will be enumerated > before the driver is loaded and acts upon this knowledge. The whole > schema is fragile (I mean can I compile it in the kernel and see > breaking because of link order changes and driver is now initialized > before PCI devices are scanned? Possibly...). So yeah, I agree with you. This is a totally unnecessary and fragile hack which shouldn't exist. The point of pushing "do it in a generic manner" is forcing people to step away from their myopic views. It's kinda easy to get trapped in one's own bubble and trying to apply the solution (or even the problem itself) at larger scale often helps actually understanding the larger picture. And there are off chances that the person sees a clear use case that other people fail to see. If the person can come up with an acceptable generic mechanism which can justify its complexity, it's a win-win situation. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/