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)
commit76baee6c733bfef30fcf86cbd121e336b839e408
tree1ba6313aa81b5c69ed5591e0cb8598c2fd69434b
parentb81c55db1053805866a242cd0bfbfb0c60c499b3
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