Skip to content

Commit cb58c27

Browse files
committed
platform/x86: dell-wmi-sysman/think-lmi: Make fw_attr_class global static
The dell-wmi-sysman and think-lmi kernel modules both have a global struct class *fw_attr_class variable, leading to the following compile errors when both are builtin: ld: drivers/platform/x86/think-lmi.o:(.bss+0x0): multiple definition of `fw_attr_class'; drivers/platform/x86/dell/dell-wmi-sysman/sysman.o:(.bss+0x0): first defined here In both cases the variable is only used in the file where it is declared. Make both declarations static to avoid the linker error. Cc: Mark Pearson <[email protected]> Cc: [email protected] Reported-by: Nathan Chancellor <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 8f44f31 commit cb58c27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct wmi_sysman_priv wmi_priv = {
2525
/* reset bios to defaults */
2626
static const char * const reset_types[] = {"builtinsafe", "lastknowngood", "factory", "custom"};
2727
static int reset_option = -1;
28-
struct class *fw_attr_class;
28+
static struct class *fw_attr_class;
2929

3030

3131
/**

drivers/platform/x86/think-lmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static const char * const encoding_options[] = {
134134
[TLMI_ENCODING_SCANCODE] = "scancode",
135135
};
136136
static struct think_lmi tlmi_priv;
137-
struct class *fw_attr_class;
137+
static struct class *fw_attr_class;
138138

139139
/* ------ Utility functions ------------*/
140140
/* Convert BIOS WMI error string to suitable error code */

0 commit comments

Comments
 (0)