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:56:54
Also in: lkml

On Tue, Oct 18, 2011 at 04:53:09PM +0200, Arnd Bergmann wrote:
On Tuesday 18 October 2011, Jamie Iles wrote:
quoted
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?
No, that's not necessary in a case like this: The bus module remains
pinned by the reference of the module calling it on each exported
symbol that is referenced. The reference counting is only needed
if driver module provides function pointers to the bus module
that might be in the middle of getting called while the driver is
removed. We have this case with the ux500_get_process function
that may be called through sysfs, so that would be a bug if the
code calling device_create_file() was in a module.
Ahh, okay that makes sense.  Thanks for the explanation Arnd.

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