diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2013-08-05 10:47:18 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-08-09 02:39:46 -0400 |
commit | 4390f77b37b89d32236676a48997d83489feff4e (patch) | |
tree | 55409770e3905acdfa3e1329428f1a97cfd0aaff /drivers/char | |
parent | d311149337f93ae4de60a2f1c24a0d856089903f (diff) |
hwrng: omap - Use module_platform_driver macro
module_platform_driver() makes the code simpler.
Using the macro in the driver.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/hw_random/omap-rng.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 6843ec87b98b..3e9a7ecbd5e5 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
@@ -198,9 +198,6 @@ static SIMPLE_DEV_PM_OPS(omap_rng_pm, omap_rng_suspend, omap_rng_resume); | |||
198 | 198 | ||
199 | #endif | 199 | #endif |
200 | 200 | ||
201 | /* work with hotplug and coldplug */ | ||
202 | MODULE_ALIAS("platform:omap_rng"); | ||
203 | |||
204 | static struct platform_driver omap_rng_driver = { | 201 | static struct platform_driver omap_rng_driver = { |
205 | .driver = { | 202 | .driver = { |
206 | .name = "omap_rng", | 203 | .name = "omap_rng", |
@@ -211,18 +208,7 @@ static struct platform_driver omap_rng_driver = { | |||
211 | .remove = __exit_p(omap_rng_remove), | 208 | .remove = __exit_p(omap_rng_remove), |
212 | }; | 209 | }; |
213 | 210 | ||
214 | static int __init omap_rng_init(void) | 211 | module_platform_driver(omap_rng_driver); |
215 | { | 212 | MODULE_ALIAS("platform:omap_rng"); |
216 | return platform_driver_register(&omap_rng_driver); | ||
217 | } | ||
218 | |||
219 | static void __exit omap_rng_exit(void) | ||
220 | { | ||
221 | platform_driver_unregister(&omap_rng_driver); | ||
222 | } | ||
223 | |||
224 | module_init(omap_rng_init); | ||
225 | module_exit(omap_rng_exit); | ||
226 | |||
227 | MODULE_AUTHOR("Deepak Saxena (and others)"); | 213 | MODULE_AUTHOR("Deepak Saxena (and others)"); |
228 | MODULE_LICENSE("GPL"); | 214 | MODULE_LICENSE("GPL"); |