Commit c414df12 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Lee Jones

mfd: exynos-lpass: Add missing remove() function

Disable device on driver remove and release allocated regmap.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Acked-for-MFD-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 8f1be5bd
...@@ -138,6 +138,16 @@ static int exynos_lpass_probe(struct platform_device *pdev) ...@@ -138,6 +138,16 @@ static int exynos_lpass_probe(struct platform_device *pdev)
return of_platform_populate(dev->of_node, NULL, NULL, dev); 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) static int __maybe_unused exynos_lpass_suspend(struct device *dev)
{ {
struct exynos_lpass *lpass = dev_get_drvdata(dev); struct exynos_lpass *lpass = dev_get_drvdata(dev);
...@@ -172,6 +182,7 @@ static struct platform_driver exynos_lpass_driver = { ...@@ -172,6 +182,7 @@ static struct platform_driver exynos_lpass_driver = {
.of_match_table = exynos_lpass_of_match, .of_match_table = exynos_lpass_of_match,
}, },
.probe = exynos_lpass_probe, .probe = exynos_lpass_probe,
.remove = exynos_lpass_remove,
}; };
module_platform_driver(exynos_lpass_driver); module_platform_driver(exynos_lpass_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment