From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932903AbdJaU6T (ORCPT ); Tue, 31 Oct 2017 16:58:19 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:45075 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932830AbdJaU6R (ORCPT ); Tue, 31 Oct 2017 16:58:17 -0400 X-Google-Smtp-Source: ABhQp+R7GxmB95+Vjim7+Uu3Ics+soqQ/V7cl/s4kuWJ53hfBvrZpB0X0B591Nl/xkqRu9fNaTt5IA== From: Hoan Tran To: Guenter Roeck , Jean Delvare Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, lho@apm.com, patches@apm.com, Hoan Tran Subject: [PATCH] hwmon: xgene: Minor clean up of ifdef and acpi_match_table reference Date: Tue, 31 Oct 2017 13:58:07 -0700 Message-Id: <1509483487-10110-1-git-send-email-hotran@apm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/hwmon/xgene-hwmon.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c index 5783436..85c4e3d 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 = XGENE_HWMON_V1; - 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)) { -- 2.7.4