From patchwork Wed Dec 4 17:57:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180837 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp947209ile; Wed, 4 Dec 2019 10:14:43 -0800 (PST) X-Google-Smtp-Source: APXvYqy4NfgtqFK/F6lZ59BGmLe9JP0+fU2SDm6SLGQJOC2bYcIw6COs60YokYVmF2o8X7dbka/i X-Received: by 2002:a05:6830:232c:: with SMTP id q12mr3459867otg.168.1575483283191; Wed, 04 Dec 2019 10:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483283; cv=none; d=google.com; s=arc-20160816; b=NCSTaUxe2b5yp6tEbchv0o9qrrBGl51IihDIaedoY3NaJkSLyyYd94WM5u7P5kQjcp 3FPWeVKiQrkksHhqzp5Gqf9rmK20pdkH0whYe1Dvb1w/itWcjp3K2B6Ps/HZNguspjZA 8pAtn6F7wwLQakM5AgX+sapH0icvT+IVD0PHfABQsoy7rl1tJGJbWk9WtsyUAzKx+xYQ fQZyeEfOLXJkS6plMK7aE//ZOgpPjTXxKxFo1jA8Wix4VIOPy8MfD+C34AEpfYR+07/g br/gfHeVs0sWbqYYJcMNvEEbWTqfHRIKdVlY7aydk2gQeV2jn6n+bM4r6XyyQbO/wqlz 4bXg== 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=nTKpksDz/eb/3cRhbcZWMv35UaI8X+ABERaqyorPUCKcqduyRTzjX3MRS+6nwDZIVB t6pe4xg8+kkkZiFLY0jTV2kl4Y2s5lQ1y6cSmW3TphP3kxBaBt9Qf0bFWaxe14F6JGAJ VX4rtBbs5cUVW1djD6B3EXL7TzXeCiqcjq+ETa5Pvpy8x8QVprr+8cQad/l3UUjT9NtQ j7aEht1KvwbpX6ClpI+gisnIM0MlzHLGIl34a6q+4EeflKpXMwZXRUl9W0GXLSK+VsAf tszw6KZiDNXNVOUr4H7o2D7pWPNxmw6lei8FLg1lpUQXAPzd7wum5AZ6B4JjoxzFoB0i lS8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xX0HIrKe; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 17si3735902oix.71.2019.12.04.10.14.42; Wed, 04 Dec 2019 10:14:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-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=xX0HIrKe; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731942AbfLDSOl (ORCPT + 15 others); Wed, 4 Dec 2019 13:14:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:44018 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731937AbfLDSOi (ORCPT ); Wed, 4 Dec 2019 13:14:38 -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 274AD206DF; Wed, 4 Dec 2019 18:14:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483277; bh=O4H8gKKIofBTYa/ahR2HGrSqNn62ReqrOkWXmkecmG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xX0HIrKePm037n4YDctYkyFxHL0Wvh1eytcgLSzILWOGADtV9Tswbli/M400/Dcnq Wn8cszbxd39tXDm3iOVjmh/LB1PBjZDmzZUGXEdgokt49P7oeHTAw83Q4KqCSRS8TC 04G8KcuwQSze5nEScCGoWyPlveCgqSdwq6whWMuc= 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.9 123/125] hwrng: stm32 - fix unbalanced pm_runtime_enable Date: Wed, 4 Dec 2019 18:57:08 +0100 Message-Id: <20191204175326.886744435@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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);