summaryrefslogtreecommitdiff
path: root/drivers/mfd/da9063-core.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2018-06-11 14:58:39 +0300
committerLee Jones <lee.jones@linaro.org>2018-07-04 09:15:39 +0300
commitaf8df945876c027969fafefb9ec07b79cfadb16f (patch)
tree38f0ed91983e82bed655104b6f0c16d570e97dba /drivers/mfd/da9063-core.c
parent7494de0454af50215bc46c93c83b88a32ca39fab (diff)
downloadlinux-af8df945876c027969fafefb9ec07b79cfadb16f.tar.xz
mfd: da9063: Replace mfd_add_devices with devm counterpart
Use devm_mfd_add_devices() instead of plain mfd_add_devices(), which removes the need for da9063_device_exit() altogether and also for the .remove callback in da9063-i2c.c . Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/da9063-core.c')
-rw-r--r--drivers/mfd/da9063-core.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mfd/da9063-core.c b/drivers/mfd/da9063-core.c
index 2647bb371d86..76258e5709f8 100644
--- a/drivers/mfd/da9063-core.c
+++ b/drivers/mfd/da9063-core.c
@@ -226,20 +226,15 @@ int da9063_device_init(struct da9063 *da9063, unsigned int irq)
da9063->irq_base = regmap_irq_chip_get_base(da9063->regmap_irq);
- ret = mfd_add_devices(da9063->dev, -1, da9063_devs,
- ARRAY_SIZE(da9063_devs), NULL, da9063->irq_base,
- NULL);
+ ret = devm_mfd_add_devices(da9063->dev, -1, da9063_devs,
+ ARRAY_SIZE(da9063_devs), NULL,
+ da9063->irq_base, NULL);
if (ret)
dev_err(da9063->dev, "Cannot add MFD cells\n");
return ret;
}
-void da9063_device_exit(struct da9063 *da9063)
-{
- mfd_remove_devices(da9063->dev);
-}
-
MODULE_DESCRIPTION("PMIC driver for Dialog DA9063");
MODULE_AUTHOR("Krystian Garbaciak");
MODULE_AUTHOR("Michal Hajduk");