From b451ef3baf7139862fb8cf83ea9c772732bce08b Mon Sep 17 00:00:00 2001 From: Yash Bhatt Date: Fri, 5 Apr 2024 03:44:35 +0000 Subject: [PATCH] video: tegra: nvmap: Deprecate dma_dev_from_handle Deprecate dma_dev_from_handle from nvmap as it has no caller. Bug 4479027 Change-Id: Id3b3e400a686e61366929d63ce6a2ef76c251edb Signed-off-by: Yash Bhatt Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3109957 Reviewed-by: Pritesh Raithatha Reviewed-by: Ketan Patil GVS: Gerrit_Virtual_Submit Reviewed-by: Ashish Mhetre Reviewed-by: Sachin Nikam --- drivers/video/tegra/nvmap/nvmap_heap.c | 16 ---------------- drivers/video/tegra/nvmap/nvmap_priv.h | 1 - 2 files changed, 17 deletions(-) diff --git a/drivers/video/tegra/nvmap/nvmap_heap.c b/drivers/video/tegra/nvmap/nvmap_heap.c index b000f321..f1aa252f 100644 --- a/drivers/video/tegra/nvmap/nvmap_heap.c +++ b/drivers/video/tegra/nvmap/nvmap_heap.c @@ -40,22 +40,6 @@ static struct kmem_cache *heap_block_cache; -struct device *dma_dev_from_handle(unsigned long type) -{ - int i; - struct nvmap_carveout_node *co_heap; - - for (i = 0; i < nvmap_dev->nr_carveouts; i++) { - co_heap = &nvmap_dev->heaps[i]; - - if (!(co_heap->heap_bit & type)) - continue; - - return co_heap->carveout->dma_dev; - } - return ERR_PTR(-ENODEV); -} - int nvmap_query_heap_peer(struct nvmap_heap *heap, unsigned int *peer) { if (!heap || !heap->is_ivm) diff --git a/drivers/video/tegra/nvmap/nvmap_priv.h b/drivers/video/tegra/nvmap/nvmap_priv.h index 239cc4d5..131e2aef 100644 --- a/drivers/video/tegra/nvmap/nvmap_priv.h +++ b/drivers/video/tegra/nvmap/nvmap_priv.h @@ -461,7 +461,6 @@ int nvmap_create_carveout(const struct nvmap_platform_carveout *co); int nvmap_co_setup(struct reserved_mem *rmem, u32 granule_size); -struct device *dma_dev_from_handle(unsigned long type); struct nvmap_heap_block *nvmap_carveout_alloc(struct nvmap_client *dev, struct nvmap_handle *handle, unsigned long type,