Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
[firefly-linux-kernel-4.4.55.git] / drivers / macintosh / windfarm_smu_sat.c
index 72dfe191235bb7446ac4d4c359d2f4ab8c90eb37..426e810233d7403595474f2a1e1ffa810daa141f 100644 (file)
@@ -204,7 +204,7 @@ static struct wf_sensor_ops wf_sat_ops = {
 static int wf_sat_probe(struct i2c_client *client,
                        const struct i2c_device_id *id)
 {
-       struct device_node *dev = client->dev.platform_data;
+       struct device_node *dev = client->dev.of_node;
        struct wf_sat *sat;
        struct wf_sat_sensor *sens;
        const u32 *reg;
@@ -287,7 +287,7 @@ static int wf_sat_probe(struct i2c_client *client,
                sens->sat = sat;
                sens->sens.ops = &wf_sat_ops;
                sens->sens.name = (char *) (sens + 1);
-               snprintf(sens->sens.name, 16, "%s-%d", name, cpu);
+               snprintf((char *)sens->sens.name, 16, "%s-%d", name, cpu);
 
                if (wf_register_sensor(&sens->sens))
                        kfree(sens);
@@ -314,7 +314,7 @@ static int wf_sat_probe(struct i2c_client *client,
                sens->sat = sat;
                sens->sens.ops = &wf_sat_ops;
                sens->sens.name = (char *) (sens + 1);
-               snprintf(sens->sens.name, 16, "cpu-power-%d", cpu);
+               snprintf((char *)sens->sens.name, 16, "cpu-power-%d", cpu);
 
                if (wf_register_sensor(&sens->sens))
                        kfree(sens);