dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier
authorAndrew F. Davis <afd@ti.com>
Mon, 16 Dec 2019 13:34:04 +0000 (08:34 -0500)
committerSumit Semwal <sumit.semwal@linaro.org>
Tue, 17 Dec 2019 16:07:40 +0000 (21:37 +0530)
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
drivers/dma-buf/dma-heap.c
include/uapi/linux/dma-heap.h
tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c

index 4f04d104ae61451cf8a6cc07888a071b2bfb5e77..a2472149611496657364d8160e4424bfc40c215e 100644 (file)
@@ -107,7 +107,7 @@ static long dma_heap_ioctl_allocate(struct file *file, void *data)
 }
 
 unsigned int dma_heap_ioctl_cmds[] = {
-       DMA_HEAP_IOC_ALLOC,
+       DMA_HEAP_IOCTL_ALLOC,
 };
 
 static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
@@ -153,7 +153,7 @@ static long dma_heap_ioctl(struct file *file, unsigned int ucmd,
                memset(kdata + in_size, 0, ksize - in_size);
 
        switch (kcmd) {
-       case DMA_HEAP_IOC_ALLOC:
+       case DMA_HEAP_IOCTL_ALLOC:
                ret = dma_heap_ioctl_allocate(file, kdata);
                break;
        default:
index 73e7f66c1cae11545d809ed78ae1d4b263fcd5a9..6f84fa08e074a3b8bdd9c627e4d43427e530212b 100644 (file)
@@ -42,12 +42,12 @@ struct dma_heap_allocation_data {
 #define DMA_HEAP_IOC_MAGIC             'H'
 
 /**
- * DOC: DMA_HEAP_IOC_ALLOC - allocate memory from pool
+ * DOC: DMA_HEAP_IOCTL_ALLOC - allocate memory from pool
  *
  * Takes a dma_heap_allocation_data struct and returns it with the fd field
  * populated with the dmabuf handle of the allocation.
  */
-#define DMA_HEAP_IOC_ALLOC     _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
+#define DMA_HEAP_IOCTL_ALLOC   _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
                                      struct dma_heap_allocation_data)
 
 #endif /* _UAPI_LINUX_DMABUF_POOL_H */
index 3e53ad331bdce2c9b8aab680016644f79d1991e1..cd5e1f602ac9db1421d2b79adc2597ec20d8abca 100644 (file)
@@ -116,7 +116,7 @@ static int dmabuf_heap_alloc_fdflags(int fd, size_t len, unsigned int fd_flags,
        if (!dmabuf_fd)
                return -EINVAL;
 
-       ret = ioctl(fd, DMA_HEAP_IOC_ALLOC, &data);
+       ret = ioctl(fd, DMA_HEAP_IOCTL_ALLOC, &data);
        if (ret < 0)
                return ret;
        *dmabuf_fd = (int)data.fd;