From patchwork Thu Oct 16 08:58:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 5088961 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6FEBB9F30B for ; Thu, 16 Oct 2014 08:59:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94BCC201B9 for ; Thu, 16 Oct 2014 08:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E61F201CD for ; Thu, 16 Oct 2014 08:59:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751695AbaJPI7H (ORCPT ); Thu, 16 Oct 2014 04:59:07 -0400 Received: from mga02.intel.com ([134.134.136.20]:22454 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbaJPI7E (ORCPT ); Thu, 16 Oct 2014 04:59:04 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 16 Oct 2014 01:58:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,731,1406617200"; d="scan'208";a="619743995" Received: from aaronlu.sh.intel.com ([10.239.37.127]) by orsmga002.jf.intel.com with ESMTP; 16 Oct 2014 01:58:39 -0700 Message-ID: <543F88BE.4090307@intel.com> Date: Thu, 16 Oct 2014 16:58:38 +0800 From: Aaron Lu MIME-Version: 1.0 To: Jim Davis , Stephen Rothwell , linux-next , linux-kernel , rui.zhang@intel.com, edubezval@gmail.com, linux-pm@vger.kernel.org Subject: [PATCH] Thermal: int3406_thermal: solve the dependency build error References: In-Reply-To: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 10/13/2014 10:43 PM, Jim Davis wrote: > Building with the attached random configuration file, > > drivers/built-in.o: In function `int3406_thermal_probe': > int3406_thermal.c:(.text+0x1d10b8): undefined reference to > `acpi_video_get_levels' > make: *** [vmlinux] Error 1 Thanks for the report Jim, below patch should fix this problem: From: Aaron Lu Date: Thu, 16 Oct 2014 16:35:02 +0800 Subject: [PATCH] Thermal: int3406_thermal: solve the dependency build error Jim found that the current kernel may trigger a build error with some config: drivers/built-in.o: In function `int3406_thermal_probe': int3406_thermal.c:(.text+0x1d10b8): undefined reference to `acpi_video_get_levels'. The problem happens when CONFIG_THERMAL=y and CONFIG_ACPI_VIDEO=m. Since the ACPI video driver can still work well without CONFIG_THERMAL(regarding its main functionality: backlight control), solve the problem by removing the select THERMAL line for ACPI_VIDEO and adding the select ACPI_VIDEO for INT340X_THERMAL. The result is that for kernels that do not have CONFIG_THERMAL selected now, the ACPI video driver will not create the cooling device as it did before(but works well otherwise). Reported-by: Jim Davis Signed-off-by: Aaron Lu --- drivers/acpi/Kconfig | 1 - drivers/thermal/Kconfig | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index b23fe37f67c0..8a09f98dbb0c 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -131,7 +131,6 @@ config ACPI_VIDEO tristate "Video" depends on X86 && BACKLIGHT_CLASS_DEVICE depends on INPUT - select THERMAL help This driver implements the ACPI Extensions For Display Adapters for integrated graphics devices on motherboard, as specified in diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 9b012ff65220..4e1053a8d774 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -235,6 +235,7 @@ config INT340X_THERMAL select THERMAL_GOV_USER_SPACE select ACPI_THERMAL_REL select ACPI_FAN + select ACPI_VIDEO help Newer laptops and tablets that use ACPI may have thermal sensors and other devices with thermal control capabilities outside the core