Thread (27 messages) flat view 27 messages, 4 authors, 2011-10-19

[PATCH 2/6] drivers/base: add bus for System-on-Chip devices

From: Jamie Iles <hidden>
Date: 2011-10-18 14:15:27
Also in: lkml

Hi Arnd,

On Tue, Oct 18, 2011 at 04:05:12PM +0200, Arnd Bergmann wrote:
On Tuesday 18 October 2011, Lee Jones wrote:
quoted
On 17/10/11 17:18, Greg KH wrote:
quoted
On Mon, Oct 17, 2011 at 12:52:54PM +0100, Lee Jones wrote:
quoted
+
+	bus_unregister(&soc_bus_type);
What happens if you have more than one SOC device?  I think you just
oopsed.
I think you're right.

When to you suggest we unregister the bus?
Do it in the same way as registering it, as a module_exit() function
below the initcall that instantiates it. These interfaces usually come
in pairs, so if something does not look symmetric, you should better
have another look.
I can't think of a system where it make sense to have this as a loadable 
module so can't we just register the bus_type and never unregister it 
like the platform and spi busses for example?

Also, (and I'm right at the edge of my knowledge here!) wouldn't you 
also need to add reference counting of the module when 
creating/destroying a soc device to prevent the module and bus 
disappearing whilst you had devices with a reference to it?

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