Commit cb58c277 authored by Hans de Goede's avatar Hans de Goede

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 <markpearson@lenovo.com>
Cc: Dell.Client.Kernel@dell.com
Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210609145952.113393-1-hdegoede@redhat.com
parent 8f44f316
...@@ -25,7 +25,7 @@ struct wmi_sysman_priv wmi_priv = { ...@@ -25,7 +25,7 @@ struct wmi_sysman_priv wmi_priv = {
/* reset bios to defaults */ /* reset bios to defaults */
static const char * const reset_types[] = {"builtinsafe", "lastknowngood", "factory", "custom"}; static const char * const reset_types[] = {"builtinsafe", "lastknowngood", "factory", "custom"};
static int reset_option = -1; static int reset_option = -1;
struct class *fw_attr_class; static struct class *fw_attr_class;
/** /**
......
...@@ -134,7 +134,7 @@ static const char * const encoding_options[] = { ...@@ -134,7 +134,7 @@ static const char * const encoding_options[] = {
[TLMI_ENCODING_SCANCODE] = "scancode", [TLMI_ENCODING_SCANCODE] = "scancode",
}; };
static struct think_lmi tlmi_priv; static struct think_lmi tlmi_priv;
struct class *fw_attr_class; static struct class *fw_attr_class;
/* ------ Utility functions ------------*/ /* ------ Utility functions ------------*/
/* Convert BIOS WMI error string to suitable error code */ /* Convert BIOS WMI error string to suitable error code */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment