Re: [PATCH 1/2] regulator: wm831x-ldo: Convert todevm_request_threaded_irq

From: Mark Brown
Date: Wed Jun 13 2012 - 05:30:12 EST


On Wed, Jun 13, 2012 at 09:59:27AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>

No, this (and generally a large proportion of possible usages of
devm_request_threaded_irq()) is a bad idea - we need to ensure that the
interrupt cannot fire when we're not in a position to handle it which in
thi case means after the regulator is unregistered. Since we're not
doing anything to explicitly quiesce the interrupt other than free it we
need to ensure that the free_irq() happens strictly before the regulator
is unregistered.

Attachment: signature.asc
Description: Digital signature