From patchwork Tue Nov 17 02:38:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11911195 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4CEEC388F9 for ; Tue, 17 Nov 2020 02:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EF332469C for ; Tue, 17 Nov 2020 02:38:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="D5LP9SOn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726771AbgKQCiN (ORCPT ); Mon, 16 Nov 2020 21:38:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgKQCiN (ORCPT ); Mon, 16 Nov 2020 21:38:13 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9FB1C0613CF; Mon, 16 Nov 2020 18:38:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=6eb2pIfy6Xdnw/Krhg5PKBjpnWNrsxoSBJPm0fWPw/w=; b=D5LP9SOnbLesrH01i4G2Sv3ueo vzDyrl2xpM11BHXLLzooys63KsxJWzmJz7TTFy7t0HrWe/OC44npexsSWrVJtxrv/rLFOIoHmQ6z5 HlZiCgZuLxyS5b47+XCu/M9Grsp9C24v0K7ixE2Q0lJUbZO3RrhlbJCigk1NgNa4SiVjyeyATrO5E uV0KYLr+WvAczfxuO7zYDWyNFC+xNuL2x9i/DfBHvEmYIf76DplnfEzQxtjfgwp1S97d6YzOVMByT feI6eNvh6z1twEfPmtonVpbRzFWxz0o0Gv0alJdx+8xoc2wBDXCzoxen9WR+6VC0UU0RLdwnHfdHO U2EmEJIQ==; Received: from [2601:1c0:6280:3f0::f32] (helo=smtpauth.infradead.org) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1keqsk-0006sO-Ef; Tue, 17 Nov 2020 02:38:10 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Sumeet Pawnikar , Daniel Lezcano , Zhang Rui , Amit Kucheria , linux-pm@vger.kernel.org Subject: [PATCH -next] thermal: intel_pch_thermal: fix build for ACPI not enabled Date: Mon, 16 Nov 2020 18:38:07 -0800 Message-Id: <20201117023807.8266-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The reference to acpi_gbl_FADT causes a build error when ACPI is not enabled. Fix by making that conditional on CONFIG_ACPI. ../drivers/thermal/intel/intel_pch_thermal.c: In function 'pch_wpt_suspend': ../drivers/thermal/intel/intel_pch_thermal.c:217:8: error: 'acpi_gbl_FADT' undeclared (first use in this function); did you mean 'acpi_get_type'? if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) ^~~~~~~~~~~~~ Fixes: ef63b043ac86 ("thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold") Signed-off-by: Randy Dunlap Cc: Sumeet Pawnikar Cc: Daniel Lezcano Cc: Zhang Rui Cc: Amit Kucheria Cc: linux-pm@vger.kernel.org Acked-by: Sumeet Pawnikar --- drivers/thermal/intel/intel_pch_thermal.c | 4 ++++ 1 file changed, 4 insertions(+) --- linux-next-20201116.orig/drivers/thermal/intel/intel_pch_thermal.c +++ linux-next-20201116/drivers/thermal/intel/intel_pch_thermal.c @@ -214,8 +214,12 @@ static int pch_wpt_suspend(struct pch_th } /* Do not check temperature if it is not a S0ix capable platform */ +#ifdef CONFIG_ACPI if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) return 0; +#else + return 0; +#endif /* Do not check temperature if it is not s2idle */ if (pm_suspend_via_firmware())