Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

watchdog: iTCO_wdt: Export vendorsupport

In preparation for making ->smi_res optional the iTCO_wdt driver needs
to know whether vendorsupport is being set to non-zero. For this reason
export the variable.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Mika Westerberg and committed by
Wolfram Sang
7ca6ee38 2c523b34

+11 -7
+2
drivers/watchdog/iTCO_vendor.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* iTCO Vendor Specific Support hooks */ 3 3 #ifdef CONFIG_ITCO_VENDOR_SUPPORT 4 + extern int iTCO_vendorsupport; 4 5 extern void iTCO_vendor_pre_start(struct resource *, unsigned int); 5 6 extern void iTCO_vendor_pre_stop(struct resource *); 6 7 extern int iTCO_vendor_check_noreboot_on(void); 7 8 #else 9 + #define iTCO_vendorsupport 0 8 10 #define iTCO_vendor_pre_start(acpibase, heartbeat) {} 9 11 #define iTCO_vendor_pre_stop(acpibase) {} 10 12 #define iTCO_vendor_check_noreboot_on() 1
+9 -7
drivers/watchdog/iTCO_vendor_support.c
··· 39 39 /* Broken BIOS */ 40 40 #define BROKEN_BIOS 911 41 41 42 - static int vendorsupport; 43 - module_param(vendorsupport, int, 0); 42 + int iTCO_vendorsupport; 43 + EXPORT_SYMBOL(iTCO_vendorsupport); 44 + 45 + module_param_named(vendorsupport, iTCO_vendorsupport, int, 0); 44 46 MODULE_PARM_DESC(vendorsupport, "iTCO vendor specific support mode, default=" 45 47 "0 (none), 1=SuperMicro Pent3, 911=Broken SMI BIOS"); 46 48 ··· 154 152 void iTCO_vendor_pre_start(struct resource *smires, 155 153 unsigned int heartbeat) 156 154 { 157 - switch (vendorsupport) { 155 + switch (iTCO_vendorsupport) { 158 156 case SUPERMICRO_OLD_BOARD: 159 157 supermicro_old_pre_start(smires); 160 158 break; ··· 167 165 168 166 void iTCO_vendor_pre_stop(struct resource *smires) 169 167 { 170 - switch (vendorsupport) { 168 + switch (iTCO_vendorsupport) { 171 169 case SUPERMICRO_OLD_BOARD: 172 170 supermicro_old_pre_stop(smires); 173 171 break; ··· 180 178 181 179 int iTCO_vendor_check_noreboot_on(void) 182 180 { 183 - switch (vendorsupport) { 181 + switch (iTCO_vendorsupport) { 184 182 case SUPERMICRO_OLD_BOARD: 185 183 return 0; 186 184 default: ··· 191 189 192 190 static int __init iTCO_vendor_init_module(void) 193 191 { 194 - if (vendorsupport == SUPERMICRO_NEW_BOARD) { 192 + if (iTCO_vendorsupport == SUPERMICRO_NEW_BOARD) { 195 193 pr_warn("Option vendorsupport=%d is no longer supported, " 196 194 "please use the w83627hf_wdt driver instead\n", 197 195 SUPERMICRO_NEW_BOARD); 198 196 return -EINVAL; 199 197 } 200 - pr_info("vendor-support=%d\n", vendorsupport); 198 + pr_info("vendor-support=%d\n", iTCO_vendorsupport); 201 199 return 0; 202 200 } 203 201