mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 12:35:52 +02:00
media: ipu6: Drop unused ipu6_dma_get_sgtable()
ipu6_dma_get_sgtable() is now unused. Drop it. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Reviewed-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
This commit is contained in:
parent
109bc8fb23
commit
d89ad44197
|
|
@ -457,36 +457,3 @@ void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,
|
|||
ipu6_dma_unmap_sg(sys, sgt->sgl, sgt->nents, dir, attrs);
|
||||
}
|
||||
EXPORT_SYMBOL_NS_GPL(ipu6_dma_unmap_sgtable, "INTEL_IPU6");
|
||||
|
||||
/*
|
||||
* Create scatter-list for the already allocated DMA buffer
|
||||
*/
|
||||
int ipu6_dma_get_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,
|
||||
void *cpu_addr, dma_addr_t handle, size_t size,
|
||||
unsigned long attrs)
|
||||
{
|
||||
struct device *dev = &sys->auxdev.dev;
|
||||
struct ipu6_mmu *mmu = sys->mmu;
|
||||
struct vm_info *info;
|
||||
int n_pages;
|
||||
int ret = 0;
|
||||
|
||||
info = get_vm_info(mmu, handle);
|
||||
if (!info)
|
||||
return -EFAULT;
|
||||
|
||||
if (!info->vaddr)
|
||||
return -EFAULT;
|
||||
|
||||
if (WARN_ON(!info->pages))
|
||||
return -ENOMEM;
|
||||
|
||||
n_pages = PFN_UP(size);
|
||||
|
||||
ret = sg_alloc_table_from_pages(sgt, info->pages, n_pages, 0, size,
|
||||
GFP_KERNEL);
|
||||
if (ret)
|
||||
dev_warn(dev, "get sgt table failed\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,4 @@ int ipu6_dma_map_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,
|
|||
enum dma_data_direction dir, unsigned long attrs);
|
||||
void ipu6_dma_unmap_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,
|
||||
enum dma_data_direction dir, unsigned long attrs);
|
||||
int ipu6_dma_get_sgtable(struct ipu6_bus_device *sys, struct sg_table *sgt,
|
||||
void *cpu_addr, dma_addr_t handle, size_t size,
|
||||
unsigned long attrs);
|
||||
#endif /* IPU6_DMA_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user