summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/mxc-rnga.c
diff options
context:
space:
mode:
authorFabio Porcedda2013-03-14 18:09:33 +0100
committerGreg Kroah-Hartman2013-03-15 20:24:20 +0100
commite7c2199ff300fcf88673a1cf6d7229e6c3da09de (patch)
tree1a4ca4cdbf3c511d8065d30d22d85abad666fe7c /drivers/char/hw_random/mxc-rnga.c
parentapplicom: use correct array offset (diff)
downloadkernel-qcow2-linux-e7c2199ff300fcf88673a1cf6d7229e6c3da09de.tar.gz
kernel-qcow2-linux-e7c2199ff300fcf88673a1cf6d7229e6c3da09de.tar.xz
kernel-qcow2-linux-e7c2199ff300fcf88673a1cf6d7229e6c3da09de.zip
drivers: char: use module_platform_driver_probe()
This patch converts the drivers to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/hw_random/mxc-rnga.c')
-rw-r--r--drivers/char/hw_random/mxc-rnga.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c
index f05d85713fd3..895d0b8fb9ab 100644
--- a/drivers/char/hw_random/mxc-rnga.c
+++ b/drivers/char/hw_random/mxc-rnga.c
@@ -228,18 +228,7 @@ static struct platform_driver mxc_rnga_driver = {
.remove = __exit_p(mxc_rnga_remove),
};
-static int __init mod_init(void)
-{
- return platform_driver_probe(&mxc_rnga_driver, mxc_rnga_probe);
-}
-
-static void __exit mod_exit(void)
-{
- platform_driver_unregister(&mxc_rnga_driver);
-}
-
-module_init(mod_init);
-module_exit(mod_exit);
+module_platform_driver_probe(mxc_rnga_driver, mxc_rnga_probe);
MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("H/W RNGA driver for i.MX");