OSDN Git Service

platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error
authorRandy Dunlap <rdunlap@infradead.org>
Sat, 18 Sep 2021 04:48:29 +0000 (21:48 -0700)
committerHans de Goede <hdegoede@redhat.com>
Tue, 21 Sep 2021 12:52:09 +0000 (14:52 +0200)
commitd24236cb7cf2319d47fac2bed458b6d4eae76b24
treed84b92c8894fcac0b06ca7180c5fd4a10d1c29c1
parent8f84a3973c6a2b714b7a494a3568ef8866f81058
platform/x86: dell: fix DELL_WMI_PRIVACY dependencies & build error

When DELL_WMI=y, DELL_WMI_PRIVACY=y, and LEDS_TRIGGER_AUDIO=m, there
is a linker error since the LEDS trigger code is built as a loadable
module. This happens because DELL_WMI_PRIVACY is a bool that depends
on a tristate (LEDS_TRIGGER_AUDIO=m), which can be dangerous.

ld: drivers/platform/x86/dell/dell-wmi-privacy.o: in function `dell_privacy_wmi_probe':
dell-wmi-privacy.c:(.text+0x3df): undefined reference to `ledtrig_audio_get'

Fixes: 8af9fa37b8a3 ("platform/x86: dell-privacy: Add support for Dell hardware privacy")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Perry Yuan <Perry.Yuan@dell.com>
Cc: Dell.Client.Kernel@dell.com
Cc: platform-driver-x86@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Mark Gross <mgross@linux.intel.com>
Link: https://lore.kernel.org/r/20210918044829.19222-1-rdunlap@infradead.org
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/dell/Kconfig