diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2016-02-10 14:29:50 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-15 19:40:13 +0000 |
commit | 800c3a0e683601c4ede490e8525852e63b0f6615 (patch) | |
tree | e691d94a8dda7c6d045f2884b23d99b25c4e353a /drivers/dma/ppc4xx/adma.c | |
parent | 46189518d73080f4e4ea269a3b0f4b8583f486bd (diff) | |
download | blackbird-op-linux-800c3a0e683601c4ede490e8525852e63b0f6615.tar.gz blackbird-op-linux-800c3a0e683601c4ede490e8525852e63b0f6615.zip |
regmap: irq: add devm apis for regmap_{add,del}_irq_chip
Add device managed APIs for regmap_add_irq_chip() and
regmap_del_irq_chip() so that it can be managed by
device framework for freeing it.
This helps on following:
1. Maintaining the sequence of resource allocation and deallocation
regmap_add_irq_chip(&d);
devm_requested_threaded_irq(virq)
On free path:
regmap_del_irq_chip(d);
and then removing the irq registration.
On this case, regmap irq is deleted before the irq is free.
This force to use normal irq registration.
By using devm apis, the sequence can be maintain properly:
devm_regmap_add_irq_chip(&d);
devm_requested_threaded_irq(virq);
and resource deallocation will be done in reverse order
by device framework.
2. No need to delete the regmap_irq_chip in error path or remove
callback and hence there is less code on this path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/dma/ppc4xx/adma.c')
0 files changed, 0 insertions, 0 deletions