diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-04-21 17:34:35 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-04-22 10:39:16 +0100 |
commit | 7d9ee300a58720a81b82fd9b39c46c92b81096c1 (patch) | |
tree | 9f6417340b9fff9911c331dc17d3898762ad9d20 /drivers | |
parent | f2d0f80ffc5d19c3de4dc0359e0fa34dc51b1237 (diff) |
thermal: scpi: Update driver for new scpi interface
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'drivers')
-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; } |