From patchwork Wed Dec 4 17:50:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180846 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp960143ile; Wed, 4 Dec 2019 10:25:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzdX09yS9X3lIxwQnogMeiKKLrYRJ/XfG2/+ms+xSSJDD+UXaJFxMaQzSwMpDNr6tLOlmj5 X-Received: by 2002:a9d:28f:: with SMTP id 15mr3721828otl.311.1575483929733; Wed, 04 Dec 2019 10:25:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483929; cv=none; d=google.com; s=arc-20160816; b=JyUxd4a/38rFY7eDna2JzW97e3w3dXVzN3QQTOVn4F8n5//laC7/4r0aLr6NJv5f95 yAZpiPNfOU14GYwO5KaB1MBEmxQT1ufuzjfC7kHcmPJSnQjXVurjNln+O1sM4z11X/dB XnArU7UndpmmYBtz0ODVDTRJCDwWco9ra8HsigcsGlppihmlGNQnyrNWJp8eJuPcSqXB JYUbnXem+IJO3Sei22sSIBa6GAjlmx4darbPFkwpfN4R3ZeRvaEh5eH38rrDhnSMSMPk NZx61H8SV4re+Juj7Crj0tNWptSeHOiWMAJ+cz47nzq4UeuMzvz9s/kYJm//YvD76iwr bIIw== 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=w2p0FHT9ofEAntJ+D1Egb4SIXLWlhSXAfr8ZXTAUaIk=; b=eb5vKcVAduFrxRHJ8qk0tL8RC/0hrlsDVb67s7xk8+QOSvrSCLxp9BrFOtEHtndAY9 tOab0XePqS6ltKNReKX/JL7bPC5Ra8dJPOp3WKXwS8J3RktzITK+j0nQpu9se5jObn2u QQPviidzCi5bFCQ9t2rLEBrBB60NAI0zHvY5qmFfe+JTUg1qc7sw+7u5xxz/RHgboLlt hM0g3inPjbxykyMU2XywWDKa081dPHNzP17ngtPKgA5pFbiRrX7Q9bpJA0ijB2UiJ+NZ YOmLrFQgZ1KTpr4EXsNiYDkpydFafygHtdi/XNkrkSCKpLKD+yLJS4GWT4bg83pu+iTZ ROUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AM9dGkt+; 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 m2si3375476otk.122.2019.12.04.10.25.29; Wed, 04 Dec 2019 10:25:29 -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=AM9dGkt+; 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 S1728381AbfLDSBG (ORCPT + 27 others); Wed, 4 Dec 2019 13:01:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:40756 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbfLDSBC (ORCPT ); Wed, 4 Dec 2019 13:01:02 -0500 Received: from localhost (unknown [217.68.49.72]) (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 04E2B20659; Wed, 4 Dec 2019 18:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575482462; bh=O4H8gKKIofBTYa/ahR2HGrSqNn62ReqrOkWXmkecmG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AM9dGkt+kmr0nHI4qgkoQnE580QpO/sjIQW2hg+lOe9dmffVAVQ+CMl8WY97eD7PC l+fwJh28t89sSwHvgjP/zHFvl7GJxTrZ2Z19Pu+MR7UeEGImW4CUnwO5NowPvMtDRp /SQHl/KY0HwXBXmMDmDwmVlC5P2K8htpIQRFTv2o= 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.4 91/92] hwrng: stm32 - fix unbalanced pm_runtime_enable Date: Wed, 4 Dec 2019 18:50:31 +0100 Message-Id: <20191204174335.613659568@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204174327.215426506@linuxfoundation.org> References: <20191204174327.215426506@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 @@ -166,6 +166,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) { @@ -202,6 +209,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);