Commit 7ef5f82b authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm: Rewrite drm_ioctl_flags() to resemble the new drm_ioctl() code

Use the same logic when checking for valid ioctl range in
drm_ioctl_flags() that is used in drm_ioctl() to avoid
confusion.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 53615af7
......@@ -766,12 +766,13 @@ EXPORT_SYMBOL(drm_ioctl);
*/
bool drm_ioctl_flags(unsigned int nr, unsigned int *flags)
{
if ((nr >= DRM_COMMAND_END && nr < DRM_CORE_IOCTL_COUNT) ||
(nr < DRM_COMMAND_BASE)) {
*flags = drm_ioctls[nr].flags;
return true;
}
if (nr >= DRM_COMMAND_BASE && nr < DRM_COMMAND_END)
return false;
if (nr >= DRM_CORE_IOCTL_COUNT)
return false;
return false;
*flags = drm_ioctls[nr].flags;
return true;
}
EXPORT_SYMBOL(drm_ioctl_flags);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment