From: CMY Date: Mon, 24 Feb 2014 09:51:23 +0000 (+0800) Subject: rk: ion: fixed bug for ION_IOC_GET_PHYS X-Git-Tag: firefly_0821_release~6296 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c78b636f1087edb58b93b445b9d510ac2baff192;p=firefly-linux-kernel-4.4.55.git rk: ion: fixed bug for ION_IOC_GET_PHYS --- diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 468146dc87fb..534bed607802 100755 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -388,7 +388,7 @@ static void ion_handle_get(struct ion_handle *handle) kref_get(&handle->ref); } -static int ion_handle_put(struct ion_handle *handle) +int ion_handle_put(struct ion_handle *handle) { struct ion_client *client = handle->client; int ret; diff --git a/drivers/staging/android/ion/rockchip/rockchip_ion.c b/drivers/staging/android/ion/rockchip/rockchip_ion.c index a91dfe6911cd..553134b83a9c 100755 --- a/drivers/staging/android/ion/rockchip/rockchip_ion.c +++ b/drivers/staging/android/ion/rockchip/rockchip_ion.c @@ -39,6 +39,7 @@ struct ion_heap_desc { extern struct ion_handle *ion_handle_get_by_id(struct ion_client *client, int id); +extern int ion_handle_put(struct ion_handle *handle); static struct ion_heap_desc ion_heap_meta[] = { { @@ -186,6 +187,7 @@ static long rockchip_custom_ioctl (struct ion_client *client, unsigned int cmd, ret = ion_phys(client, handle, &data.phys, (size_t *)&data.size); pr_info("ret=%d, phys=0x%X\n", ret, data.phys); + ion_handle_put(handle); if(ret < 0) return ret; if (copy_to_user((void __user *)arg, &data, sizeof(struct ion_phys_data)))