summaryrefslogtreecommitdiff
path: root/drivers/hwmon/xgene-hwmon.c
diff options
context:
space:
mode:
authorhotran <hotran@apm.com>2017-10-31 23:58:07 +0300
committerGuenter Roeck <linux@roeck-us.net>2017-11-01 16:14:52 +0300
commit2305a18ba9ffa105ad1686f40a7861718c338e3c (patch)
treef63cc22fa4561f19c197b22fa195add6ea46d79a /drivers/hwmon/xgene-hwmon.c
parent5813da157f7dbe03d268c8d0dd9425d0e3944910 (diff)
downloadlinux-2305a18ba9ffa105ad1686f40a7861718c338e3c.tar.xz
hwmon: (xgene) Minor clean up of ifdef and acpi_match_table reference
This patch removes the un-necessary ifdef CONFIG_ACPI and directly uses the acpi_match_table from the driver pdev. Signed-off-by: Hoan Tran <hotran@apm.com> [groeck: Dropped unnecessary initialization] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/xgene-hwmon.c')
-rw-r--r--drivers/hwmon/xgene-hwmon.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 57834361fb3c..a3cd91f23267 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -665,16 +665,15 @@ static int xgene_hwmon_probe(struct platform_device *pdev)
}
} else {
struct acpi_pcct_hw_reduced *cppc_ss;
- int version = XGENE_HWMON_V1;
-#ifdef CONFIG_ACPI
const struct acpi_device_id *acpi_id;
+ int version;
- acpi_id = acpi_match_device(xgene_hwmon_acpi_match, &pdev->dev);
+ acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table,
+ &pdev->dev);
if (!acpi_id)
return -EINVAL;
version = (int)acpi_id->driver_data;
-#endif
if (device_property_read_u32(&pdev->dev, "pcc-channel",
&ctx->mbox_idx)) {