diff options
-rw-r--r-- | drivers/hwmon/xgene-hwmon.c | 7 |
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) | |||
665 | } | 665 | } |
666 | } else { | 666 | } else { |
667 | struct acpi_pcct_hw_reduced *cppc_ss; | 667 | struct acpi_pcct_hw_reduced *cppc_ss; |
668 | int version = XGENE_HWMON_V1; | ||
669 | #ifdef CONFIG_ACPI | ||
670 | const struct acpi_device_id *acpi_id; | 668 | const struct acpi_device_id *acpi_id; |
669 | int version; | ||
671 | 670 | ||
672 | acpi_id = acpi_match_device(xgene_hwmon_acpi_match, &pdev->dev); | 671 | acpi_id = acpi_match_device(pdev->dev.driver->acpi_match_table, |
672 | &pdev->dev); | ||
673 | if (!acpi_id) | 673 | if (!acpi_id) |
674 | return -EINVAL; | 674 | return -EINVAL; |
675 | 675 | ||
676 | version = (int)acpi_id->driver_data; | 676 | version = (int)acpi_id->driver_data; |
677 | #endif | ||
678 | 677 | ||
679 | if (device_property_read_u32(&pdev->dev, "pcc-channel", | 678 | if (device_property_read_u32(&pdev->dev, "pcc-channel", |
680 | &ctx->mbox_idx)) { | 679 | &ctx->mbox_idx)) { |