提交 c176b10b 编写于 作者: D Daniel Lezcano 提交者: Eduardo Valentin

thermal/drivers/hisi: Fix missing interrupt enablement

The interrupt for the temperature threshold is not enabled at the end of the
probe function, enable it after the setup is complete.

On the other side, the irq_enabled is not correctly set as we are checking if
the interrupt is masked where 'yes' means irq_enabled=false.

	irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED,
				&data->irq_enabled);

As we are always enabling the interrupt, it is pointless to check if
the interrupt is masked or not, just set irq_enabled to 'true'.
Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: NLeo Yan <leo.yan@linaro.org>
Tested-by: NLeo Yan <leo.yan@linaro.org>
Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
上级 ba817a8c
...@@ -345,8 +345,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) ...@@ -345,8 +345,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
} }
hisi_thermal_enable_bind_irq_sensor(data); hisi_thermal_enable_bind_irq_sensor(data);
irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED, data->irq_enabled = true;
&data->irq_enabled);
for (i = 0; i < HISI_MAX_SENSORS; ++i) { for (i = 0; i < HISI_MAX_SENSORS; ++i) {
ret = hisi_thermal_register_sensor(pdev, data, ret = hisi_thermal_register_sensor(pdev, data,
...@@ -358,6 +357,8 @@ static int hisi_thermal_probe(struct platform_device *pdev) ...@@ -358,6 +357,8 @@ static int hisi_thermal_probe(struct platform_device *pdev)
hisi_thermal_toggle_sensor(&data->sensors[i], true); hisi_thermal_toggle_sensor(&data->sensors[i], true);
} }
enable_irq(data->irq);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册