From patchwork Tue Oct 31 20:58:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hotran X-Patchwork-Id: 10035419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4305860327 for ; Tue, 31 Oct 2017 20:58:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33DBF28520 for ; Tue, 31 Oct 2017 20:58:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25B3228A58; Tue, 31 Oct 2017 20:58:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E2428520 for ; Tue, 31 Oct 2017 20:58:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932835AbdJaU6S (ORCPT ); Tue, 31 Oct 2017 16:58:18 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:49903 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932779AbdJaU6R (ORCPT ); Tue, 31 Oct 2017 16:58:17 -0400 Received: by mail-pf0-f193.google.com with SMTP id i5so222470pfe.6 for ; Tue, 31 Oct 2017 13:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id; bh=sCdgCI9kGzrOSBCRIuD8dgGSbGy/8qnIPc56K56w4eg=; b=cV2o6cASObzYLyrteJp0y0INxsrIiMZa556ATKhmdDezUTc7DS0DSbRWCrrcvOYMfo qiA/eeBYgGqGLT9kFj30HFgCMklXExvJjJbG7e4qxMjdauO8kXRbL7hSg4/w4ereLe/z b5dOyrsySedLcQpe9DqYH9mrFrXETPJtEjJDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sCdgCI9kGzrOSBCRIuD8dgGSbGy/8qnIPc56K56w4eg=; b=KyRka2XnODUTTyO76Rlt22+lwtO5hClw5wwKylbYm8mZtYBy6J+8KidnG9MiNFue3n SdDA9Xeyfj1UDK63wIf6xrL20jQbyonoBQysimhWphj6Q+ShGcInI79qmuF3udafCdQp 8JHslhZaNN2yttQD06DDlrrYmQAV2r0xkxlCTJEfSZlKORQt2VuyK0MjweN3buGH7kvY RoTk1sjOevfwJu+wY7xkddYwNgJ1j0HcyEuPC718IHRszdJgCVPdDVA4pgbvaaImNaM6 nbHGYK9zj2TAFuW3Zq8/GWg0DPu0ghkqZCV7xjE5Pq0v2o6FNzPRBfyS6qmXexarBIbR PnSg== X-Gm-Message-State: AMCzsaV6JFgB9qTLQKe73Uj0nyO/zQ3oYFIVNbMf5KHZXFjJaguPSIVQ jvS4MOHLZ7i3aenlki0LxNnz4M0dMBs= X-Google-Smtp-Source: ABhQp+R7GxmB95+Vjim7+Uu3Ics+soqQ/V7cl/s4kuWJ53hfBvrZpB0X0B591Nl/xkqRu9fNaTt5IA== X-Received: by 10.99.65.131 with SMTP id o125mr3012488pga.83.1509483496786; Tue, 31 Oct 2017 13:58:16 -0700 (PDT) Received: from T3400_localhost.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id r16sm4456423pgt.72.2017.10.31.13.58.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Oct 2017 13:58:16 -0700 (PDT) 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-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)) {