Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp141507yba; Mon, 1 Apr 2019 03:32:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8fVn3Xz4qXviru6vgYfk10hRmWqKUXZzStpHImkfP+TwRmqegCqwU4WsUMJuE2ILzomBk X-Received: by 2002:a65:5a81:: with SMTP id c1mr59051242pgt.391.1554114770589; Mon, 01 Apr 2019 03:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554114770; cv=none; d=google.com; s=arc-20160816; b=pobW19jKa3ZnapkJfanFRYx6tqRCNiHPywmBdzlOyX54+NLRtE0P99CZC/8hOOwc8B XFqQ8E3FMheYqr+NQ5Z/CTvy45Qtep498dYW9tpjHXBamC7tfMpuWAeQyFc1JRY824UL Z5g57sEWctA7oGRAqBjiCoL8MtBp3C0B5CX5qfcf0H5xVzpHKaKXxWyEzomOATwJ2/pI bHaEMdhiR6qGsHnzTA5JWkKYhRKl7YGpxRYeYWC4MCnm0ILt4S8TDk6BYChF+AOL2j0q WCcpr73/NDTgrTjgpJdmYASZ3jMTjSDOTsoihCi1mQ7vKTpUQoT4TXTNgbwJgAeFnUqS iQZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=aYUa0tM+gZJb5p12ZLY5ZRkH6LNOQxl9HFVTE9ui+FM=; b=dXWUmlwrMiop0Fz44aKHpqX+/GJcedkSBMcgTGfzRECdqi8XznRsbHAJPvtpC/YabE g4sa97nx6bwMMYPe6APRGE5RbSeBzlw01cQij5843SlLbtrGWtKlsgoDGURTs3AOPYbH g1SFq4G3DozvsAFRReAYa9dynS8xJ4js2gnk9/enam1TutUM+l45E2SqAb6bkZ1FQrwG NEREDThgrxWS5Mp8lyJPvgYz9lD/QoEe36S2dZpADy5gTfm4oi2WiSKYdCMmQ00rBU+H LZZeddwZmofkddl8H4eLP1UCtLJKj3cCYt3ddBJ8KNpHR3Gh8oAcE6wI00f6+pBIsPeb EtjQ== ARC-Authentication-Results: i=1; mx.google.com; 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 p65si8397029pfa.27.2019.04.01.03.32.35; Mon, 01 Apr 2019 03:32:50 -0700 (PDT) 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; 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 S1726633AbfDAKbh (ORCPT + 99 others); Mon, 1 Apr 2019 06:31:37 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:43927 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbfDAKbh (ORCPT ); Mon, 1 Apr 2019 06:31:37 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x31AQODk003461; Mon, 1 Apr 2019 12:31:15 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2rhy3xa0xq-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 01 Apr 2019 12:31:15 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1E04338; Mon, 1 Apr 2019 10:31:15 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id ED29C25E6; Mon, 1 Apr 2019 10:31:14 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 1 Apr 2019 12:31:14 +0200 Received: from localhost (10.201.23.65) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.435.0; Mon, 1 Apr 2019 12:31:11 +0200 From: Lionel Debieve To: Matt Mackall , Herbert Xu , Arnd Bergmann , Greg Kroah-Hartman , Maxime Coquelin , Alexandre Torgue , Rob Herring , , , CC: Benjamin Gaignard , Ludovic Barre , Subject: [PATCH 1/2] hwrng: stm32 - fix unbalanced pm_runtime_enable Date: Mon, 1 Apr 2019 12:30:45 +0200 Message-ID: <1554114646-18791-2-git-send-email-lionel.debieve@st.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1554114646-18791-1-git-send-email-lionel.debieve@st.com> References: <1554114646-18791-1-git-send-email-lionel.debieve@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.201.23.65] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-01_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/char/hw_random/stm32-rng.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index 042860d..37b338a 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); -- 2.7.4