hwmon: convert drivers/hwmon/* to use module_i2c_driver()
[deliverable/linux.git] / drivers / hwmon / max1668.c
index 20d1b2ddffb633fbc8b555a8818e0cab479c4cfa..12249f7bccf4ecfc09acb00c4a1466eb147c155b 100644 (file)
@@ -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");
 
@@ -335,10 +335,10 @@ static struct attribute *max1668_attribute_unique[] = {
        NULL
 };
 
-static mode_t max1668_attribute_mode(struct kobject *kobj,
+static umode_t max1668_attribute_mode(struct kobject *kobj,
                                     struct attribute *attr, int index)
 {
-       int ret = S_IRUGO;
+       umode_t ret = S_IRUGO;
        if (read_only)
                return ret;
        if (attr == &sensor_dev_attr_temp1_max.dev_attr.attr ||
@@ -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)
This page took 0.031595 seconds and 5 git commands to generate.