From patchwork Fri Mar 11 07:49:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 8562831 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B05459F46A for ; Fri, 11 Mar 2016 07:50:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E671D20268 for ; Fri, 11 Mar 2016 07:50:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0842E2035E for ; Fri, 11 Mar 2016 07:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934601AbcCKHuG (ORCPT ); Fri, 11 Mar 2016 02:50:06 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:8374 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934502AbcCKHts (ORCPT ); Fri, 11 Mar 2016 02:49:48 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O3V00D9272YWO60@mailout3.w1.samsung.com>; Fri, 11 Mar 2016 07:49:46 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-4c-56e2789a9955 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id AD.B5.16778.A9872E65; Fri, 11 Mar 2016 07:49:46 +0000 (GMT) Received: from localhost.localdomain ([10.113.63.52]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O3V00KWE72HYU40@eusync2.samsung.com>; Fri, 11 Mar 2016 07:49:46 +0000 (GMT) From: Krzysztof Kozlowski To: Matt Mackall , Herbert Xu , Kukjin Kim , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 5/5] hwrng: exynos - Disable runtime PM on driver unbind Date: Fri, 11 Mar 2016 16:49:22 +0900 Message-id: <1457682562-21219-5-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 2.5.0 In-reply-to: <1457682562-21219-1-git-send-email-k.kozlowski@samsung.com> References: <1457682562-21219-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprBLMWRmVeSWpSXmKPExsVy+t/xK7qzKh6FGfxoVrDofiVj8fqFoUX/ 49fMFpseX2O1uH/vJ5PF5V1z2CxmnN/HZLFgWx+jA4fHtgOqHptWdbJ5bF5S79G3ZRWjR9/L DYwenzfJBbBFcdmkpOZklqUW6dslcGX8mGBYcI2zYsu82ywNjDM5uhg5OSQETCTWzprHDmGL SVy4t56ti5GLQ0hgKaPEnpkvmUASQgL/GSVenC4DsdkEjCU2L18CViQi8I1R4sfDc4wgCWYB Q4mf7/6ATRIW8JC4uHk5WJxFQFXi65F7YHFeAXeJL8fOsXYxcgBtk5NYcCEdJMwJVN645RMb xC53iZU3j7JNYORdwMiwilE0tTS5oDgpPddQrzgxt7g0L10vOT93EyMkvL7sYFx8zOoQowAH oxIP74drD8OEWBPLiitzDzFKcDArifBmFj8KE+JNSaysSi3Kjy8qzUktPsQozcGiJM47d9f7 ECGB9MSS1OzU1ILUIpgsEwenVANj1l8+7mZn3nVfVtSvFThfn7uFrW7XC2l3e6Hl616/Xycd 7677+P2SRzduTD63a+HjKR3f8gyuaz6q2mg+60XwktLZR9nWl/nmXNPfwum0yvxwC4sHt2YS T9Ppg0Xc+3RmH1ijtdddg3vH649vjvkZ3/wjfufp6smxO98cmX/6wq+uW5Pn//p1eJUSS3FG oqEWc1FxIgBxGtPDKwIAAA== Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Driver enabled runtime PM but did not revert this on removal. Re-binding of a device triggered warning: exynos-rng 10830400.rng: Unbalanced pm_runtime_enable! Fixes: b329669ea0b5 ("hwrng: exynos - Add support for Exynos random number generator") Signed-off-by: Krzysztof Kozlowski --- drivers/char/hw_random/exynos-rng.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index 68c349bf66a0..cba1ff538c46 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -154,6 +154,13 @@ static int exynos_rng_probe(struct platform_device *pdev) return ret; } +static int exynos_rng_remove(struct platform_device *pdev) +{ + pm_runtime_disable(&pdev->dev); + + return 0; +} + static int __maybe_unused exynos_rng_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -211,6 +218,7 @@ static struct platform_driver exynos_rng_driver = { .of_match_table = exynos_rng_dt_match, }, .probe = exynos_rng_probe, + .remove = exynos_rng_remove, }; module_platform_driver(exynos_rng_driver);