summaryrefslogtreecommitdiff
path: root/drivers/char/hw_random/octeon-rng.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-26 17:11:06 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2011-11-30 12:12:47 +0400
commitb21cb324f141d16833137ef0355f686efb9bd84f (patch)
tree60295fb35826b75d870b3f273263262c135afdc6 /drivers/char/hw_random/octeon-rng.c
parent341975bf3af8f492f8e6ffc3d0fdf6f9c43e1691 (diff)
downloadlinux-b21cb324f141d16833137ef0355f686efb9bd84f.tar.xz
char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver()
This patch converts the drivers in drivers/char/hw_random/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: David S. Miller <davem@davemloft.net> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com> Cc: Matt Mackall <mpm@selenic.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jamie Iles <jamie@jamieiles.com> Acked-by: Alexander Clouter <alex@digriz.org.uk> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/octeon-rng.c')
-rw-r--r--drivers/char/hw_random/octeon-rng.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c
index 9cd0feca318c..0943edc782a1 100644
--- a/drivers/char/hw_random/octeon-rng.c
+++ b/drivers/char/hw_random/octeon-rng.c
@@ -131,18 +131,7 @@ static struct platform_driver octeon_rng_driver = {
.remove = __exit_p(octeon_rng_remove),
};
-static int __init octeon_rng_mod_init(void)
-{
- return platform_driver_register(&octeon_rng_driver);
-}
-
-static void __exit octeon_rng_mod_exit(void)
-{
- platform_driver_unregister(&octeon_rng_driver);
-}
-
-module_init(octeon_rng_mod_init);
-module_exit(octeon_rng_mod_exit);
+module_platform_driver(octeon_rng_driver);
MODULE_AUTHOR("David Daney");
MODULE_LICENSE("GPL");