diff options
Diffstat (limited to 'drivers/hwmon/max1668.c')
-rw-r--r-- | drivers/hwmon/max1668.c | 53 |
1 files changed, 21 insertions, 32 deletions
diff --git a/drivers/hwmon/max1668.c b/drivers/hwmon/max1668.c index 6914195cfd3..335b183d7c0 100644 --- a/drivers/hwmon/max1668.c +++ b/drivers/hwmon/max1668.c @@ -1,23 +1,23 @@ /* - Copyright (c) 2011 David George <david.george@ska.ac.za> - - based on adm1021.c - some credit to Christoph Scheurer, but largely a rewrite - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ + * Copyright (c) 2011 David George <david.george@ska.ac.za> + * + * based on adm1021.c + * some credit to Christoph Scheurer, but largely a rewrite + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ #include <linux/module.h> #include <linux/init.h> @@ -59,7 +59,7 @@ static unsigned short max1668_addr_list[] = { #define DEV_ID_MAX1989 0xb /* read only mode module parameter */ -static int read_only; +static bool read_only; module_param(read_only, bool, 0); MODULE_PARM_DESC(read_only, "Don't set any values, read only mode"); @@ -484,19 +484,8 @@ static struct i2c_driver max1668_driver = { .address_list = max1668_addr_list, }; -static int __init sensors_max1668_init(void) -{ - return i2c_add_driver(&max1668_driver); -} - -static void __exit sensors_max1668_exit(void) -{ - i2c_del_driver(&max1668_driver); -} +module_i2c_driver(max1668_driver); MODULE_AUTHOR("David George <david.george@ska.ac.za>"); MODULE_DESCRIPTION("MAX1668 remote temperature sensor driver"); MODULE_LICENSE("GPL"); - -module_init(sensors_max1668_init) -module_exit(sensors_max1668_exit) |