Thread (18 messages) 18 messages, 5 authors, 2013-08-01

[PATCH 2/2] chipidea: Use devm_request_irq()

From: broonie@kernel.org (Mark Brown)
Date: 2013-07-31 11:50:40
Also in: lkml

On Wed, Jul 31, 2013 at 07:32:44AM -0400, Tejun Heo wrote:
Yeah, if all resources are allocated using devm - note that you can
hook in non-devm resources using devres_alloc() - all resources which
would be necessary for the interrupt handler would have been allocated
before the irq was allocated, right?  And thus they'll of course
released after the IRQ is freed.  The problem arises when devm and
non-devm releases are mixed as non-devm ones would happen before all
devm ones messing up the release sequencing.

quoted
OK, that's helpful.  It'd be good to document this if it's something
the API is intending to guarantee, though - devres.txt doesn't mention
Oh, it's definitely guaranteed.  Nothing would work otherwise.
Most things would work just fine - most of the uses of devm_ are just
resource allocations that can safely be freed in essentially any order.
It doesn't really matter if you free the driver's private structure
before you free the clock that's pointing to it or whatever since
neither has any real connection to the other.
quoted
this and it's not something I'd intuitively expect to be the case.
Oops... I guess I forgot to mention that.  Care to submit a patch?
I'll take a look.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130731/c5f64924/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help