diff options
| -rw-r--r-- | drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 16 |
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); |
