i2c: Make i2c_del_driver a void function
[powerpc.git] / drivers / macintosh / windfarm_smu_sat.c
index e295a07..9a6c2cf 100644 (file)
@@ -233,15 +233,15 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev)
 {
        struct wf_sat *sat;
        struct wf_sat_sensor *sens;
-       u32 *reg;
-       char *loc, *type;
+       const u32 *reg;
+       const char *loc, *type;
        u8 addr, chip, core;
        struct device_node *child;
        int shift, cpu, index;
        char *name;
        int vsens[2], isens[2];
 
-       reg = (u32 *) get_property(dev, "reg", NULL);
+       reg = of_get_property(dev, "reg", NULL);
        if (reg == NULL)
                return;
        addr = *reg;
@@ -268,9 +268,9 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev)
        isens[0] = isens[1] = -1;
        child = NULL;
        while ((child = of_get_next_child(dev, child)) != NULL) {
-               reg = (u32 *) get_property(child, "reg", NULL);
-               type = get_property(child, "device_type", NULL);
-               loc = get_property(child, "location", NULL);
+               reg = of_get_property(child, "reg", NULL);
+               type = of_get_property(child, "device_type", NULL);
+               loc = of_get_property(child, "location", NULL);
                if (reg == NULL || loc == NULL)
                        continue;
 
@@ -397,12 +397,7 @@ static int wf_sat_detach(struct i2c_client *client)
 
 static int __init sat_sensors_init(void)
 {
-       int err;
-
-       err = i2c_add_driver(&wf_sat_driver);
-       if (err < 0)
-               return err;
-       return 0;
+       return i2c_add_driver(&wf_sat_driver);
 }
 
 static void __exit sat_sensors_exit(void)