From de3570a39b6f53a9ab9da0b139cf786aa8ab598f Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Thu, 26 Nov 2015 09:41:32 +0800 Subject: [PATCH] staging: ion: rockchip: remove unused feature Remove codes related to: - DRM - secure - psci They are only required by part of platforms. Change-Id: Ie03d2637971cdd9fad87b3a5b473566ebc94ac80 Signed-off-by: Jianqun Xu --- .../android/ion/rockchip/rockchip_ion.c | 26 ------------------- include/linux/rockchip_ion.h | 5 ---- 2 files changed, 31 deletions(-) mode change 100755 => 100644 drivers/staging/android/ion/rockchip/rockchip_ion.c diff --git a/drivers/staging/android/ion/rockchip/rockchip_ion.c b/drivers/staging/android/ion/rockchip/rockchip_ion.c old mode 100755 new mode 100644 index 73caf0059235..7df4d05e635e --- a/drivers/staging/android/ion/rockchip/rockchip_ion.c +++ b/drivers/staging/android/ion/rockchip/rockchip_ion.c @@ -32,7 +32,6 @@ #endif #include -#include struct ion_device *rockchip_ion_dev; EXPORT_SYMBOL(rockchip_ion_dev); @@ -51,9 +50,7 @@ extern struct ion_handle *ion_handle_get_by_id(struct ion_client *client, extern int ion_handle_put(struct ion_handle *handle); #define ION_CMA_HEAP_NAME "cma" -#define ION_IOMMU_HEAP_NAME "iommu" #define ION_VMALLOC_HEAP_NAME "vmalloc" -#define ION_DRM_HEAP_NAME "drm" #define ION_CARVEOUT_HEAP_NAME "carveout" #define MAX_ION_HEAP 10 @@ -75,11 +72,6 @@ static struct ion_heap_desc ion_heap_meta[] = { .type = ION_HEAP_TYPE_DMA, .name = ION_CMA_HEAP_NAME, }, - { - .id = ION_DRM_HEAP_ID, - .type = ION_HEAP_TYPE_DRM, - .name = ION_DRM_HEAP_NAME, - }, { .id = ION_CARVEOUT_HEAP_ID, .type = ION_HEAP_TYPE_CARVEOUT, @@ -118,22 +110,6 @@ struct ion_client *rockchip_ion_client_create(const char *name) } EXPORT_SYMBOL(rockchip_ion_client_create); -static int rockchip_ion_set_secured(struct ion_client *client, - unsigned long arg) -{ - bool val = 0; - int ret = 0; - - if (copy_from_user(&val, (void __user *)arg, sizeof(bool))) - return -EFAULT; - - ret = psci_set_memory_secure(val); - if (ret) - pr_err("%s fail to set memory secured (%d)\n", __func__, ret); - - return ret; -} - #ifdef CONFIG_COMPAT struct compat_ion_phys_data { compat_int_t handle; @@ -244,8 +220,6 @@ static long rockchip_custom_ioctl (struct ion_client *client, unsigned int cmd, switch (cmd) { case ION_IOC_GET_PHYS: return rockchip_ion_get_phys(client, arg); - case ION_IOC_SET_SECURED: - return rockchip_ion_set_secured(client, arg); default: return -ENOTTY; } diff --git a/include/linux/rockchip_ion.h b/include/linux/rockchip_ion.h index f62e728557d1..2961bae292ff 100644 --- a/include/linux/rockchip_ion.h +++ b/include/linux/rockchip_ion.h @@ -31,7 +31,6 @@ enum ion_heap_ids { ION_VMALLOC_HEAP_ID = 0, ION_CARVEOUT_HEAP_ID = 2, ION_CMA_HEAP_ID = 4, - ION_DRM_HEAP_ID = 5, }; #define ION_HEAP(bit) (1 << (bit)) @@ -49,8 +48,4 @@ struct ion_phys_data { */ #define ION_IOC_GET_PHYS _IOWR(ION_IOC_ROCKCHIP_MAGIC, 0, \ struct ion_phys_data) -/** - * Set memory region secured. - */ -#define ION_IOC_SET_SECURED _IOWR(ION_IOC_ROCKCHIP_MAGIC, 1, bool) #endif -- 2.34.1