Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier

This is more consistent with the DMA and DRM frameworks convention. This
patch is only a name change, no logic is changed.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191216133405.1001-2-afd@ti.com

authored by

Andrew F. Davis and committed by
Sumit Semwal
b3b43465 fb6c7ab8

+5 -5
+2 -2
drivers/dma-buf/dma-heap.c
··· 107 107 } 108 108 109 109 unsigned int dma_heap_ioctl_cmds[] = { 110 - DMA_HEAP_IOC_ALLOC, 110 + DMA_HEAP_IOCTL_ALLOC, 111 111 }; 112 112 113 113 static long dma_heap_ioctl(struct file *file, unsigned int ucmd, ··· 153 153 memset(kdata + in_size, 0, ksize - in_size); 154 154 155 155 switch (kcmd) { 156 - case DMA_HEAP_IOC_ALLOC: 156 + case DMA_HEAP_IOCTL_ALLOC: 157 157 ret = dma_heap_ioctl_allocate(file, kdata); 158 158 break; 159 159 default:
+2 -2
include/uapi/linux/dma-heap.h
··· 42 42 #define DMA_HEAP_IOC_MAGIC 'H' 43 43 44 44 /** 45 - * DOC: DMA_HEAP_IOC_ALLOC - allocate memory from pool 45 + * DOC: DMA_HEAP_IOCTL_ALLOC - allocate memory from pool 46 46 * 47 47 * Takes a dma_heap_allocation_data struct and returns it with the fd field 48 48 * populated with the dmabuf handle of the allocation. 49 49 */ 50 - #define DMA_HEAP_IOC_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\ 50 + #define DMA_HEAP_IOCTL_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\ 51 51 struct dma_heap_allocation_data) 52 52 53 53 #endif /* _UAPI_LINUX_DMABUF_POOL_H */
+1 -1
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
··· 116 116 if (!dmabuf_fd) 117 117 return -EINVAL; 118 118 119 - ret = ioctl(fd, DMA_HEAP_IOC_ALLOC, &data); 119 + ret = ioctl(fd, DMA_HEAP_IOCTL_ALLOC, &data); 120 120 if (ret < 0) 121 121 return ret; 122 122 *dmabuf_fd = (int)data.fd;