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/hmc6352.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/misc/hmc6352.c') diff --git a/drivers/misc/hmc6352.c b/drivers/misc/hmc6352.c index ca938fc8a8d6..423cd40f1c0f 100644 --- a/drivers/misc/hmc6352.c +++ b/drivers/misc/hmc6352.c @@ -148,18 +148,7 @@ static struct i2c_driver hmc6352_driver = { .id_table = hmc6352_id, }; -static int __init sensor_hmc6352_init(void) -{ - return i2c_add_driver(&hmc6352_driver); -} - -static void __exit sensor_hmc6352_exit(void) -{ - i2c_del_driver(&hmc6352_driver); -} - -module_init(sensor_hmc6352_init); -module_exit(sensor_hmc6352_exit); +module_i2c_driver(hmc6352_driver); MODULE_AUTHOR("Kalhan Trisal