hwmon: convert drivers/hwmon/* to use module_i2c_driver()
[deliverable/linux.git] / drivers / hwmon / w83792d.c
index 9ded133e43f04ff09fbd90c3ddeaa803b1eb65be..a87c4bd2eccf69eb04fa316abcc232ea22839d6d 100644 (file)
@@ -56,7 +56,7 @@ module_param_array(force_subclients, short, NULL, 0);
 MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
                        "{bus, clientaddr, subclientaddr1, subclientaddr2}");
 
-static int init;
+static bool init;
 module_param(init, bool, 0);
 MODULE_PARM_DESC(init, "Set to one to force chip initialization");
 
@@ -265,7 +265,7 @@ DIV_TO_REG(long val)
                        break;
                val >>= 1;
        }
-       return ((u8) i);
+       return (u8)i;
 }
 
 struct w83792d_data {
@@ -333,7 +333,7 @@ static struct i2c_driver w83792d_driver = {
 static inline long in_count_from_reg(int nr, struct w83792d_data *data)
 {
        /* in7 and in8 do not have low bits, but the formula still works */
-       return ((data->in[nr] << 2) | ((data->low_bits >> (2 * nr)) & 0x03));
+       return (data->in[nr] << 2) | ((data->low_bits >> (2 * nr)) & 0x03);
 }
 
 /* The SMBus locks itself. The Winbond W83792D chip has a bank register,
@@ -1641,22 +1641,8 @@ static void w83792d_print_debug(struct w83792d_data *data, struct device *dev)
 }
 #endif
 
-static int __init
-sensors_w83792d_init(void)
-{
-       return i2c_add_driver(&w83792d_driver);
-}
-
-static void __exit
-sensors_w83792d_exit(void)
-{
-       i2c_del_driver(&w83792d_driver);
-}
+module_i2c_driver(w83792d_driver);
 
 MODULE_AUTHOR("Chunhao Huang @ Winbond <DZShen@Winbond.com.tw>");
 MODULE_DESCRIPTION("W83792AD/D driver for linux-2.6");
 MODULE_LICENSE("GPL");
-
-module_init(sensors_w83792d_init);
-module_exit(sensors_w83792d_exit);
-
This page took 0.027495 seconds and 5 git commands to generate.