]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: rewrite kfd_ioctl() according to drm_ioctl()
authorOded Gabbay <oded.gabbay@amd.com>
Mon, 29 Dec 2014 12:20:05 +0000 (14:20 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Tue, 6 Jan 2015 17:44:36 +0000 (19:44 +0200)
commite6bc072a9d4745c23ee36ebecc923e7a8bfbb459
tree1ba6313aa81b5c69ed5591e0cb8598c2fd69434b
parent16a29a680696e87d1b7a5db92865b9dded7e93cc
drm/amdkfd: rewrite kfd_ioctl() according to drm_ioctl()

This patch changes kfd_ioctl() to be very similar to drm_ioctl().

The patch defines an array of amdkfd_ioctls, which maps IOCTL definition to the
ioctl function.

The kfd_ioctl() uses that mapping to call the appropriate ioctl function,
through a function pointer.

This patch also declares a new typedef for the ioctl function pointer.

v2: Renamed KFD_COMMAND_(START|END) to AMDKFD_...

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h