From a64fe2ed76614d37abb6966a67f4f39d10efba3c Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 22 Jan 2012 15:36:45 +0800 Subject: MISC: convert drivers/misc/* to use module_i2c_driver() This patch converts the drivers in drivers/misc/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Cc: Michael Hennerich Cc: Anantha Narayanan Cc: Hemanth V Cc: Christoph Mair Cc: Grant Likely Cc: Ben Gardner Cc: Minkyu Kang Cc: Kalhan Trisal Cc: Darrick J. Wong Cc: Daniel Mack Cc: Rodolfo Giometti Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- drivers/misc/ad525x_dpot-i2c.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/misc/ad525x_dpot-i2c.c') diff --git a/drivers/misc/ad525x_dpot-i2c.c b/drivers/misc/ad525x_dpot-i2c.c index 83adab69bfd4..820826270b62 100644 --- a/drivers/misc/ad525x_dpot-i2c.c +++ b/drivers/misc/ad525x_dpot-i2c.c @@ -113,17 +113,7 @@ static struct i2c_driver ad_dpot_i2c_driver = { .id_table = ad_dpot_id, }; -static int __init ad_dpot_i2c_init(void) -{ - return i2c_add_driver(&ad_dpot_i2c_driver); -} -module_init(ad_dpot_i2c_init); - -static void __exit ad_dpot_i2c_exit(void) -{ - i2c_del_driver(&ad_dpot_i2c_driver); -} -module_exit(ad_dpot_i2c_exit); +module_i2c_driver(ad_dpot_i2c_driver); MODULE_AUTHOR("Michael Hennerich "); MODULE_DESCRIPTION("digital potentiometer I2C bus driver"); -- cgit v1.2.3