summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2017-03-23 11:03:26 +0300
committerLee Jones <lee.jones@linaro.org>2017-04-27 11:25:07 +0300
commitc414df12bdf7a3e730512ed3971e9d90a494cfa9 (patch)
tree083022ee9fc9e0f20925c49d2c6fc3c4b3935bd7 /drivers/mfd
parent8f1be5bd14e8faf5a1255a32621601bb11a96232 (diff)
downloadlinux-c414df12bdf7a3e730512ed3971e9d90a494cfa9.tar.xz
mfd: exynos-lpass: Add missing remove() function
Disable device on driver remove and release allocated regmap. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/exynos-lpass.c11
1 files changed, 11 insertions, 0 deletions
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);