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/bh1770glc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/misc/bh1770glc.c') diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c index d79a972f2c79..3d56ae7ef8de 100644 --- a/drivers/misc/bh1770glc.c +++ b/drivers/misc/bh1770glc.c @@ -1399,19 +1399,8 @@ static struct i2c_driver bh1770_driver = { .id_table = bh1770_id, }; -static int __init bh1770_init(void) -{ - return i2c_add_driver(&bh1770_driver); -} - -static void __exit bh1770_exit(void) -{ - i2c_del_driver(&bh1770_driver); -} +module_i2c_driver(bh1770_driver); MODULE_DESCRIPTION("BH1770GLC / SFH7770 combined ALS and proximity sensor"); MODULE_AUTHOR("Samu Onkalo, Nokia Corporation"); MODULE_LICENSE("GPL v2"); - -module_init(bh1770_init); -module_exit(bh1770_exit); -- cgit