summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
authorZhang Rui2019-04-21 10:45:11 +0200
committerZhang Rui2019-04-22 04:56:40 +0200
commit6eb61a9361951e466628bcb0abaf0a197181ec97 (patch)
treefd8a7a3ed8825c0c5dcca4a504b6438f7c910264 /drivers/thermal
parentLinux 5.1-rc5 (diff)
downloadkernel-qcow2-linux-6eb61a9361951e466628bcb0abaf0a197181ec97.tar.gz
kernel-qcow2-linux-6eb61a9361951e466628bcb0abaf0a197181ec97.tar.xz
kernel-qcow2-linux-6eb61a9361951e466628bcb0abaf0a197181ec97.zip
thermal/int3403_thermal: favor _TMP instead of PTYP
All the INT3403 devices with _TMP can be a sensor. Link: https://bugzilla.kernel.org/show_bug.cgi?id=202671 Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/intel/int340x_thermal/int3403_thermal.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/thermal/intel/int340x_thermal/int3403_thermal.c b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c
index 0c19fcd56a0d..79a7df2baa92 100644
--- a/drivers/thermal/intel/int340x_thermal/int3403_thermal.c
+++ b/drivers/thermal/intel/int340x_thermal/int3403_thermal.c
@@ -220,6 +220,7 @@ static int int3403_add(struct platform_device *pdev)
{
struct int3403_priv *priv;
int result = 0;
+ unsigned long long tmp;
acpi_status status;
priv = devm_kzalloc(&pdev->dev, sizeof(struct int3403_priv),
@@ -234,19 +235,18 @@ static int int3403_add(struct platform_device *pdev)
goto err;
}
- status = acpi_evaluate_integer(priv->adev->handle, "PTYP",
- NULL, &priv->type);
- if (ACPI_FAILURE(status)) {
- unsigned long long tmp;
- status = acpi_evaluate_integer(priv->adev->handle, "_TMP",
- NULL, &tmp);
+ status = acpi_evaluate_integer(priv->adev->handle, "_TMP",
+ NULL, &tmp);
+ if (ACPI_FAILURE(status)) {
+ status = acpi_evaluate_integer(priv->adev->handle, "PTYP",
+ NULL, &priv->type);
if (ACPI_FAILURE(status)) {
result = -EINVAL;
goto err;
- } else {
- priv->type = INT3403_TYPE_SENSOR;
}
+ } else {
+ priv->type = INT3403_TYPE_SENSOR;
}
platform_set_drvdata(pdev, priv);