From: Axel Lin Date: Sun, 31 May 2015 04:27:38 +0000 (+0800) Subject: regulator: da9063: Fix up irq leak X-Git-Tag: omap-for-v4.3/legacy-v2-signed~174^2~2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87aef9164a57527f2ac36c226a4e60b20695656;p=pandora-kernel.git regulator: da9063: Fix up irq leak Current code does not set regulators->irq_ldo_lim and regulators->irq_uvov, so it actually calls free_irq(0, regulators) twice in remove() but does not free the irq actually used. Convert to use devm_request_threaded_irq instead and then we don't need to take care the clean up irq so remove irq_ldo_lim and irq_uvov from struct da9063_regulators. Note, regulators->irq_uvov is not used at all in current code. There is a slightly change in this patch, it will return error in probe() if devm_request_threaded_irq fails. If the irq is optional, it should be fine to allow platform_get_irq_byname fails. But current code does not allow platform_get_irq_byname fails. So I think the reason to allow request irq failure is just because the irq leak. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed