thermal/drivers/hisi: Fix wrong platform_get_irq_byname()
PATCH 1/2 thermal/drivers/hisi: Fix wrong platform_get_irq_byname()
Without this patch, the thermal driver on hi6220 and hi3660 is broken.
That is due because part of the posted patchset was merged but a small change in the DT was dropped.
The hi6220 and hi3660 do not have an interrupt name in the DT, so finding interrupt by name fails.
Fix this by returning back to the platform_get_irq() function call.
--- drivers/thermal/hisi_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/hisi_thermal.c +1 -1
@@ -589,7 +589,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)return ret; } - ret =platform_get_irq_byname (pdev, sensor->irq_name); + ret =platform_get_irq (pdev,0 );if (ret <0 )return ret;
Signature · 1 line
2.7.4
PATCH 2/2 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.
--- drivers/thermal/hisi_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/hisi_thermal.c +1 -1
@@ -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 );
Signature · 1 line
2.7.4