Thread (17 messages) 17 messages, 3 authors, 2011-03-18

Re: [RFC PATCH 1/2] serial: 8250: Add a notifier chain for driver registration.

From: Alan Cox <hidden>
Date: 2011-03-17 12:18:57
Also in: linux-serial, lkml

On Wed, 16 Mar 2011 18:26:06 -0700
David Daney [off-list ref] wrote:
The 8250 driver is a bit weird in that in addition to supporting
platform devices, extra devices can be added by calling
serial8250_register_port().

The problem is that if we call serial8250_register_port() before the
driver is initialized Bad Things happen (we dereference NULL
pointers).

There doesn't seem to be a general way to know if a driver has been
initialized
I've had a bigger dig into this. I think the correct answer is probably
"always go via platform devices or similar". That *is* the notifier in
the kernel of today. serial8250_register_port ultimately should I think
ultimatly become an internal helper.

Alan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help