Skip to content

Commit b3b4346

Browse files
glneosumitsemwal
authored andcommitted
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
1 parent fb6c7ab commit b3b4346

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎drivers/dma-buf/dma-heap.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ static long dma_heap_ioctl_allocate(struct file *file, void *data)
107107
}
108108

109109
unsigned int dma_heap_ioctl_cmds[] = {
110-
DMA_HEAP_IOC_ALLOC,
110+
DMA_HEAP_IOCTL_ALLOC,
111111
};
112112

113113
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,
153153
memset(kdata + in_size, 0, ksize - in_size);
154154

155155
switch (kcmd) {
156-
case DMA_HEAP_IOC_ALLOC:
156+
case DMA_HEAP_IOCTL_ALLOC:
157157
ret = dma_heap_ioctl_allocate(file, kdata);
158158
break;
159159
default:

‎include/uapi/linux/dma-heap.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ struct dma_heap_allocation_data {
4242
#define DMA_HEAP_IOC_MAGIC 'H'
4343

4444
/**
45-
* DOC: DMA_HEAP_IOC_ALLOC - allocate memory from pool
45+
* DOC: DMA_HEAP_IOCTL_ALLOC - allocate memory from pool
4646
*
4747
* Takes a dma_heap_allocation_data struct and returns it with the fd field
4848
* populated with the dmabuf handle of the allocation.
4949
*/
50-
#define DMA_HEAP_IOC_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
50+
#define DMA_HEAP_IOCTL_ALLOC _IOWR(DMA_HEAP_IOC_MAGIC, 0x0,\
5151
struct dma_heap_allocation_data)
5252

5353
#endif /* _UAPI_LINUX_DMABUF_POOL_H */

‎tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static int dmabuf_heap_alloc_fdflags(int fd, size_t len, unsigned int fd_flags,
116116
if (!dmabuf_fd)
117117
return -EINVAL;
118118

119-
ret = ioctl(fd, DMA_HEAP_IOC_ALLOC, &data);
119+
ret = ioctl(fd, DMA_HEAP_IOCTL_ALLOC, &data);
120120
if (ret < 0)
121121
return ret;
122122
*dmabuf_fd = (int)data.fd;

0 commit comments

Comments
 (0)