rk: ion: fix compilation error without CONFIG_COMPAT
authorHuang, Tao <huangtao@rock-chips.com>
Tue, 10 Feb 2015 08:48:02 +0000 (16:48 +0800)
committerCMY <cmy@rock-chips.com>
Wed, 4 Mar 2015 02:39:18 +0000 (10:39 +0800)
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
(cherry picked from commit 52315d4d540dd3ef6db618b6856ceee0b5af8d98)

Signed-off-by: CMY <cmy@rock-chips.com>
drivers/staging/android/ion/rockchip/rockchip_ion.c

index b067c4f7a394d54c38b28d43a0b2a73629ec7dca..f75dc757f9b3d83e28af8a876a759fda25a84f54 100755 (executable)
@@ -117,6 +117,7 @@ struct ion_client *rockchip_ion_client_create(const char *name)
 }
 EXPORT_SYMBOL(rockchip_ion_client_create);
 
+#ifdef CONFIG_COMPAT
 struct compat_ion_phys_data {
        compat_int_t handle;
        compat_ulong_t phys;
@@ -161,6 +162,7 @@ static int compat_put_ion_phys_data(
 
        return err;
 };
+#endif
 
 static int rockchip_ion_get_phys(struct ion_client *client, unsigned long arg)
 {
@@ -196,6 +198,7 @@ static long rockchip_custom_ioctl (struct ion_client *client, unsigned int cmd,
        pr_debug("%s(%d): cmd=%x\n", __func__, __LINE__, cmd);
 
        if (is_compat_task()) {
+#ifdef CONFIG_COMPAT
                switch (cmd) {
                case COMPAT_ION_IOC_GET_PHYS: {
                        struct compat_ion_phys_data __user *data32;
@@ -220,6 +223,7 @@ static long rockchip_custom_ioctl (struct ion_client *client, unsigned int cmd,
                default:
                        return -ENOTTY;
                }
+#endif
        } else {
                switch (cmd) {
                case ION_IOC_GET_PHYS: