Commit f14b0208 authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Herbert Xu

hwrng: atmel - rename enable/disable functions to init/cleanup

s/atmel_trng_disable/atmel_trng_cleanup/g and
s/atmel_trng_enable/atmel_trng_init/g to cope with
struct hwrng::{init, cleanup} members.
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent a223ea9f
...@@ -74,12 +74,12 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max, ...@@ -74,12 +74,12 @@ static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max,
return ret; return ret;
} }
static void atmel_trng_enable(struct atmel_trng *trng) static void atmel_trng_init(struct atmel_trng *trng)
{ {
writel(TRNG_KEY | 1, trng->base + TRNG_CR); writel(TRNG_KEY | 1, trng->base + TRNG_CR);
} }
static void atmel_trng_disable(struct atmel_trng *trng) static void atmel_trng_cleanup(struct atmel_trng *trng)
{ {
writel(TRNG_KEY, trng->base + TRNG_CR); writel(TRNG_KEY, trng->base + TRNG_CR);
} }
...@@ -117,7 +117,7 @@ static int atmel_trng_probe(struct platform_device *pdev) ...@@ -117,7 +117,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
if (ret) if (ret)
return ret; return ret;
atmel_trng_enable(trng); atmel_trng_init(trng);
trng->rng.name = pdev->name; trng->rng.name = pdev->name;
trng->rng.read = atmel_trng_read; trng->rng.read = atmel_trng_read;
...@@ -131,7 +131,7 @@ static int atmel_trng_probe(struct platform_device *pdev) ...@@ -131,7 +131,7 @@ static int atmel_trng_probe(struct platform_device *pdev)
err_register: err_register:
clk_disable_unprepare(trng->clk); clk_disable_unprepare(trng->clk);
atmel_trng_disable(trng); atmel_trng_cleanup(trng);
return ret; return ret;
} }
...@@ -140,7 +140,7 @@ static int atmel_trng_remove(struct platform_device *pdev) ...@@ -140,7 +140,7 @@ static int atmel_trng_remove(struct platform_device *pdev)
struct atmel_trng *trng = platform_get_drvdata(pdev); struct atmel_trng *trng = platform_get_drvdata(pdev);
atmel_trng_disable(trng); atmel_trng_cleanup(trng);
clk_disable_unprepare(trng->clk); clk_disable_unprepare(trng->clk);
return 0; return 0;
...@@ -151,7 +151,7 @@ static int atmel_trng_suspend(struct device *dev) ...@@ -151,7 +151,7 @@ static int atmel_trng_suspend(struct device *dev)
{ {
struct atmel_trng *trng = dev_get_drvdata(dev); struct atmel_trng *trng = dev_get_drvdata(dev);
atmel_trng_disable(trng); atmel_trng_cleanup(trng);
clk_disable_unprepare(trng->clk); clk_disable_unprepare(trng->clk);
return 0; return 0;
...@@ -166,7 +166,7 @@ static int atmel_trng_resume(struct device *dev) ...@@ -166,7 +166,7 @@ static int atmel_trng_resume(struct device *dev)
if (ret) if (ret)
return ret; return ret;
atmel_trng_enable(trng); atmel_trng_init(trng);
return 0; return 0;
} }
......
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