]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: dell-wmi-sysman/think-lmi: Make fw_attr_class global static
authorHans de Goede <hdegoede@redhat.com>
Wed, 9 Jun 2021 14:59:52 +0000 (16:59 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 16 Jun 2021 15:47:55 +0000 (17:47 +0200)
commitf23fc435d5c641db1793b1d8a6e6635e92a92eca
treeb5db9414e2edf290051a23d8f4bba1e7387c13a5
parentd09e0b9abffe01817867bd720ee179af76c721f5
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: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210609145952.113393-1-hdegoede@redhat.com
drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
drivers/platform/x86/think-lmi.c