From c414df12bdf7a3e730512ed3971e9d90a494cfa9 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 23 Mar 2017 09:03:26 +0100 Subject: mfd: exynos-lpass: Add missing remove() function Disable device on driver remove and release allocated regmap. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Acked-for-MFD-by: Lee Jones Signed-off-by: Lee Jones --- drivers/mfd/exynos-lpass.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/mfd/exynos-lpass.c b/drivers/mfd/exynos-lpass.c index cbc4a48546c3..9325e0176761 100644 --- a/drivers/mfd/exynos-lpass.c +++ b/drivers/mfd/exynos-lpass.c @@ -138,6 +138,16 @@ static int exynos_lpass_probe(struct platform_device *pdev) return of_platform_populate(dev->of_node, NULL, NULL, dev); } +static int exynos_lpass_remove(struct platform_device *pdev) +{ + struct exynos_lpass *lpass = platform_get_drvdata(pdev); + + exynos_lpass_disable(lpass); + regmap_exit(lpass->top); + + return 0; +} + static int __maybe_unused exynos_lpass_suspend(struct device *dev) { struct exynos_lpass *lpass = dev_get_drvdata(dev); @@ -172,6 +182,7 @@ static struct platform_driver exynos_lpass_driver = { .of_match_table = exynos_lpass_of_match, }, .probe = exynos_lpass_probe, + .remove = exynos_lpass_remove, }; module_platform_driver(exynos_lpass_driver); -- cgit v1.2.3-58-ga151