提交 c414df12 编写于 作者: M Marek Szyprowski 提交者: Lee Jones

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

Disable device on driver remove and release allocated regmap.
Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Acked-for-MFD-by: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NLee Jones <lee.jones@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册