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: 54962 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id 9CB5520490 for ; Wed, 14 Oct 2015 16:05:16 +0000 (UTC) Received: by wicid10 with SMTP id id10sf28698929wic.2 for ; Wed, 14 Oct 2015 09:05:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=2ta8pSvbNTLr4c914JWj/qaq2zKpV5QRDO5Mx4r4t7g=; b=bXxt2IQdsLNpen/eUYvjFbaC/Ixuqa2XafC1KljZ7niZqQQZtNI2HqVgfmCZB90gmX Uc+WtdCto27IX3rGC5zPNTOAIydT3vbPsPwHAvpzX1+SYOYWrsAQcMJvuN3AhtEQIjFE vmQrZ9WIl/92D7xQ4Gbj7DPrK1rp/HIiZEyEGymloSQrS5eC0pj6eysb4XB6h7NUARPZ BEWTo+1vM6igHn3sAd1O4AFd+9PEK04K+gIG9KWAfa6+O+IHRxGA7BLtVjOdGPeqvX10 RD1o0TEzp9s8u0AQuj+5nl/L5ovhjLRW6p3g4Bv+uR1aDVz/JWZqXtjw0xH66mjMuEfd f/XQ== X-Gm-Message-State: ALoCoQmSd6YaM73qbEu+YFD9LT8vhKKAmXvGlngl2046j6DQh7av07u1K+0pSESbd12kITwGuLWV X-Received: by 10.194.192.71 with SMTP id he7mr972977wjc.2.1444838715946; Wed, 14 Oct 2015 09:05:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.17.203 with SMTP id 72ls56141lfr.24.gmail; Wed, 14 Oct 2015 09:05:15 -0700 (PDT) X-Received: by 10.112.161.201 with SMTP id xu9mr2081736lbb.10.1444838715788; Wed, 14 Oct 2015 09:05:15 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id pd10si5997016lbc.109.2015.10.14.09.05.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 09:05:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbck17 with SMTP id ck17so50147776lbb.1 for ; Wed, 14 Oct 2015 09:05:15 -0700 (PDT) X-Received: by 10.112.202.35 with SMTP id kf3mr2070090lbc.19.1444838715642; Wed, 14 Oct 2015 09:05:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp96456lbq; Wed, 14 Oct 2015 09:05:14 -0700 (PDT) X-Received: by 10.68.217.8 with SMTP id ou8mr4492513pbc.164.1444838714577; Wed, 14 Oct 2015 09:05:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fn8si14271146pad.50.2015.10.14.09.05.14 for ; Wed, 14 Oct 2015 09:05:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; 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-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: list List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: daniel.thompson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); }