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/bh1780gli.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/misc/bh1780gli.c') diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c index bfeea9ba702e..54f6f39f990a 100644 --- a/drivers/misc/bh1780gli.c +++ b/drivers/misc/bh1780gli.c @@ -253,21 +253,10 @@ static struct i2c_driver bh1780_driver = { .driver = { .name = "bh1780", .pm = BH1780_PMOPS, -}, + }, }; -static int __init bh1780_init(void) -{ - return i2c_add_driver(&bh1780_driver); -} - -static void __exit bh1780_exit(void) -{ - i2c_del_driver(&bh1780_driver); -} - -module_init(bh1780_init) -module_exit(bh1780_exit) +module_i2c_driver(bh1780_driver); MODULE_DESCRIPTION("BH1780GLI Ambient Light Sensor Driver"); MODULE_LICENSE("GPL"); -- cgit v1.2.3