compat: Define include guard for vga_switcheroo.h
Subsystems (3)
PATCH 1/1 compat: Define include guard for vga_switcheroo.h
The check is missing in upstream. Patch sent but until this gets merged, define it in compat tree for fixing compat-drm builds.
Also add a temporary header with the same name which will be used to check whether the header should be included or not.
Signed-off-by Ozan Çağlayan <[email protected]>
---
You can actually ignore this if you think that this should not be fixed this way.
include/linux/compat-3.5.h | 6 ++++++ include/linux/vga_switcheroo.h | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 include/linux/vga_switcheroo.h
include/linux/compat-3.5.h +6 -0
@@ -78,6 +78,12 @@ static inline int fault_in_multipages_readable(const char __user *uaddr,/* switcheroo is available on >= 2.6.34 */ #if (LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,34 ))#include <linux/vga_switcheroo.h> + +/* FIXME: The include guard is sent upstream, drop this +* once the guard is merged. */ +#ifndef LINUX_VGA_SWITCHEROO_H +#define LINUX_VGA_SWITCHEROO_H +#endif /* * This backports: *
include/linux/vga_switcheroo.h new file +7 -0
@@ -0,0 +1,7 @@ +/* Hack for fixing the missing include guard in upstream +* header. We will drop this when the patch is merged upstream. */ + +#ifndef LINUX_VGA_SWITCHEROO_H +#define LINUX_VGA_SWITCHEROO_H +#include_next <linux/vga_switcheroo.h> +#endif
Signature · 1 line
1.7.10.2