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

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

From: Peter Chen <hidden>
Date: 2013-07-31 13:55:48
Also in: lkml

On Wed, Jul 31, 2013 at 9:27 PM, Mark Brown [off-list ref] wrote:
On Wed, Jul 31, 2013 at 07:55:27AM -0400, Tejun Heo wrote:
quoted
If you have DMA / IRQ / command engine deactivations in devm path
which often is the case with full conversions, freeing any resources
including DMA areas and host private data in the wrong order is a
horrible idea.  It's worse as it won't really be noticeable in most
cases.
It's really only interrupts that affect most devices - if there's DMA or
anything going on after the remove() then as you said earlier the driver
is probably doing something wrong.
I think the main point is we should allocate managed resource which is used
at interrupt handler before devm_request_irq, and all resources used
at interrupt
handler should be managed.

If we use non-managed resource at interrupt handler, but using managed interrupt
handler, things still will go wrong if there is an odd (unexpected)
interrupt after
we finish deactivation at removal.

-- 
BR,
Peter Chen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help