Skip to content

Commit

Permalink
thermal/drivers/hisi: Fix number of sensors on hi3660
Browse files Browse the repository at this point in the history
Without this patch the thermal driver is broken on hi3660.

The dual sensors support patchset was partially merged, unfortunately
the dual thermal zones definition is not available in the DT yet, so
when the driver tries to register all the sensors that fails.

By reducing to 1 the number of sensors on the hi3660, we switch back
to the previous functionnality.

Fixes: 8c6c368 (thermal/drivers/hisi: Add the dual clusters sensors for hi3660)
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
  • Loading branch information
Daniel Lezcano authored and Eduardo Valentin committed Dec 11, 2018
1 parent 5d7ab8f commit 7d3a2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/hisi_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static int hi3660_thermal_probe(struct hisi_thermal_data *data)
struct platform_device *pdev = data->pdev;
struct device *dev = &pdev->dev;

data->nr_sensors = 2;
data->nr_sensors = 1;

data->sensor = devm_kzalloc(dev, sizeof(*data->sensor) *
data->nr_sensors, GFP_KERNEL);
Expand Down

0 comments on commit 7d3a2a2

Please sign in to comment.