Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

thermal/drivers/hisi: Fix number of sensors on hi3660

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: 8c6c36846f11 (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>

authored by

Daniel Lezcano and committed by
Eduardo Valentin
7d3a2a2b 5d7ab8f0

+1 -1
+1 -1
drivers/thermal/hisi_thermal.c
··· 424 424 struct platform_device *pdev = data->pdev; 425 425 struct device *dev = &pdev->dev; 426 426 427 - data->nr_sensors = 2; 427 + data->nr_sensors = 1; 428 428 429 429 data->sensor = devm_kzalloc(dev, sizeof(*data->sensor) * 430 430 data->nr_sensors, GFP_KERNEL);