linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Matt Mackall <mpm@selenic.com>, Herbert Xu <herbert@gondor.apana.org.au>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	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 <mcoquelin.stm32@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH] hwrng: stm32 - Fix build with CONFIG_PM
Date: Wed, 14 Oct 2015 17:04:55 +0100	[thread overview]
Message-ID: <1444838695-7182-1-git-send-email-daniel.thompson@linaro.org> (raw)
In-Reply-To: <1443904519-24012-1-git-send-email-daniel.thompson@linaro.org>

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 <daniel.thompson@linaro.org>
---

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(-)

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);
 }
--
2.4.3


  parent reply	other threads:[~2015-10-14 16:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 20:35 [PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-03 20:35 ` [PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings Daniel Thompson
2015-10-04  8:27   ` Maxime Coquelin
2015-10-05 15:34   ` Rob Herring
2015-10-03 20:35 ` [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-03 21:02   ` [PATCH] hwrng: fix simple_return.cocci warnings kbuild test robot
2015-10-03 21:02   ` [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG kbuild test robot
2015-10-04  8:52   ` Maxime Coquelin
2015-10-05  9:26     ` Daniel Thompson
2015-10-04 10:32   ` Linus Walleij
2015-10-05  9:22     ` Daniel Thompson
2015-10-11 19:15       ` Daniel Thompson
2015-10-11 19:24       ` Daniel Thompson
2015-10-03 20:35 ` [PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver Daniel Thompson
2015-10-04  9:09   ` Maxime Coquelin
2015-10-12  8:21 ` [PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-12  8:21   ` [PATCH 1/3] dt-bindings: Document the STM32 HW RNG bindings Daniel Thompson
2015-10-12  8:21   ` [PATCH 2/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-14  7:39     ` Linus Walleij
2015-10-12  8:21   ` [PATCH 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver Daniel Thompson
2015-10-14 14:28   ` [PATCH 0/3] hwrng: stm32 - add support for STM32 HW RNG Herbert Xu
2015-10-14 14:46     ` Maxime Coquelin
2015-10-14 15:55 ` [PATCH v3 " Daniel Thompson
2015-10-14 15:55   ` [PATCH v3 1/3] dt-bindings: Document the STM32 HW RNG bindings Daniel Thompson
2015-10-14 15:55   ` [PATCH v3 2/3] hwrng: stm32 - add support for STM32 HW RNG Daniel Thompson
2015-10-14 15:55   ` [PATCH v3 3/3] ARM: dts: stm32f429: Adopt STM32 RNG driver Daniel Thompson
2015-10-14 16:04 ` Daniel Thompson [this message]
2015-10-15  2:00   ` [PATCH] hwrng: stm32 - Fix build with CONFIG_PM Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444838695-7182-1-git-send-email-daniel.thompson@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mpm@selenic.com \
    --cc=patches@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).