summaryrefslogtreecommitdiffstats
path: root/drivers/misc/apds9802als.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-22 15:36:45 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 16:31:49 -0800
commita64fe2ed76614d37abb6966a67f4f39d10efba3c (patch)
tree553806918a13fb98fde71ce8e696d4174e7a103e /drivers/misc/apds9802als.c
parentb00e126ffea89b687a83093546058b07aa054b4c (diff)
downloadop-kernel-dev-a64fe2ed76614d37abb6966a67f4f39d10efba3c.zip
op-kernel-dev-a64fe2ed76614d37abb6966a67f4f39d10efba3c.tar.gz
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 <axel.lin@gmail.com> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Cc: Anantha Narayanan <Anantha.Narayanan@intel.com> Cc: Hemanth V <hemanthv@ti.com> Cc: Christoph Mair <christoph.mair@gmail.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Ben Gardner <bgardner@wabtec.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Kalhan Trisal <kalhan.trisal@intel.com> Cc: Darrick J. Wong <djwong@us.ibm.com> Cc: Daniel Mack <zonque@gmail.com> Cc: Rodolfo Giometti <giometti@linux.it> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/misc/apds9802als.c')
-rw-r--r--drivers/misc/apds9802als.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/misc/apds9802als.c b/drivers/misc/apds9802als.c
index 81db781..0314773 100644
--- a/drivers/misc/apds9802als.c
+++ b/drivers/misc/apds9802als.c
@@ -332,17 +332,7 @@ static struct i2c_driver apds9802als_driver = {
.id_table = apds9802als_id,
};
-static int __init sensor_apds9802als_init(void)
-{
- return i2c_add_driver(&apds9802als_driver);
-}
-
-static void __exit sensor_apds9802als_exit(void)
-{
- i2c_del_driver(&apds9802als_driver);
-}
-module_init(sensor_apds9802als_init);
-module_exit(sensor_apds9802als_exit);
+module_i2c_driver(apds9802als_driver);
MODULE_AUTHOR("Anantha Narayanan <Anantha.Narayanan@intel.com");
MODULE_DESCRIPTION("Avago apds9802als ALS Driver");
OpenPOWER on IntegriCloud