From 245e99cfe86830589dac6472ef030898ae91ea84 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 12 Jan 2012 20:32:04 +0100 Subject: i2c/gpio-i2cmux: Convert to use module_platform_driver() Convert gpio-i2cmux to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Acked-by: Peter Korsgaard Signed-off-by: Jean Delvare --- drivers/i2c/muxes/gpio-i2cmux.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/i2c/muxes/gpio-i2cmux.c b/drivers/i2c/muxes/gpio-i2cmux.c index 7b6ce624cd6..e5fa695eb0f 100644 --- a/drivers/i2c/muxes/gpio-i2cmux.c +++ b/drivers/i2c/muxes/gpio-i2cmux.c @@ -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 "); -- cgit v1.2.3