From e39286eb5eab8846a228863abf8f1b8b07a9e29d Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 19 Jul 2007 17:00:17 -0700 Subject: Remove DRM_ERR OS macro. This was used to make all ioctl handlers return -errno on linux and errno on *BSD. Instead, just return -errno in shared code, and flip sign on return from shared code to *BSD code. --- linux-core/via_mm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux-core/via_mm.c') diff --git a/linux-core/via_mm.c b/linux-core/via_mm.c index 1ac51050..7cb8651d 100644 --- a/linux-core/via_mm.c +++ b/linux-core/via_mm.c @@ -138,7 +138,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS) if (mem.type > VIA_MEM_AGP) { DRM_ERROR("Unknown memory type allocation\n"); - return DRM_ERR(EINVAL); + return -EINVAL; } mutex_lock(&dev->struct_mutex); if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : @@ -146,7 +146,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS) DRM_ERROR ("Attempt to allocate from uninitialized memory manager.\n"); mutex_unlock(&dev->struct_mutex); - return DRM_ERR(EINVAL); + return -EINVAL; } tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT; @@ -164,7 +164,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS) mem.size = 0; mem.index = 0; DRM_DEBUG("Video memory allocation failed\n"); - retval = DRM_ERR(ENOMEM); + retval = -ENOMEM; } DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem)); -- cgit v1.2.3