Skip to contentSkip to conversation

x86, olpc: Fix dependency on POWER_SUPPLY

PATCH In review Daniel Drake 3 participants 5 messages Jul 24, 2011 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, olpc: Fix dependency on POWER_SUPPLY

As reported by Randy Dunlap, CONFIG_POWER_SUPPLY=m caused a compile error:

arch/x86/built-in.o: In function `battery_status_changed':
olpc-xo15-sci.c:(.text+0x3acdd): undefined reference to power_supply_get_by_name' olpc-xo15-sci.c:(.text+0x3ad04): undefined reference to power_supply_changed'

The SCI drivers, as bool, require POWER_SUPPLY to be builtin. Use select to make that a hard requirement and avoid this build failure.

---
 arch/x86/Kconfig |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/Kconfig +4 -2
index 8af5ba8..b198c01 100644
@@ -2089,7 +2089,8 @@ config OLPC_XO1_RTC
 
 config OLPC_XO1_SCI
 	bool "OLPC XO-1 SCI extras"
-	depends on OLPC && OLPC_XO1_PM && POWER_SUPPLY
+	depends on OLPC && OLPC_XO1_PM
+	select POWER_SUPPLY
 	select GPIO_CS5535
 	select MFD_CORE
 	---help---
@@ -2103,7 +2104,8 @@ config OLPC_XO1_SCI
 
 config OLPC_XO15_SCI
 	bool "OLPC XO-1.5 SCI extras"
-	depends on OLPC && ACPI && POWER_SUPPLY
+	depends on OLPC && ACPI
+	select POWER_SUPPLY
 	---help---
 	  Add support for SCI-based features of the OLPC XO-1.5 laptop:
 	   - EC-driven system wakeups
Signature · 1 line
1.7.6
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Sun, 24 Jul 2011 18:33:21 +0100 (BST) Daniel Drake wrote:

As reported by Randy Dunlap, CONFIG_POWER_SUPPLY=m caused a compile error:

arch/x86/built-in.o: In function `battery_status_changed':
olpc-xo15-sci.c:(.text+0x3acdd): undefined reference to power_supply_get_by_name' olpc-xo15-sci.c:(.text+0x3ad04): undefined reference to power_supply_changed'

The SCI drivers, as bool, require POWER_SUPPLY to be builtin. Use select to make that a hard requirement and avoid this build failure.

Thanks.

Quoted 31 lines
---
 arch/x86/Kconfig |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/Kconfig +4 -2
index 8af5ba8..b198c01 100644
@@ -2089,7 +2089,8 @@ config OLPC_XO1_RTC
 
 config OLPC_XO1_SCI
 	bool "OLPC XO-1 SCI extras"
-	depends on OLPC && OLPC_XO1_PM && POWER_SUPPLY
+	depends on OLPC && OLPC_XO1_PM
+	select POWER_SUPPLY
 	select GPIO_CS5535
 	select MFD_CORE
 	---help---
@@ -2103,7 +2104,8 @@ config OLPC_XO1_SCI
 
 config OLPC_XO15_SCI
 	bool "OLPC XO-1.5 SCI extras"
-	depends on OLPC && ACPI && POWER_SUPPLY
+	depends on OLPC && ACPI
+	select POWER_SUPPLY
 	---help---
 	  Add support for SCI-based features of the OLPC XO-1.5 laptop:
 	   - EC-driven system wakeups
Signature · 1 line
1.7.6

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#2 lore raw
In reply to Daniel Drake
Quoted 10 lines · Daniel Drake

As reported by Randy Dunlap, CONFIG_POWER_SUPPLY=m caused a compile error:

arch/x86/built-in.o: In function `battery_status_changed':
olpc-xo15-sci.c:(.text+0x3acdd): undefined reference to power_supply_get_by_name' olpc-xo15-sci.c:(.text+0x3ad04): undefined reference to power_supply_changed'

The SCI drivers, as bool, require POWER_SUPPLY to be builtin. Use select to make that a hard requirement and avoid this build failure.

Note that we generally try to add a Reported-by tag in such cases.

(i've added that, no need to resend.)

Thanks,

Ingo

#3 lore raw
Quoted 3 lines · Ingo Molnar

Note that we generally try to add a Reported-by tag in such cases.

(i've added that, no need to resend.)

I'll remember that for next time.

Please let me know if theres anything else I can do to help the process of getting these patches into mainline.

Thanks!
Daniel

#4 lore raw
Quoted 9 lines · Daniel Drake
Quoted 3 lines · Ingo Molnar

Note that we generally try to add a Reported-by tag in such cases.

(i've added that, no need to resend.)

I'll remember that for next time.

Please let me know if theres anything else I can do to help the process of getting these patches into mainline.

Not at the moment - i've merged them and testing them now to see whether the boot crash is gone. Will let you know if there's any test failure.

Thanks,

Ingo