summaryrefslogtreecommitdiff
path: root/drivers/mfd/rc5t583-irq.c
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-04-21 17:55:55 +0530
committerLee Jones <lee.jones@linaro.org>2016-05-09 13:27:38 +0100
commitb36c82724fa10da7cc73693c6c2c3ab9a6c8034b (patch)
treebc6bfb2b34b1ee9d647c477ec5c01fa3a3d54b7c /drivers/mfd/rc5t583-irq.c
parent1a5422c9e56a20898a73da5726d935d5d8072f78 (diff)
downloadlinux-b36c82724fa10da7cc73693c6c2c3ab9a6c8034b.tar.gz
mfd: rc5t583: Use devm_mfd_add_devices and devm_request_threaded_irq
Use devm_mfd_add_devices() for adding MFD child devices and devm_request_threaded_irq() for IRQ registration. This reduces the need of remove callback for removing MFD child devices and unregistering IRQ. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/rc5t583-irq.c')
-rw-r--r--drivers/mfd/rc5t583-irq.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/mfd/rc5t583-irq.c b/drivers/mfd/rc5t583-irq.c
index 3f8812daa304..f8dde59ea6af 100644
--- a/drivers/mfd/rc5t583-irq.c
+++ b/drivers/mfd/rc5t583-irq.c
@@ -389,17 +389,10 @@ int rc5t583_irq_init(struct rc5t583 *rc5t583, int irq, int irq_base)
irq_clear_status_flags(__irq, IRQ_NOREQUEST);
}
- ret = request_threaded_irq(irq, NULL, rc5t583_irq, IRQF_ONESHOT,
- "rc5t583", rc5t583);
+ ret = devm_request_threaded_irq(rc5t583->dev, irq, NULL, rc5t583_irq,
+ IRQF_ONESHOT, "rc5t583", rc5t583);
if (ret < 0)
dev_err(rc5t583->dev,
"Error in registering interrupt error: %d\n", ret);
return ret;
}
-
-int rc5t583_irq_exit(struct rc5t583 *rc5t583)
-{
- if (rc5t583->chip_irq)
- free_irq(rc5t583->chip_irq, rc5t583);
- return 0;
-}