From patchwork Thu Jan 26 08:33:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 9538457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C9336046A for ; Thu, 26 Jan 2017 08:35:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70C6F2819A for ; Thu, 26 Jan 2017 08:35:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65907281C3; Thu, 26 Jan 2017 08:35:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13B202819A for ; Thu, 26 Jan 2017 08:35:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753184AbdAZIf3 (ORCPT ); Thu, 26 Jan 2017 03:35:29 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:23346 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752939AbdAZIeJ (ORCPT ); Thu, 26 Jan 2017 03:34:09 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OKD005EPP4VSJ50@mailout1.w1.samsung.com>; Thu, 26 Jan 2017 08:34:07 +0000 (GMT) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083406eucas1p2e275f95e6264d09a8788cb6d4f401e5c~dRUxrsr9v0139801398eucas1p2I; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 7A.3E.30614.E74B9885; Thu, 26 Jan 2017 08:34:06 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9~dRUxAv3h60139801398eucas1p2H; Thu, 26 Jan 2017 08:34:05 +0000 (GMT) X-AuditID: cbfec7f1-f793f6d000007796-53-5889b47e6f64 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 7B.34.06687.DB4B9885; Thu, 26 Jan 2017 08:35:09 +0000 (GMT) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OKD000KKP4KMO50@eusync1.samsung.com>; Thu, 26 Jan 2017 08:34:05 +0000 (GMT) From: Marek Szyprowski To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Krzysztof Kozlowski , Linus Walleij , Tomasz Figa , Lee Jones , Bartlomiej Zolnierkiewicz Subject: [PATCH v2 7/8] mfd: exynos-lpass: Add missing remove() function Date: Thu, 26 Jan 2017 09:33:53 +0100 Message-id: <1485419634-28331-8-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsWy7djP87p1WzojDH79ErP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uVmk5GamJJapJCal5yfkpmXbqsU GuKma6GkkJeYm2qrFKHrGxKkpFCWmFMK5BkZoAEH5wD3YCV9uwS3jEl/9AsaOCtWz53C2MB4 lb2LkZNDQsBE4u3MX1C2mMSFe+vZuhi5OIQEljBKHN/UyA7hNDFJrD56jQmkik3AUKLrbRdY lYjAUkaJ/ys/g1UxC2xhkujadBFslrCAh8Sn1XeAOjg4WARUJbrPW4CEeYHCK07OZ4NYJydx 8thkVhCbU8BT4vTTV2CtQkA1my4uZJ/AyLuAkWEVo0hqaXFuem6xoV5xYm5xaV66XnJ+7iZG YBxsO/Zz8w7GSxuDDzEKcDAq8fAe2NERIcSaWFZcmXuIUYKDWUmE9/zqzggh3pTEyqrUovz4 otKc1OJDjKZAN01klhJNzgfGaF5JvKGJobmloZGxhYW5kZGSOG/JhyvhQgLpiSWp2ampBalF MH1MHJxSDYyx1qvX5EYfyhMpPDdhZ0scZ338Id9m868nL/0/f3ZLEp+S/1Wzx9JHL2q8vOzw NPLxuY+PT/y2ZhN1/6c6/TMnm4j04huc+RftJ8/7dkzZ2zBp2c2DjRtrHzy+rMpfynVyIvel x1vb7QvvPihxUDYxsv/0Znb5me9Xw5hv/vz/enm2p9nqiE4dJZbijERDLeai4kQA8shpk5kC AAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRs=?= =?UTF-8?B?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?TWFyZWsgU3p5cHJvd3NraRtTUlBPTC1LZXJuZWwgKFRQKRtT?= =?UTF-8?B?YW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9 X-RootMTR: 20170126083405eucas1p29a888fa3896e2bd131e23585f7d033d9 References: <1485419634-28331-1-git-send-email-m.szyprowski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Disable device on driver remove and release allocated regmap. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski --- 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);