aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Rui <rui.zhang@intel.com>2019-04-21 04:45:11 -0400
committerZhang Rui <rui.zhang@intel.com>2019-04-21 22:56:40 -0400
commit6eb61a9361951e466628bcb0abaf0a197181ec97 (patch)
treefd8a7a3ed8825c0c5dcca4a504b6438f7c910264
parentdc4060a5dc2557e6b5aa813bf5b73677299d62d2 (diff)
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>
-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)
220{ 220{
221 struct int3403_priv *priv; 221 struct int3403_priv *priv;
222 int result = 0; 222 int result = 0;
223 unsigned long long tmp;
223 acpi_status status; 224 acpi_status status;
224 225
225 priv = devm_kzalloc(&pdev->dev, sizeof(struct int3403_priv), 226 priv = devm_kzalloc(&pdev->dev, sizeof(struct int3403_priv),
@@ -234,19 +235,18 @@ static int int3403_add(struct platform_device *pdev)
234 goto err; 235 goto err;
235 } 236 }
236 237
237 status = acpi_evaluate_integer(priv->adev->handle, "PTYP",
238 NULL, &priv->type);
239 if (ACPI_FAILURE(status)) {
240 unsigned long long tmp;
241 238
242 status = acpi_evaluate_integer(priv->adev->handle, "_TMP", 239 status = acpi_evaluate_integer(priv->adev->handle, "_TMP",
243 NULL, &tmp); 240 NULL, &tmp);
241 if (ACPI_FAILURE(status)) {
242 status = acpi_evaluate_integer(priv->adev->handle, "PTYP",
243 NULL, &priv->type);
244 if (ACPI_FAILURE(status)) { 244 if (ACPI_FAILURE(status)) {
245 result = -EINVAL; 245 result = -EINVAL;
246 goto err; 246 goto err;
247 } else {
248 priv->type = INT3403_TYPE_SENSOR;
249 } 247 }
248 } else {
249 priv->type = INT3403_TYPE_SENSOR;
250 } 250 }
251 251
252 platform_set_drvdata(pdev, priv); 252 platform_set_drvdata(pdev, priv);