/* Called whenever a 32-bit process running under a 64-bit kernel performs an ioctl on /dev/drm. */
long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
/* Called whenever a 32-bit process running under a 64-bit kernel performs an ioctl on /dev/drm. */
long drm_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
	unsigned int nr = DRM_IOCTL_NR(cmd);
	drm_ioctl_compat_t *fn;
	int ret;
	if (nr >= ARRAY_SIZE(drm_compat_ioctls))
		return drm_ioctl(filp, cmd, arg);
	fn = drm_compat_ioctls[nr];
	if (fn != NULL)
		ret = (*fn) (filp, cmd, arg);
	else
		ret = drm_ioctl(filp, cmd, arg);
	return ret;
}