Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fabio Porcedda and committed by
Greg Kroah-Hartman
e7c2199f 2154e0a4

+2 -24
+1 -12
drivers/char/hw_random/mxc-rnga.c
··· 228 228 .remove = __exit_p(mxc_rnga_remove), 229 229 }; 230 230 231 - static int __init mod_init(void) 232 - { 233 - return platform_driver_probe(&mxc_rnga_driver, mxc_rnga_probe); 234 - } 235 - 236 - static void __exit mod_exit(void) 237 - { 238 - platform_driver_unregister(&mxc_rnga_driver); 239 - } 240 - 241 - module_init(mod_init); 242 - module_exit(mod_exit); 231 + module_platform_driver_probe(mxc_rnga_driver, mxc_rnga_probe); 243 232 244 233 MODULE_AUTHOR("Freescale Semiconductor, Inc."); 245 234 MODULE_DESCRIPTION("H/W RNGA driver for i.MX");
+1 -12
drivers/char/hw_random/tx4939-rng.c
··· 166 166 .remove = tx4939_rng_remove, 167 167 }; 168 168 169 - static int __init tx4939rng_init(void) 170 - { 171 - return platform_driver_probe(&tx4939_rng_driver, tx4939_rng_probe); 172 - } 173 - 174 - static void __exit tx4939rng_exit(void) 175 - { 176 - platform_driver_unregister(&tx4939_rng_driver); 177 - } 178 - 179 - module_init(tx4939rng_init); 180 - module_exit(tx4939rng_exit); 169 + module_platform_driver_probe(tx4939_rng_driver, tx4939_rng_probe); 181 170 182 171 MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939"); 183 172 MODULE_LICENSE("GPL");