i2c/gpio-i2cmux: Convert to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Thu, 12 Jan 2012 19:32:04 +0000 (20:32 +0100)
committerJean Delvare <khali@endymion.delvare>
Thu, 12 Jan 2012 19:32:04 +0000 (20:32 +0100)
Convert gpio-i2cmux to use the module_platform_driver() macro which
makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Korsgaard <peter.korsgaard@barco.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/muxes/gpio-i2cmux.c

index 7b6ce624cd6e7e403b2cb7708b8581423298ef42..e5fa695eb0fa64673e1c26e82536b52a3a3388e8 100644 (file)
@@ -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@barco.com>");