Skip to contentSkip to conversation

watchdog: Fix build with CONFIG_ITCO_VENDOR_SUPPORT=n

PATCH In review Jean Delvare 2 participants 2 messages Aug 8, 2008 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: Fix build with CONFIG_ITCO_VENDOR_SUPPORT=n

Kernel 2.6.27-rc2-git2 fails to build with
CONFIG_ITCO_VENDOR_SUPPORT=n:

CC [M] drivers/watchdog/iTCO_vendor_support.o
drivers/watchdog/iTCO_vendor_support.c:247: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:249: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:255: error: 'iTCO_vendor_pre_start' undeclared here (not in a function) drivers/watchdog/iTCO_vendor_support.c:255: warning: type defaults to 'int' in declaration of 'iTCO_vendor_pre_start' drivers/watchdog/iTCO_vendor_support.c:257: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:258: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:264: error: 'iTCO_vendor_pre_stop' undeclared here (not in a function) drivers/watchdog/iTCO_vendor_support.c:264: warning: type defaults to 'int' in declaration of 'iTCO_vendor_pre_stop' drivers/watchdog/iTCO_vendor_support.c:266: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:267: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:273: error: 'iTCO_vendor_pre_keepalive' undeclared here (not in a function) drivers/watchdog/iTCO_vendor_support.c:273: warning: type defaults to 'int' in declaration of 'iTCO_vendor_pre_keepalive' drivers/watchdog/iTCO_vendor_support.c:275: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:276: error: expected identifier or '(' before '{' token drivers/watchdog/iTCO_vendor_support.c:280: error: 'iTCO_vendor_pre_set_heartbeat' undeclared here (not in a function) drivers/watchdog/iTCO_vendor_support.c:280: warning: type defaults to 'int' in declaration of 'iTCO_vendor_pre_set_heartbeat' drivers/watchdog/iTCO_vendor_support.c:282:39: error: macro "iTCO_vendor_check_noreboot_on" passed 1 arguments, but takes just 0 drivers/watchdog/iTCO_vendor_support.c:283: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token drivers/watchdog/iTCO_vendor_support.c:291: error: 'iTCO_vendor_check_noreboot_on' undeclared here (not in a function) drivers/watchdog/iTCO_vendor_support.c:291: warning: type defaults to 'int' in declaration of 'iTCO_vendor_check_noreboot_on' make[2]: *** [drivers/watchdog/iTCO_vendor_support.o] Error 1
make[1]: *** [drivers/watchdog] Error 2
make: *** [drivers] Error 2

The problem is that iTCO_vendor_support.ko is still being built while iTCO_vendor.h claims that its functions do not exist. The following Makefile update fixes that. It causes iTCO_vendor_support.ko to no longer be built if CONFIG_ITCO_VENDOR_SUPPORT=n.

Cc Wim Van Sebroeck <[email protected]>
---
 drivers/watchdog/Makefile |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/watchdog/Makefile +4 -1
@@ -66,7 +66,10 @@ obj-$(CONFIG_IB700_WDT) += ib700wdt.o
 obj-$(CONFIG_IBMASR) += ibmasr.o
 obj-$(CONFIG_WAFER_WDT) += wafer5823wdt.o
 obj-$(CONFIG_I6300ESB_WDT) += i6300esb.o
-obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o iTCO_vendor_support.o
+obj-$(CONFIG_ITCO_WDT) += iTCO_wdt.o
+ifeq ($(CONFIG_ITCO_VENDOR_SUPPORT),y)
+obj-$(CONFIG_ITCO_WDT) += iTCO_vendor_support.o
+endif
 obj-$(CONFIG_IT8712F_WDT) += it8712f_wdt.o
 obj-$(CONFIG_HP_WATCHDOG) += hpwdt.o
 obj-$(CONFIG_SC1200_WDT) += sc1200wdt.o
Signature · 1 line
Jean Delvare
#1 lore raw

Hi Jean,

Quoted 7 lines

The problem is that iTCO_vendor_support.ko is still being built while iTCO_vendor.h claims that its functions do not exist. The following Makefile update fixes that. It causes iTCO_vendor_support.ko to no longer be built if CONFIG_ITCO_VENDOR_SUPPORT=n.

Cc Wim Van Sebroeck <[email protected]>

Will be added for the next release to Linus.

For all other developers, this is what is still in the queue:
* Fix iTCO_vendor_support
* MAINTAINERS: remove ZF MACHZ WATCHDOG entry
* watchdog: delete unused driver mpc8xx_wdt.c
* ALi M7101 PMU also available on Sun Netra's too
* Add AT91SAM9/CAP9 watchdog driver
* the s3c2410 watchdog fixes that have not been merged yet (if still any).
* Add kdebug support for for hpwdt
* Add watchdog driver IT8716 IT8726 IT8712J/K
* Add Orion hardware watchdog support
* Add PNX833x WDT Support
* Add RC32434 watchdog
* Add support for the built-in RDC R-321x SoC watchdog
* Add driver for winbond w83697ug/uf watchdog feature

Kind regards,
Wim.