From a3664b51c783aaa0dde1c95334d1a670d6d54590 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 12 Jan 2012 20:32:04 +0100 Subject: i2c/busses: Use module_platform_driver() Convert the drivers in drivers/i2c/busses/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Ben Dooks Acked-by: Jochen Friedrich Acked-by: Peter Korsgaard Acked-by: Wolfram Sang Cc: Manuel Lauss Cc: Barry Song <21cnbao@gmail.com> Cc: Linus Walleij Cc: Yong Zhang Cc: Lucas De Marchi Cc: Grant Likely Cc: Samuel Ortiz Signed-off-by: Axel Lin Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-cpm.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/i2c/busses/i2c-cpm.c') diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index b1d9cd28d8da..c1e1096ba069 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c @@ -724,18 +724,7 @@ static struct platform_driver cpm_i2c_driver = { }, }; -static int __init cpm_i2c_init(void) -{ - return platform_driver_register(&cpm_i2c_driver); -} - -static void __exit cpm_i2c_exit(void) -{ - platform_driver_unregister(&cpm_i2c_driver); -} - -module_init(cpm_i2c_init); -module_exit(cpm_i2c_exit); +module_platform_driver(cpm_i2c_driver); MODULE_AUTHOR("Jochen Friedrich "); MODULE_DESCRIPTION("I2C-Bus adapter routines for CPM boards"); -- cgit v1.2.1