aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFabio Porcedda <fabio.porcedda@gmail.com>2013-03-14 13:09:33 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 15:24:20 -0400
commite7c2199ff300fcf88673a1cf6d7229e6c3da09de (patch)
tree1a4ca4cdbf3c511d8065d30d22d85abad666fe7c /drivers
parent2154e0a4f43e0c811737e391e7981d331e450d42 (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')
-rw-r--r--drivers/char/hw_random/mxc-rnga.c13
-rw-r--r--drivers/char/hw_random/tx4939-rng.c13
2 files changed, 2 insertions, 24 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 = {
228 .remove = __exit_p(mxc_rnga_remove), 228 .remove = __exit_p(mxc_rnga_remove),
229}; 229};
230 230
231static int __init mod_init(void) 231module_platform_driver_probe(mxc_rnga_driver, mxc_rnga_probe);
232{
233 return platform_driver_probe(&mxc_rnga_driver, mxc_rnga_probe);
234}
235
236static void __exit mod_exit(void)
237{
238 platform_driver_unregister(&mxc_rnga_driver);
239}
240
241module_init(mod_init);
242module_exit(mod_exit);
243 232
244MODULE_AUTHOR("Freescale Semiconductor, Inc."); 233MODULE_AUTHOR("Freescale Semiconductor, Inc.");
245MODULE_DESCRIPTION("H/W RNGA driver for i.MX"); 234MODULE_DESCRIPTION("H/W RNGA driver for i.MX");
diff --git a/drivers/char/hw_random/tx4939-rng.c b/drivers/char/hw_random/tx4939-rng.c
index 30991989d65b..d34a24a0d484 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 = {
166 .remove = tx4939_rng_remove, 166 .remove = tx4939_rng_remove,
167}; 167};
168 168
169static int __init tx4939rng_init(void) 169module_platform_driver_probe(tx4939_rng_driver, tx4939_rng_probe);
170{
171 return platform_driver_probe(&tx4939_rng_driver, tx4939_rng_probe);
172}
173
174static void __exit tx4939rng_exit(void)
175{
176 platform_driver_unregister(&tx4939_rng_driver);
177}
178
179module_init(tx4939rng_init);
180module_exit(tx4939rng_exit);
181 170
182MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939"); 171MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939");
183MODULE_LICENSE("GPL"); 172MODULE_LICENSE("GPL");