diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-04-21 17:34:35 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-06-30 10:12:34 +0100 |
commit | 3a2859d44938473bca16ab5b09e4db2d5392fcff (patch) | |
tree | c0031931e70fe67d56869d30a1f2f6a6f61d7da1 | |
parent | f2935e4f10dbf4313f6cacafa3dadf0b23148e9d (diff) |
thermal: scpi: Update driver for new scpi interface
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | drivers/thermal/scpi-thermal.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/thermal/scpi-thermal.c b/drivers/thermal/scpi-thermal.c index f68c9ce5552e..41eb908e4b70 100644 --- a/drivers/thermal/scpi-thermal.c +++ b/drivers/thermal/scpi-thermal.c @@ -43,6 +43,7 @@ struct scpi_sensor { struct thermal_cooling_device *cdevs[NUM_CLUSTERS]; }; +static struct scpi_ops *scpi_ops; struct scpi_sensor scpi_temp_sensor; #define FRAC_BITS 10 @@ -125,7 +126,7 @@ static int get_temp_value(void *data, long *temp) int ret; unsigned long est_temp; - ret = scpi_get_sensor_value(sensor->sensor_id, &val); + ret = scpi_ops->sensor_get_value(sensor->sensor_id, &val); if (ret) return ret; @@ -189,6 +190,10 @@ static int scpi_thermal_probe(struct platform_device *pdev) return -EPROBE_DEFER; } + scpi_ops = get_scpi_ops(); + if (!scpi_ops) + return -EIO; + platform_set_drvdata(pdev, sensor_data); for_each_possible_cpu(cpu) { @@ -223,7 +228,7 @@ static int scpi_thermal_probe(struct platform_device *pdev) "Error registering cooling device: %d\n", i); } - if ((sensor = scpi_get_sensor(SOC_SENSOR)) < 0) { + if ((sensor = scpi_ops->sensor_get_id(SOC_SENSOR)) < 0) { dev_warn(&pdev->dev, "%s not found. ret=%d\n", SOC_SENSOR, sensor); goto error; } |