From patchwork Thu Nov 28 16:49:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 180451 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp373326ile; Thu, 28 Nov 2019 08:50:15 -0800 (PST) X-Google-Smtp-Source: APXvYqxS29NBxT1YOinxjxGYGIlJtlHPQ7P3q1TiKhc5crMiLgin85aB7rSraS3ebBr7ALnKQ3tT X-Received: by 2002:a50:f081:: with SMTP id v1mr39414735edl.131.1574959815242; Thu, 28 Nov 2019 08:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574959815; cv=none; d=google.com; s=arc-20160816; b=VGUookQxXFelpU9uB9YJR7d/Hm6cpvirUIG16QGNJDkRqfgwlnq7d+tfLQAXRnDkBt lnh+waU/rvb+uHiMfgcr1ajGe512AXOKMXCyhdqCfFdsYcqmYfw3zC2oiSp03McWAP2+ NYNYjKPhiG0LbjnVlSmigG4qQhXVFnMuAy6wcfYUfCB2QY2lIPlKCS1SHhBrn/mCM4Aq bnxMuV7G5yiMp7YPMfWrn4Pkr4jHSeTP5s6KnqJ++mDqaL2FUb67Rn70pKU4L4gHIYBU kn/NxRWu0k0O3SJPCo5a8eVFg7/nYUVjkyLXb0ZM5nrJQPX0k3mM8xqGYBTMkkVyheSL aC5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=6rU2ZvHsnSzYwMs7Z05xUbhf11jabY6wDKJCR5AZiJ8=; b=r0sUUhf9PcHIKGmLaNFaTGXGM9z7JZhpUkTW8eB8IWHsQN0Mpwk6PKRpE35UkE7D7m DULGOpRYuytYvnmeVrX/cySdL+yM7tyh70lljuJ1TGQOOWvsUmdYJ0OCifWkVyvxQVxX KWy0NeircPhVtVhV8bhToBdCsbJbpXhgNVC94ClFAOhdLJO5UBOAsFNjaB9rAnRLbHN1 3oD0uWP6ChxefBsGUOsXIQcSIWvlD1F6pcjGbMWyyVNLHbYfSX1hRveglMosViWu7Sug zBpi8iM8NgBkI58Wjipj8XHbQREFPHFr6uHGWUp/D1nhImm1eZQUxFYpiuBDjzu3xRfD 7W5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xLaNPUaU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si12800266edv.82.2019.11.28.08.50.15; Thu, 28 Nov 2019 08:50:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xLaNPUaU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726985AbfK1QuN (ORCPT + 27 others); Thu, 28 Nov 2019 11:50:13 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43789 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726859AbfK1QuL (ORCPT ); Thu, 28 Nov 2019 11:50:11 -0500 Received: by mail-pf1-f193.google.com with SMTP id h14so3190739pfe.10 for ; Thu, 28 Nov 2019 08:50:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6rU2ZvHsnSzYwMs7Z05xUbhf11jabY6wDKJCR5AZiJ8=; b=xLaNPUaUIKXCW9bn1eGbhGpqCq44pw7uvqUvbHWA4HXNCC3j8wDWHuHJOglsgXtqSk WHKtLL/F++cUfpC9UOFnfKeZYczymLgalUAVwkbj2XQewDTZaY49MRx4nJHwuX2LQ22g hZCd2n+Fs45bxCw09A83bpNdll58/D85vKQUfLvPhdLeJGezwl2ddQlfKf/glagBUdp8 1m8c/kJuqMChbyaZPNkYaMtKvkiReM3ynaPvfVHGYkjtbrEIXiSF6jmuEjWy5hUisEd3 Mo7glQ+8H5q3aaptBsBgrOKcyZoZ596KJiz3lV9SYRpWfxNey2AXYAhCR4YSM6ExV8xq OwkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6rU2ZvHsnSzYwMs7Z05xUbhf11jabY6wDKJCR5AZiJ8=; b=OawF4reN3XpXYevuCvTsuJ85dUCG60pyi1oGQAv9WYV96Cg/kh1Sc51+2ur3MQ6rYQ nJO4pLSlEu7aLvMxZFb7N9rgLfNnW0B+wsFxLiYge6FPfD+3L7W3IFJeefOtXR8fyBJ4 GEoj4s3tySv/X9cj6vl7thYwt59wHz/k/M7twHLARTVZ7ebmuhcdOKgLNTBzYNlNz0Nt +yoEIBFcXkRkNgnKtfYBX0s9ZNBGJ4xE1XcjtjYsqZtb5SnRWFjmeGYCbC4Xzd3htGTb RDBl708tBEPshkI3baDzdG1mZUC7vmw3gDoDCdWXN0rOKdS9QUkY9VfKPa1NdOLnrrfL N9jA== X-Gm-Message-State: APjAAAWDqIh7nMweaHnZcyLewfVIdwkigaI54L37wlR8IPGgzGbQhahy vvS6qEhPKM6xQ53Z/OpRneF7Mw== X-Received: by 2002:a63:4547:: with SMTP id u7mr12360882pgk.423.1574959809102; Thu, 28 Nov 2019 08:50:09 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id a15sm2450343pfh.169.2019.11.28.08.50.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 08:50:08 -0800 (PST) From: Mathieu Poirier To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [stable 4.19][PATCH 05/17] hwrng: stm32 - fix unbalanced pm_runtime_enable Date: Thu, 28 Nov 2019 09:49:50 -0700 Message-Id: <20191128165002.6234-6-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191128165002.6234-1-mathieu.poirier@linaro.org> References: <20191128165002.6234-1-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lionel Debieve commit af0d4442dd6813de6e77309063beb064fa8e89ae upstream No remove function implemented yet in the driver. Without remove function, the pm_runtime implementation complains when removing and probing again the driver. Signed-off-by: Lionel Debieve Signed-off-by: Herbert Xu Cc: stable # 4.19 Signed-off-by: Mathieu Poirier --- drivers/char/hw_random/stm32-rng.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index 042860d97b15..37b338a76ba4 100644 --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -169,6 +169,13 @@ static int stm32_rng_probe(struct platform_device *ofdev) return devm_hwrng_register(dev, &priv->rng); } +static int stm32_rng_remove(struct platform_device *ofdev) +{ + pm_runtime_disable(&ofdev->dev); + + return 0; +} + #ifdef CONFIG_PM static int stm32_rng_runtime_suspend(struct device *dev) { @@ -210,6 +217,7 @@ static struct platform_driver stm32_rng_driver = { .of_match_table = stm32_rng_match, }, .probe = stm32_rng_probe, + .remove = stm32_rng_remove, }; module_platform_driver(stm32_rng_driver);