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: 7396661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DA815BEEA4 for ; Wed, 14 Oct 2015 16:07:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18194209B4 for ; Wed, 14 Oct 2015 16:07:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3201D209BB for ; Wed, 14 Oct 2015 16:07:16 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZmOYi-0004Nj-9X; Wed, 14 Oct 2015 16:05:44 +0000 Received: from mail-wi0-f175.google.com ([209.85.212.175]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZmOYW-00045x-19 for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2015 16:05:33 +0000 Received: by wijp11 with SMTP id p11so659049wij.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=ljUq+y5iFBsHfYKSbtKnePHa60l4t3Qh/p4xpX1BlZsqGedG0ukzlx5xv/R53P0hPG pCCEIIWuHx1SPIwqdj/2dr78buc4NIGA2O+GLV9OrR5+ld8iWvTn4dBqf/UXLvEPhqWX Fvq0IZhG1UZdiY3es+/hxCkCUMH51u9IcK1cAbYiZCz95TpTQT4R8jSkC6kotkcCMwO4 JYi4a7VFWmjV3ghUv8OX/xzd8g9ZggLXhG0BHepmRItrka5upPxtWbxAiLPHYs4uMVjn +C5r0uPEZ0QeojZ0jL4OtelJPqzA/b/u78YHoQwrTrux1rvntrGIYc9ar5uxnFfuz3SC lAtw== X-Gm-Message-State: ALoCoQm+cIaucW9R1xtmBK8xRGbLO5U5rfJTvanJSAuKwGd6b7/nFb+slvpG1IqYNY4Zc9pkDXwC 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151014_090532_271212_9991EBAB X-CRM114-Status: GOOD ( 14.03 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Daniel Thompson , linaro-kernel@lists.linaro.org, patches@linaro.org, Linus Walleij , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Maxime Coquelin , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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); }