char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver()
PATCH 1/1 char: hw_random: convert drivers/char/hw_random/* to use module_platform_driver()
This patch converts the drivers in drivers/char/hw_random/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler.
--- drivers/char/hw_random/atmel-rng.c | 12 +----------- drivers/char/hw_random/n2-drv.c | 13 +------------ drivers/char/hw_random/octeon-rng.c | 13 +------------ drivers/char/hw_random/pasemi-rng.c | 12 +----------- drivers/char/hw_random/picoxcell-rng.c | 12 +----------- drivers/char/hw_random/ppc4xx-rng.c | 12 +----------- drivers/char/hw_random/timeriomem-rng.c | 13 +------------ 7 files changed, 7 insertions(+), 80 deletions(-)
drivers/char/hw_random/atmel-rng.c +1 -11
@@ -141,17 +141,7 @@ static struct platform_driver atmel_trng_driver = { }, }; -static int __init atmel_trng_init (void ) -{ -return platform_driver_register (&atmel_trng_driver); -} -module_init (atmel_trng_init); - -static void __exit atmel_trng_exit(void) -{ -platform_driver_unregister (&atmel_trng_driver); -} -module_exit (atmel_trng_exit); +module_platform_driver (atmel_trng_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Peter Korsgaard <[email protected]>" );
drivers/char/hw_random/n2-drv.c +1 -12
@@ -770,15 +770,4 @@ static struct platform_driver n2rng_driver = { .remove = __devexit_p(n2rng_remove), }; -static int __init n2rng_init (void ) -{ -return platform_driver_register (&n2rng_driver); -} - -static void __exit n2rng_exit(void) -{ -platform_driver_unregister (&n2rng_driver); -} - -module_init (n2rng_init); -module_exit (n2rng_exit); +module_platform_driver (n2rng_driver);
drivers/char/hw_random/octeon-rng.c +1 -12
@@ -131,18 +131,7 @@ static struct platform_driver octeon_rng_driver = { .remove = __exit_p(octeon_rng_remove), }; -static int __init octeon_rng_mod_init (void ) -{ -return platform_driver_register (&octeon_rng_driver); -} - -static void __exit octeon_rng_mod_exit(void) -{ -platform_driver_unregister (&octeon_rng_driver); -} - -module_init (octeon_rng_mod_init); -module_exit (octeon_rng_mod_exit); +module_platform_driver (octeon_rng_driver);MODULE_AUTHOR ("David Daney" );MODULE_LICENSE ("GPL" );
drivers/char/hw_random/pasemi-rng.c +1 -11
@@ -148,17 +148,7 @@ static struct platform_driver rng_driver = { .remove = rng_remove, }; -static int __init rng_init (void ) -{ -return platform_driver_register (&rng_driver); -} -module_init (rng_init); - -static void __exit rng_exit(void) -{ -platform_driver_unregister (&rng_driver); -} -module_exit (rng_exit); +module_platform_driver (rng_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Egor Martovetsky <[email protected]>" );
drivers/char/hw_random/picoxcell-rng.c +1 -11
@@ -191,17 +191,7 @@ static struct platform_driver picoxcell_trng_driver = { }, }; -static int __init picoxcell_trng_init (void ) -{ -return platform_driver_register (&picoxcell_trng_driver); -} -module_init (picoxcell_trng_init); - -static void __exit picoxcell_trng_exit(void) -{ -platform_driver_unregister (&picoxcell_trng_driver); -} -module_exit (picoxcell_trng_exit); +module_platform_driver (picoxcell_trng_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Jamie Iles" );
drivers/char/hw_random/ppc4xx-rng.c +1 -11
@@ -139,17 +139,7 @@ static struct platform_driver ppc4xx_rng_driver = { .remove = ppc4xx_rng_remove, }; -static int __init ppc4xx_rng_init (void ) -{ -return platform_driver_register (&ppc4xx_rng_driver); -} -module_init (ppc4xx_rng_init); - -static void __exit ppc4xx_rng_exit(void) -{ -platform_driver_unregister (&ppc4xx_rng_driver); -} -module_exit (ppc4xx_rng_exit); +module_platform_driver (ppc4xx_rng_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Josh Boyer <[email protected]>" );
drivers/char/hw_random/timeriomem-rng.c +1 -12
@@ -149,18 +149,7 @@ static struct platform_driver timeriomem_rng_driver = { .remove = __devexit_p(timeriomem_rng_remove), }; -static int __init timeriomem_rng_init (void ) -{ -return platform_driver_register (&timeriomem_rng_driver); -} - -static void __exit timeriomem_rng_exit(void) -{ -platform_driver_unregister (&timeriomem_rng_driver); -} - -module_init (timeriomem_rng_init); -module_exit (timeriomem_rng_exit); +module_platform_driver (timeriomem_rng_driver);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Alexander Clouter <[email protected]>" );
Signature · 1 line
1.7.5.4
Quoted 9 lines · Axel Lin
This patch converts the drivers in
drivers/char/hw_random/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.Cc Alexander Clouter <[email protected]>Cc David Daney <[email protected]>Cc David S. Miller <[email protected]>Cc Herbert Xu <[email protected]>Cc Jamie Iles <[email protected]>
Thanks Axel!
Quoted 5 lines · Axel Lin
This patch converts the drivers in
drivers/char/hw_random/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.
Quoted 10 lines
Cc Alexander Clouter <[email protected]>Cc David Daney <[email protected]>Cc David S. Miller <[email protected]>Cc Herbert Xu <[email protected]>Cc Jamie Iles <[email protected]>Cc Josh Boyer <[email protected]>Cc Matt Mackall <[email protected]>Cc Olof Johansson <[email protected]>Signed-off-by Axel Lin <[email protected]>
Cheers
Signature · 2 lines
Alexander Clouter .sigmonster says: If you are too busy to read, then you are too busy.
Quoted 4 lines · Axel Lin
This patch converts the drivers in
drivers/char/hw_random/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.
Quoted 9 lines
Cc Alexander Clouter <[email protected]>Cc David Daney <[email protected]>Cc David S. Miller <[email protected]>Cc Herbert Xu <[email protected]>Cc Jamie Iles <[email protected]>Cc Josh Boyer <[email protected]>Cc Matt Mackall <[email protected]>Cc Olof Johansson <[email protected]>Signed-off-by Axel Lin <[email protected]>
Quoted 13 lines · Axel Lin
This patch converts the drivers in
drivers/char/hw_random/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.Cc Alexander Clouter<[email protected]>Cc David Daney<[email protected]>Cc David S. Miller<[email protected]>Cc Herbert Xu<[email protected]>Cc Jamie Iles<[email protected]>Cc Josh Boyer<[email protected]>Cc Matt Mackall<[email protected]>Cc Olof Johansson<[email protected]>Signed-off-by Axel Lin<[email protected]>
Quoted 10 lines
--- drivers/char/hw_random/atmel-rng.c | 12 +----------- drivers/char/hw_random/n2-drv.c | 13 +------------ drivers/char/hw_random/octeon-rng.c | 13 +------------ drivers/char/hw_random/pasemi-rng.c | 12 +----------- drivers/char/hw_random/picoxcell-rng.c | 12 +----------- drivers/char/hw_random/ppc4xx-rng.c | 12 +----------- drivers/char/hw_random/timeriomem-rng.c | 13 +------------ 7 files changed, 7 insertions(+), 80 deletions(-)
For the octeon-rng bit,
Thanks,
David Daney
[...]
Quoted 4 lines · Axel Lin
This patch converts the drivers in
drivers/char/hw_random/*to use themodule_platform_driver()macro which makes the code smaller and a bit simpler.
Quoted 9 lines
Cc Alexander Clouter <[email protected]>Cc David Daney <[email protected]>Cc David S. Miller <[email protected]>Cc Herbert Xu <[email protected]>Cc Jamie Iles <[email protected]>Cc Josh Boyer <[email protected]>Cc Matt Mackall <[email protected]>Cc Olof Johansson <[email protected]>Signed-off-by Axel Lin <[email protected]>
Both patches applied. Thanks!
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt