From patchwork Wed Dec 4 17:56:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180833 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp940586ile; Wed, 4 Dec 2019 10:09:21 -0800 (PST) X-Google-Smtp-Source: APXvYqx3lmU/VnzSzuaEdpp+2bSm6LN0bvHTjVAQfiNHB2oHbLwfWLVQLE9M2CUGcVKQqP5f3Pqn X-Received: by 2002:aca:b204:: with SMTP id b4mr3814328oif.18.1575482960923; Wed, 04 Dec 2019 10:09:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575482960; cv=none; d=google.com; s=arc-20160816; b=EXFBVwN7eArrjqE9fuIV2t8KU0rZ3uK3SocJniu2IPsnQGnmUi7HEBJQED03mDRtTW u0uRkcrrqk+3uFfiw3qcXZTjzfORJt962n1JLUvquzw190tYOyXEHz3hi+PDjQRW/3Ox jRv7ewDH867A4kcXdl1X7lU9bgT74PIE3dOvfzbIvtGPC/L0JFdj/IQjbqJSp8LoWLu6 TwAB/4gw6sa6edxqD28Shq66w4a1/AHV22gfrhmQS5mv65KFBYY5dz3k/e8BC5u8Hiq4 Q7+MNQCsoOpi0knSANpPl5cNdmVPbwRZr/iZFJNrk5jTHFinrWaSQppvQuLig+D2pwPC AOHw== 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=dCzc/SbRGSKNw05GqEtn5C7BEktdQZj1sK+p2B3dMjxvzEmZR5lsrXAKWu9uWU/QM8 ghwDHpJbYU6wG1vW2Q80OHcrvjiVCFsKZoXqZ9l7Qg88ZI3UU0/bK6bFkCWw7hLDJ04b 8BeLvOog0nBjqtwNrOXOT2+movdKGpGpGSW0y+M86Lg34GmvPovNtEPaBy6fZMRCI+U0 4MF6qo9K3gULg16+Wk8kaYOz6+mBnRYJxWftiDJ3ES1Kph80eNhP1yPZs5ztQM+pH6ML UMfG6m+AAmpy5gQMDIG28FtXc2QyZHW16Rka6QeDMPhpH1gWuXYKXCdWl9P4ODwgk71Z b6lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="skNItj/2"; 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 v12si3934949ote.168.2019.12.04.10.09.20; Wed, 04 Dec 2019 10:09:20 -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="skNItj/2"; 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 S1730571AbfLDSJT (ORCPT + 27 others); Wed, 4 Dec 2019 13:09:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:34412 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731021AbfLDSJK (ORCPT ); Wed, 4 Dec 2019 13:09:10 -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 A421820675; Wed, 4 Dec 2019 18:09:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575482950; bh=O4H8gKKIofBTYa/ahR2HGrSqNn62ReqrOkWXmkecmG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=skNItj/2Y5Cek6Sjnx+Y/Hp16YWFxEbo6OLKP5E+c1boFeT4gqXiDvx9/WYEWFWgH xI4KySnPIj5LJD7890z2KggqppORopYqc0DV75P1PgpN/mq2cVK1uHliLZexPZPpLO 9I7/n4qqSbCVD7Yd8xezZqvjGFIx76SOh0N3jAg8= 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.14 201/209] hwrng: stm32 - fix unbalanced pm_runtime_enable Date: Wed, 4 Dec 2019 18:56:53 +0100 Message-Id: <20191204175337.324862662@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175321.609072813@linuxfoundation.org> References: <20191204175321.609072813@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);