LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Jim Davis <jim.epost@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next <linux-next@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	rui.zhang@intel.com, edubezval@gmail.com,
	linux-pm@vger.kernel.org
Subject: [PATCH] Thermal: int3406_thermal: solve the dependency build error
Date: Thu, 16 Oct 2014 16:58:38 +0800	[thread overview]
Message-ID: <543F88BE.4090307@intel.com> (raw)
In-Reply-To: <CA+r1ZhhoskOXaRSmcrnbdgapi-FsaKf+dnPHTXGkDvkYbvwQ8Q@mail.gmail.com>

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 <aaron.lu@intel.com>
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 <jim.epost@gmail.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
---
 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
-- 
1.9.3


  reply	other threads:[~2014-10-16  8:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-13 14:43 randconfig build error with next-20141013, in drivers/thermal/int340x_thermal/int3406_thermal.c Jim Davis
2014-10-16  8:58 ` Aaron Lu [this message]
2014-10-17  7:06   ` [PATCH v2] Thermal: int3406_thermal: solve the dependency build error Aaron Lu
2014-10-17  7:22     ` [PATCH v3] " Aaron Lu
2014-10-28  6:11       ` [PATCH v4] " Aaron Lu
2014-11-07 19:11         ` Eduardo Valentin
2014-11-30 12:22           ` Zhang Rui
2014-12-02  6:18             ` [PATCH] Thermal: introduce INT3406 thermal driver Aaron Lu
2014-12-08  3:35               ` Zhang Rui
2014-12-08 10:55                 ` Geert Uytterhoeven
2014-12-08 11:20                   ` Geert Uytterhoeven
2014-12-08 13:22                     ` Aaron Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543F88BE.4090307@intel.com \
    --to=aaron.lu@intel.com \
    --cc=edubezval@gmail.com \
    --cc=jim.epost@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sfr@canb.auug.org.au \
    --subject='Re: [PATCH] Thermal: int3406_thermal: solve the dependency build error' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).