diff options
author | Axel Lin <axel.lin@ingics.com> | 2015-05-31 06:27:38 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-06-02 16:38:36 +0200 |
commit | d87aef9164a57527f2ac36c226a4e60b20695656 (patch) | |
tree | d031b189b6c2675c37f9469579d8036a9544472a /drivers/regulator/Kconfig | |
parent | Linux 4.1-rc1 (diff) | |
download | linux-d87aef9164a57527f2ac36c226a4e60b20695656.tar.xz linux-d87aef9164a57527f2ac36c226a4e60b20695656.zip |
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 <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/Kconfig')
0 files changed, 0 insertions, 0 deletions