From patchwork Tue Dec 3 22:36:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180759 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2162625ile; Tue, 3 Dec 2019 14:58:31 -0800 (PST) X-Google-Smtp-Source: APXvYqw6wuErICtYid0TKd5fC5kPSDLC4LlEvVnzWCSup5KAx5SvT/Ivelbj+ZsZGY+3Ysg47ktt X-Received: by 2002:a9d:1a5:: with SMTP id e34mr233061ote.105.1575413911616; Tue, 03 Dec 2019 14:58:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575413911; cv=none; d=google.com; s=arc-20160816; b=hYLAIvbBU/VUfLcK8n/+NlODSkA9/wiTqaWBRysoBoKTWdFweC8e/vAJTIJdr5jYQA kmKiSCGjrGz4MOkxM7f3cqLtgZY64Eekg2idyymHbeEAEsss4AH3hX2UEHM1hJPiK8bn 96RjDV0vl/Ka1m0FY/NPtQL5+rPylawLYrZzvp9PDFQY1VKbs4DXL+8rNLsBtBeJIxSz M979+Ghe9KSx4Tbj0R1CA+B0RKBTx8LO3Ek8Lw+tSEyDkobhiiQWs2uDbWxWTlUWiR+5 bFKYJ8FDn2Lu+QhcbVXk2xs+9KfRz7vDnr3zElg6kMz2Jv0HGqFocQUnfuPcSpg285Vg jP0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dAkUjq6mOHrHPTAXeF2rIj6korVmWwqByjUiduPYYdA=; b=YlQ2uAiXrBRXwHHYoA4PZ4dxH8n813qaEUBqrbHdfB2EM6JDgiJM9M3mxsfnwsVaAV 9kVgp60eB23ijdRhidZSe195UHkZlhbcQ3ljudiYNfIg9QN+WjpKFrxvTpWyMUclGVz3 LnZWmSZHChQp0Yb0nXYWQZkYGU0O3U8vP/Z1j9XBgLGawGWfQvlWUA0lspvqCiAysdjv WM2/qz64lfk4tnKaDO1q6kouVhV2W1jIX9BIAYtgr/aYaIbJZ+00p2mh0uTSBfv4+dr0 vGOEKEzLN7fSlJwNMdyLniUG75mzQXyyhaHdOmWDcgY8ulLlDjSGJfAa6/8zafP5X/PR KMhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="bK/l6evG"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si2380643oti.47.2019.12.03.14.58.31; Tue, 03 Dec 2019 14:58:31 -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=@kernel.org header.s=default header.b="bK/l6evG"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730089AbfLCW6a (ORCPT + 27 others); Tue, 3 Dec 2019 17:58:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:54804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730121AbfLCW6Z (ORCPT ); Tue, 3 Dec 2019 17:58:25 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 904F820863; Tue, 3 Dec 2019 22:58:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575413905; bh=lBGsPdVqWRIlpSzE9JQT9JoBoAkeI+DuX9UVhFt3syA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bK/l6evGiv5mfJT/elkVJvKpUJcKTcPjvabb4sR2lErXC/Yo31aAcr7bn59GwE19v CGZCCPk5PqROHHz9aICKeX1WTRKm7BH3zqjcFXx9NCqiZ1Ie+d2OaJCpjEcHDP1Ct3 ItcSQX9lp6P6tDeU8exgzDhdMpgNHcB/CFwlgL9E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lionel Debieve , Herbert Xu , Mathieu Poirier Subject: [PATCH 4.19 308/321] hwrng: stm32 - fix unbalanced pm_runtime_enable Date: Tue, 3 Dec 2019 23:36:14 +0100 Message-Id: <20191203223443.169670189@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191203223427.103571230@linuxfoundation.org> References: <20191203223427.103571230@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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 Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman --- drivers/char/hw_random/stm32-rng.c | 8 ++++++++ 1 file changed, 8 insertions(+) --- 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 platfo 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_ .of_match_table = stm32_rng_match, }, .probe = stm32_rng_probe, + .remove = stm32_rng_remove, }; module_platform_driver(stm32_rng_driver);