Skip to content

Commit

Permalink
hwrng: stm32 - Fix build with CONFIG_PM
Browse files Browse the repository at this point in the history
Commit c6a97c4 ("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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
daniel-thompson authored and herbertx committed Oct 15, 2015
1 parent 62f57d0 commit d6ba06b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/hw_random/stm32-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
}
Expand Down

0 comments on commit d6ba06b

Please sign in to comment.