From b7172119714781d15128cd1ae029bd028b0bf37a Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Wed, 10 Feb 2016 14:17:41 +0100 Subject: [PATCH] apple-gmux: Fix build breakage if !CONFIG_ACPI The DRM drivers i915, nouveau and radeon may be compiled with CONFIG_ACPI not set, in which case acpi_dev_present() is undefined. Add a no-op stub for apple_gmux_present() which is used if CONFIG_APPLE_GMUX is not enabled to avoid build breakage. (CONFIG_APPLE_GMUX depends on CONFIG_ACPI.) Reported-by: Stephen Rothwell Signed-off-by: Lukas Wunner Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160210131741.GA15492@wunner.de --- include/linux/apple-gmux.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/linux/apple-gmux.h b/include/linux/apple-gmux.h index feebc2840462..b2d32e01dfe4 100644 --- a/include/linux/apple-gmux.h +++ b/include/linux/apple-gmux.h @@ -22,6 +22,8 @@ #define GMUX_ACPI_HID "APP000B" +#if IS_ENABLED(CONFIG_APPLE_GMUX) + /** * apple_gmux_present() - detect if gmux is built into the machine * @@ -33,7 +35,16 @@ */ static inline bool apple_gmux_present(void) { - return IS_ENABLED(CONFIG_APPLE_GMUX) && acpi_dev_present(GMUX_ACPI_HID); + return acpi_dev_present(GMUX_ACPI_HID); } +#else /* !CONFIG_APPLE_GMUX */ + +static inline bool apple_gmux_present(void) +{ + return false; +} + +#endif /* !CONFIG_APPLE_GMUX */ + #endif /* LINUX_APPLE_GMUX_H */ -- 2.39.5