diff options
author | Fabio Porcedda <fabio.porcedda@gmail.com> | 2013-03-14 18:09:33 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 12:24:20 -0700 |
commit | e7c2199ff300fcf88673a1cf6d7229e6c3da09de (patch) | |
tree | 1a4ca4cdbf3c511d8065d30d22d85abad666fe7c /drivers/char/hw_random/tx4939-rng.c | |
parent | 2154e0a4f43e0c811737e391e7981d331e450d42 (diff) |
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/tx4939-rng.c')
-rw-r--r-- | drivers/char/hw_random/tx4939-rng.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/hw_random/tx4939-rng.c b/drivers/char/hw_random/tx4939-rng.c index 30991989d65..d34a24a0d48 100644 --- a/drivers/char/hw_random/tx4939-rng.c +++ b/drivers/char/hw_random/tx4939-rng.c @@ -166,18 +166,7 @@ static struct platform_driver tx4939_rng_driver = { .remove = tx4939_rng_remove, }; -static int __init tx4939rng_init(void) -{ - return platform_driver_probe(&tx4939_rng_driver, tx4939_rng_probe); -} - -static void __exit tx4939rng_exit(void) -{ - platform_driver_unregister(&tx4939_rng_driver); -} - -module_init(tx4939rng_init); -module_exit(tx4939rng_exit); +module_platform_driver_probe(tx4939_rng_driver, tx4939_rng_probe); MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939"); MODULE_LICENSE("GPL"); |