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 <sfr@canb.auug.org.au>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160210131741.GA15492@wunner.de
#define GMUX_ACPI_HID "APP000B"
+#if IS_ENABLED(CONFIG_APPLE_GMUX)
+
/**
* apple_gmux_present() - detect if gmux is built into the machine
*
*/
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 */