Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1567172 > unrolled thread

[PATCH v2 7/8] mfd: exynos-lpass: Add missing remove() function

Started byMarek Szyprowski <m.szyprowski@samsung.com>
First post2017-01-26 09:40 +0100
Last post2017-01-26 21:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 7/8] mfd: exynos-lpass: Add missing remove() function Marek Szyprowski <m.szyprowski@samsung.com> - 2017-01-26 09:40 +0100
    Re: [PATCH v2 7/8] mfd: exynos-lpass: Add missing remove() function Krzysztof Kozlowski <krzk@kernel.org> - 2017-01-26 21:20 +0100

#1567172 — [PATCH v2 7/8] mfd: exynos-lpass: Add missing remove() function

FromMarek Szyprowski <m.szyprowski@samsung.com>
Date2017-01-26 09:40 +0100
Subject[PATCH v2 7/8] mfd: exynos-lpass: Add missing remove() function
Message-ID<t3NL4-53P-19@gated-at.bofh.it>
Disable device on driver remove and release allocated regmap.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 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 be264988bdc9..9dbbedad916f 100644
--- a/drivers/mfd/exynos-lpass.c
+++ b/drivers/mfd/exynos-lpass.c
@@ -137,6 +137,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);
@@ -171,6 +181,7 @@ static SIMPLE_DEV_PM_OPS(lpass_pm_ops, exynos_lpass_suspend,
 		.of_match_table	= exynos_lpass_of_match,
 	},
 	.probe	= exynos_lpass_probe,
+	.remove	= exynos_lpass_remove,
 };
 module_platform_driver(exynos_lpass_driver);
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1567681

FromKrzysztof Kozlowski <krzk@kernel.org>
Date2017-01-26 21:20 +0100
Message-ID<t3YGt-3mw-5@gated-at.bofh.it>
In reply to#1567172
On Thu, Jan 26, 2017 at 09:33:53AM +0100, Marek Szyprowski wrote:
> Disable device on driver remove and release allocated regmap.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/mfd/exynos-lpass.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 

A Suggested-by would be welcomed but beside that thanks for change:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web