Skip to content

Commit b717211

Browse files
l1kdanvet
authored andcommitted
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 <[email protected]> Signed-off-by: Lukas Wunner <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3c5b267 commit b717211

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

include/linux/apple-gmux.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#define GMUX_ACPI_HID "APP000B"
2424

25+
#if IS_ENABLED(CONFIG_APPLE_GMUX)
26+
2527
/**
2628
* apple_gmux_present() - detect if gmux is built into the machine
2729
*
@@ -33,7 +35,16 @@
3335
*/
3436
static inline bool apple_gmux_present(void)
3537
{
36-
return IS_ENABLED(CONFIG_APPLE_GMUX) && acpi_dev_present(GMUX_ACPI_HID);
38+
return acpi_dev_present(GMUX_ACPI_HID);
3739
}
3840

41+
#else /* !CONFIG_APPLE_GMUX */
42+
43+
static inline bool apple_gmux_present(void)
44+
{
45+
return false;
46+
}
47+
48+
#endif /* !CONFIG_APPLE_GMUX */
49+
3950
#endif /* LINUX_APPLE_GMUX_H */

0 commit comments

Comments
 (0)