drm.h: Fix DRM compilation with bare-metal toolchain
authorNishanth Menon <nm@ti.com>
Mon, 15 Apr 2013 22:35:35 +0000 (17:35 -0500)
committerPraneeth Bajjuri <praneeth@ti.com>
Tue, 16 Apr 2013 20:46:45 +0000 (15:46 -0500)
commitb118f71c17a4bfc9fdb4705ae0a479c16f1f34ad
tree89a6de299d9eb89c0d761746fd0277b5e09975b9
parent0a5df099c3c5884f46d4e0613982b58e8445495b
drm.h: Fix DRM compilation with bare-metal toolchain

From: Paul Sokolovsky <paul.sokolovsky@linaro.org>

An ifdef in drm.h expects to be compiled with full-fledged Linux
toolchain, but it's common to compile kernel with just bare-metal
toolchain which doesn't define __linux__. So, also add __KERNEL__
check.

This fixes below error with arm-eabi-4.6

In file included from include/drm/drmP.h:75:0,
 from drivers/gpu/drm/drm_auth.c:36:
include/uapi/drm/drm.h:47:24: fatal error:
sys/ioccom.h: No such file or directory compilation terminated

[nm@ti.com: port forward to 3.9-rc6 and post to dri devel for feedback as RFC]
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
include/uapi/drm/drm.h