Commit f440c4ee authored by Álvaro Fernández Rojas's avatar Álvaro Fernández Rojas Committed by Herbert Xu

hwrng: bcm63xx - Fix driver compilation

- s/clk_didsable_unprepare/clk_disable_unprepare
- s/prov/priv
- s/error/ret (bcm63xx_rng_probe)

Fixes: 6229c160 ("hwrng: bcm63xx - make use of devm_hwrng_register")
Signed-off-by: default avatarÁlvaro Fernández Rojas <noltari@gmail.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7829fb09
...@@ -57,7 +57,7 @@ static void bcm63xx_rng_cleanup(struct hwrng *rng) ...@@ -57,7 +57,7 @@ static void bcm63xx_rng_cleanup(struct hwrng *rng)
val &= ~RNG_EN; val &= ~RNG_EN;
__raw_writel(val, priv->regs + RNG_CTRL); __raw_writel(val, priv->regs + RNG_CTRL);
clk_didsable_unprepare(prov->clk); clk_disable_unprepare(priv->clk);
} }
static int bcm63xx_rng_data_present(struct hwrng *rng, int wait) static int bcm63xx_rng_data_present(struct hwrng *rng, int wait)
...@@ -97,14 +97,14 @@ static int bcm63xx_rng_probe(struct platform_device *pdev) ...@@ -97,14 +97,14 @@ static int bcm63xx_rng_probe(struct platform_device *pdev)
priv->rng.name = pdev->name; priv->rng.name = pdev->name;
priv->rng.init = bcm63xx_rng_init; priv->rng.init = bcm63xx_rng_init;
priv->rng.cleanup = bcm63xx_rng_cleanup; priv->rng.cleanup = bcm63xx_rng_cleanup;
prov->rng.data_present = bcm63xx_rng_data_present; priv->rng.data_present = bcm63xx_rng_data_present;
priv->rng.data_read = bcm63xx_rng_data_read; priv->rng.data_read = bcm63xx_rng_data_read;
priv->clk = devm_clk_get(&pdev->dev, "ipsec"); priv->clk = devm_clk_get(&pdev->dev, "ipsec");
if (IS_ERR(priv->clk)) { if (IS_ERR(priv->clk)) {
error = PTR_ERR(priv->clk); ret = PTR_ERR(priv->clk);
dev_err(&pdev->dev, "no clock for device: %d\n", error); dev_err(&pdev->dev, "no clock for device: %d\n", ret);
return error; return ret;
} }
if (!devm_request_mem_region(&pdev->dev, r->start, if (!devm_request_mem_region(&pdev->dev, r->start,
...@@ -120,11 +120,11 @@ static int bcm63xx_rng_probe(struct platform_device *pdev) ...@@ -120,11 +120,11 @@ static int bcm63xx_rng_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
error = devm_hwrng_register(&pdev->dev, &priv->rng); ret = devm_hwrng_register(&pdev->dev, &priv->rng);
if (error) { if (ret) {
dev_err(&pdev->dev, "failed to register rng device: %d\n", dev_err(&pdev->dev, "failed to register rng device: %d\n",
error); ret);
return error; return ret;
} }
dev_info(&pdev->dev, "registered RNG driver\n"); dev_info(&pdev->dev, "registered RNG driver\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment