Commit e7c2199f authored by Fabio Porcedda's avatar Fabio Porcedda Committed by Greg Kroah-Hartman

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: default avatarFabio 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2154e0a4
...@@ -228,18 +228,7 @@ static struct platform_driver mxc_rnga_driver = { ...@@ -228,18 +228,7 @@ static struct platform_driver mxc_rnga_driver = {
.remove = __exit_p(mxc_rnga_remove), .remove = __exit_p(mxc_rnga_remove),
}; };
static int __init mod_init(void) module_platform_driver_probe(mxc_rnga_driver, mxc_rnga_probe);
{
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_AUTHOR("Freescale Semiconductor, Inc."); MODULE_AUTHOR("Freescale Semiconductor, Inc.");
MODULE_DESCRIPTION("H/W RNGA driver for i.MX"); MODULE_DESCRIPTION("H/W RNGA driver for i.MX");
......
...@@ -166,18 +166,7 @@ static struct platform_driver tx4939_rng_driver = { ...@@ -166,18 +166,7 @@ static struct platform_driver tx4939_rng_driver = {
.remove = tx4939_rng_remove, .remove = tx4939_rng_remove,
}; };
static int __init tx4939rng_init(void) module_platform_driver_probe(tx4939_rng_driver, tx4939_rng_probe);
{
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_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939"); MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment