From patchwork Wed Oct 14 16:04:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 7396641 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 364EA9F36A for ; Wed, 14 Oct 2015 16:05:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31AA2209BF for ; Wed, 14 Oct 2015 16:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4DA87209BB for ; Wed, 14 Oct 2015 16:05:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbbJNQFM (ORCPT ); Wed, 14 Oct 2015 12:05:12 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:35728 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713AbbJNQFL (ORCPT ); Wed, 14 Oct 2015 12:05:11 -0400 Received: by wicll6 with SMTP id ll6so4169770wic.0 for ; Wed, 14 Oct 2015 09:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QDAw0DbYNwGo9ts6yts5emy3NWnkALX87zpdGXpOzpw=; b=SS75f5qa89QpUpJ9QzW6jLv6H5+NGq8bqdBM5BLgrGtIGQ8I25Ow0kpXRIq6iVJdFW RovAlxK/Lnvw14gz7XJfwImFTtDKp0rptL5A2I+LsH2mOUMX7Oi4HKrfMA8eulHdVK8j G/p/zX3dzexVExM3czezNJovqSDIS7fLcm0G9BSfsq4C2A7JwzUA5e3FxxfAv3S7eBUz dI9RNmwqUEXcjOtEGXo+G7wjhO8PfKccnGRTmCP0kvmFK2WgBDJ7GBQk/Q7MOBVNOjO5 lfld/VEU93iiCLajh+bifNtWX0nMp+3v4ok/0HNlegaf958e4lSAW0M+d9cAItvLOooX l0tA== X-Gm-Message-State: ALoCoQn9i6ibwmhEwWzFxjcGlnK6eIdVm8uYQ+ZV57XLPly16kfYMlHthw/2EYVpQI2QNg9CI5be X-Received: by 10.194.20.68 with SMTP id l4mr5708311wje.24.1444838710202; Wed, 14 Oct 2015 09:05:10 -0700 (PDT) Received: from wychelm.lan (cpc4-aztw19-0-0-cust71.18-1.cable.virginm.net. [82.33.25.72]) by smtp.gmail.com with ESMTPSA id r15sm7693255wib.18.2015.10.14.09.05.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 09:05:09 -0700 (PDT) From: Daniel Thompson To: Matt Mackall , Herbert Xu Cc: Daniel Thompson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org, Maxime Coquelin , Linus Walleij Subject: [PATCH] hwrng: stm32 - Fix build with CONFIG_PM Date: Wed, 14 Oct 2015 17:04:55 +0100 Message-Id: <1444838695-7182-1-git-send-email-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1443904519-24012-1-git-send-email-daniel.thompson@linaro.org> References: <1443904519-24012-1-git-send-email-daniel.thompson@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit c6a97c42e399 ("hwrng: stm32 - add support for STM32 HW RNG") was inadequately tested (actually it was tested quite hard so incompetent would be a better description that inadequate) and does not compile on platforms with CONFIG_PM set. Fix this. Signed-off-by: Daniel Thompson --- Notes: Herbert: This is the diff between v2 and v3 of my STM32 HW RNG patch. This is partly reassurance of what has changed and also "just in case" you prefer to simply fix the problem. drivers/char/hw_random/stm32-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/char/hw_random/stm32-rng.c b/drivers/char/hw_random/stm32-rng.c index 7fa3656a5fc5..92a810648bd0 100644 --- a/drivers/char/hw_random/stm32-rng.c +++ b/drivers/char/hw_random/stm32-rng.c @@ -160,7 +160,7 @@ static int stm32_rng_probe(struct platform_device *ofdev) #ifdef CONFIG_PM static int stm32_rng_runtime_suspend(struct device *dev) { - struct stm32_rng_private *priv = dev_get_drvdata(pdev); + struct stm32_rng_private *priv = dev_get_drvdata(dev); stm32_rng_cleanup(&priv->rng); @@ -169,7 +169,7 @@ static int stm32_rng_runtime_suspend(struct device *dev) static int stm32_rng_runtime_resume(struct device *dev) { - struct stm32_rng_private *priv = dev_get_drvdata(pdev); + struct stm32_rng_private *priv = dev_get_drvdata(dev); return stm32_rng_init(&priv->rng); }