diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-26 08:11:06 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-30 03:12:47 -0500 |
commit | b21cb324f141d16833137ef0355f686efb9bd84f (patch) | |
tree | 60295fb35826b75d870b3f273263262c135afdc6 /drivers/char/hw_random/atmel-rng.c | |
parent | 341975bf3af8f492f8e6ffc3d0fdf6f9c43e1691 (diff) |
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/atmel-rng.c')
-rw-r--r-- | drivers/char/hw_random/atmel-rng.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/char/hw_random/atmel-rng.c b/drivers/char/hw_random/atmel-rng.c index 241df2e76aba..f518b99f53f5 100644 --- a/drivers/char/hw_random/atmel-rng.c +++ b/drivers/char/hw_random/atmel-rng.c | |||
@@ -141,17 +141,7 @@ static struct platform_driver atmel_trng_driver = { | |||
141 | }, | 141 | }, |
142 | }; | 142 | }; |
143 | 143 | ||
144 | static int __init atmel_trng_init(void) | 144 | module_platform_driver(atmel_trng_driver); |
145 | { | ||
146 | return platform_driver_register(&atmel_trng_driver); | ||
147 | } | ||
148 | module_init(atmel_trng_init); | ||
149 | |||
150 | static void __exit atmel_trng_exit(void) | ||
151 | { | ||
152 | platform_driver_unregister(&atmel_trng_driver); | ||
153 | } | ||
154 | module_exit(atmel_trng_exit); | ||
155 | 145 | ||
156 | MODULE_LICENSE("GPL"); | 146 | MODULE_LICENSE("GPL"); |
157 | MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); | 147 | MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); |