Skip to contentSkip to conversation

watchdog: iTCO: Fix dependencies on I2C

PATCH In review Guenter Roeck 2 participants 3 messages Sep 11, 2015 – Sep 23, 2015 Watchdog device drivers

lore
Share & tools
lore

Guenter Roeck

author maintainer
#0 lore raw

PATCH 1/1 watchdog: iTCO: Fix dependencies on I2C

If I2C is built as module, the iTCO watchdog driver must be built as module as well. I2C_I801 must only be selected if I2C is configured.

This fixes the following build errors, seen if I2C=m and ITCO_WDT=y.

i2c-i801.c:(.text+0x2bf055): undefined reference to i2c_del_adapter' i2c-i801.c:(.text+0x2c13e0): undefined reference to i2c_add_adapter' i2c-i801.c:(.text+0x2c17bd): undefined reference to `i2c_new_device'

Fixes 2a7a0e9bf7b3 ("watchdog: iTCO_wdt: Add support for TCO on Intel Sunrisepoint")
Cc Matt Fleming <[email protected]>
Cc Lee Jones <[email protected]>
---
 drivers/watchdog/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/watchdog/Kconfig +2 -1
index 55c4b5b0a317..75c358ce71a7 100644
@@ -797,8 +797,9 @@ config ITCO_WDT
 	tristate "Intel TCO Timer/Watchdog"
 	depends on (X86 || IA64) && PCI
 	select WATCHDOG_CORE
+	depends on I2C || I2C=n
 	select LPC_ICH if !EXPERT
-	select I2C_I801 if !EXPERT
+	select I2C_I801 if !EXPERT && I2C
 	---help---
 	  Hardware driver for the intel TCO timer based watchdog devices.
 	  These drivers are included in the Intel 82801 I/O Controller
Signature · 1 line
2.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Guenter Roeck

If I2C is built as module, the iTCO watchdog driver must be built as module as well. I2C_I801 must only be selected if I2C is configured.

This fixes the following build errors, seen if I2C=m and ITCO_WDT=y.

i2c-i801.c:(.text+0x2bf055): undefined reference to i2c_del_adapter' i2c-i801.c:(.text+0x2c13e0): undefined reference to i2c_add_adapter' i2c-i801.c:(.text+0x2c17bd): undefined reference to `i2c_new_device'

Fixes 2a7a0e9bf7b3 ("watchdog: iTCO_wdt: Add support for TCO on Intel Sunrisepoint")
Cc Matt Fleming <[email protected]>
Cc Lee Jones <[email protected]>
---
 drivers/watchdog/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/watchdog/Kconfig +0 -0
index 55c4b5b0a317..75c358ce71a7 100644

drivers/watchdog/Kconfig config ITCO_WDT · line 805

Quoted 10 lines
drivers/watchdog/Kconfig +2 -1
@@ -797,8 +797,9 @@ config ITCO_WDT
 	tristate "Intel TCO Timer/Watchdog"
 	depends on (X86 || IA64) && PCI
 	select WATCHDOG_CORE
+	depends on I2C || I2C=n
 	select LPC_ICH if !EXPERT
-	select I2C_I801 if !EXPERT
+	select I2C_I801 if !EXPERT && I2C
 	---help---
 	  Hardware driver for the intel TCO timer based watchdog devices.
 	  These drivers are included in the Intel 82801 I/O Controller

Whoops, thanks for catching this Guenter. Are you going to send this to Linus?

Signature · 1 line
Matt Fleming, Intel Open Source Technology Center
author maintainer
#2 lore raw
Quoted 28 lines · Matt Fleming
Quoted 27 lines · Guenter Roeck

If I2C is built as module, the iTCO watchdog driver must be built as module as well. I2C_I801 must only be selected if I2C is configured.

This fixes the following build errors, seen if I2C=m and ITCO_WDT=y.

i2c-i801.c:(.text+0x2bf055): undefined reference to i2c_del_adapter' i2c-i801.c:(.text+0x2c13e0): undefined reference to i2c_add_adapter' i2c-i801.c:(.text+0x2c17bd): undefined reference to `i2c_new_device'

Fixes 2a7a0e9bf7b3 ("watchdog: iTCO_wdt: Add support for TCO on Intel Sunrisepoint")
Cc Matt Fleming <[email protected]>
Cc Lee Jones <[email protected]>
---
  drivers/watchdog/Kconfig | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/watchdog/Kconfig +1 -0
index 55c4b5b0a317..75c358ce71a7 100644
@@ -797,8 +797,9 @@ config ITCO_WDT
  	tristate "Intel TCO Timer/Watchdog"
  	depends on (X86 || IA64) && PCI
  	select WATCHDOG_CORE
+	depends on I2C || I2C=n
  	select LPC_ICH if !EXPERT
Quoted 9 lines

drivers/watchdog/Kconfig config ITCO_WDT · line 805

Quoted 5 lines
drivers/watchdog/Kconfig +1 -1
-	select I2C_I801 if !EXPERT
+	select I2C_I801 if !EXPERT && I2C
  	---help---
  	  Hardware driver for the intel TCO timer based watchdog devices.
  	  These drivers are included in the Intel 82801 I/O Controller

Whoops, thanks for catching this Guenter. Are you going to send this to Linus?

Wim should do that.

Quoted 2 lines

Thanks for the review.

Guenter