tegra: video: nvmap: Make nvmap_ioctl.h userspace compatible
Yogish Kulkarni [Thu, 29 Mar 2012 19:18:36 +0000 (00:18 +0530)]
nvmap_ioctl.h intended to be included by both kernel and
userspace code.

Change-Id: I8cccef5e3bc02f3271f471155b2e36126c68017a
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-on: http://git-master/r/93329
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

drivers/video/tegra/nvmap/nvmap_ioctl.h

index c802cd4..5462768 100644 (file)
 #define __VIDEO_TEGRA_NVMAP_IOCTL_H
 
 #include <linux/ioctl.h>
-#include <linux/file.h>
 
+#ifdef  __KERNEL__
+#include <linux/file.h>
 #include <mach/nvmap.h>
+#endif
 
 enum {
        NVMAP_HANDLE_PARAM_SIZE = 1,
@@ -136,6 +138,7 @@ struct nvmap_cache_op {
 
 #define NVMAP_IOC_MAXNR (_IOC_NR(NVMAP_IOC_GET_ID))
 
+#ifdef  __KERNEL__
 int nvmap_ioctl_pinop(struct file *filp, bool is_pin, void __user *arg);
 
 int nvmap_ioctl_get_param(struct file *filp, void __user* arg);
@@ -153,6 +156,7 @@ int nvmap_map_into_caller_ptr(struct file *filp, void __user *arg);
 int nvmap_ioctl_cache_maint(struct file *filp, void __user *arg);
 
 int nvmap_ioctl_rw_handle(struct file *filp, int is_read, void __user* arg);
+#endif