From: Dave Airlie Date: Fri, 20 Jun 2008 05:35:47 +0000 (+1000) Subject: drm: only use kernel ioctl cmd when doing a core ioctl. X-Git-Tag: submit/1.0/20121108.012404~810 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1915de2c56d71bbd04a7c085cbd35fbe8e33af9d;p=profile%2Fivi%2Flibdrm.git drm: only use kernel ioctl cmd when doing a core ioctl. Need to overhaul the mess that is driver ioctls --- diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index b375fa1..6ac2adf 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -613,9 +613,10 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) if ((nr >= DRM_COMMAND_BASE) && (nr < DRM_COMMAND_END) && (nr < DRM_COMMAND_BASE + dev->driver->num_ioctls)) ioctl = &dev->driver->ioctls[nr - DRM_COMMAND_BASE]; - else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) + else if ((nr >= DRM_COMMAND_END) || (nr < DRM_COMMAND_BASE)) { ioctl = &drm_ioctls[nr]; - else { + cmd = ioctl->cmd; + } else { retcode = -EINVAL; goto err_i1; } @@ -631,7 +632,6 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) goto err_i1; } #endif - cmd = ioctl->cmd; func = ioctl->func; /* is there a local override? */