[PATCH 1/2] drm: Untangle __KERNEL__ guards

Emil Velikov emil.l.velikov at gmail.com
Wed Mar 30 15:56:17 UTC 2016


On 30 March 2016 at 15:42, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> make headers_install can't handle fancy conditions, so let's simplify
> things for it a bit.
>
> Cc: Emil Velikov <emil.l.velikov at gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  include/uapi/drm/drm.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index c7ecc3abff03..3b56285a7e2a 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -36,7 +36,13 @@
>  #ifndef _DRM_H_
>  #define _DRM_H_
>
> -#if defined(__KERNEL__) || defined(__linux__)
> +#if defined(__KERNEL__)
> +
> +#include <linux/types.h>
> +#include <asm/ioctl.h>
> +typedef unsigned int drm_handle_t;
> +
> +#elif defined(__linux__)
>
Bit dubious how that used to work, and that the program fails with the
original, yet handled "elif defined..." correctly.

Regardless,
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>

-Emil


More information about the dri-devel mailing list