i2c: convert gpio-i2cmux to use module_platform_driver()
Subsystems (2)
PATCH 1/1 i2c: convert gpio-i2cmux to use module_platform_driver()
This patch converts gpio-i2cmux to use the module_platform_driver() macro which makes the code smaller and a bit simpler.
Signed-off-by Axel Lin <[email protected]>
--- drivers/i2c/muxes/gpio-i2cmux.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/i2c/muxes/gpio-i2cmux.c +1 -12
@@ -165,18 +165,7 @@ static struct platform_driver gpiomux_driver = { }, }; -static int __init gpiomux_init (void ) -{ -return platform_driver_register (&gpiomux_driver); -} - -static void __exit gpiomux_exit(void) -{ -platform_driver_unregister (&gpiomux_driver); -} - -module_init (gpiomux_init); -module_exit (gpiomux_exit); +module_platform_driver (gpiomux_driver);MODULE_DESCRIPTION ("GPIO-based I2C multiplexer driver" );MODULE_AUTHOR ("Peter Korsgaard <peter.korsgaard-ob4gmnvZ1/[email protected]>" );
Signature · 1 line
1.7.5.4
Jean Delvare
AppliedQuoted 22 lines · Axel Lin
This patch converts gpio-i2cmux to use the
module_platform_driver()macro which makes the code smaller and a bit simpler.Signed-off-by Axel Lin <[email protected]>--- drivers/i2c/muxes/gpio-i2cmux.c | 13 +------------ 1 files changed, 1 insertions(+), 12 deletions(-)drivers/i2c/muxes/gpio-i2cmux.c +0
-6@@ -165,18 +165,7 @@ static struct platform_driver gpiomux_driver = { }, }; -static int __init gpiomux_init (void ) -{ -return platform_driver_register (&gpiomux_driver); -} - -static void __exit gpiomux_exit(void)
drivers/i2c/muxes/gpio-i2cmux.c static struct platform_driver gpiomux_driver = { · line 171
Quoted 10 lines
drivers/i2c/muxes/gpio-i2cmux.c +1
-6-{ -platform_driver_unregister (&gpiomux_driver); -} - -module_init (gpiomux_init); -module_exit (gpiomux_exit); +module_platform_driver (gpiomux_driver);MODULE_DESCRIPTION ("GPIO-based I2C multiplexer driver" );MODULE_AUTHOR ("Peter Korsgaard <[email protected]>" );
Applied, thanks!
Signature · 1 line
Jean Delvare
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"AL" == Axel Lin <[email protected]> writes:
AL> This patch converts gpio-i2cmux to use the module_platform_driver() macro which AL> makes the code smaller and a bit simpler.
AL> Signed-off-by: Axel Lin <[email protected]>
Acked-by Peter Korsgaard <[email protected]>
Signature · 6 lines
Sorry about disclaimer - It's out of my control. Bye, Peter Korsgaard DISCLAIMER: Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.