summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_mm.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-25 11:22:43 +0200
committerDave Airlie <airlied@optimus.(none)>2007-10-15 02:38:19 +0200
commit20caafa6ecb2487d9b223aa33e7cc704f912a758 (patch)
tree7df033fdee81305dad0a67ceba79f51ead7c1b8b /drivers/char/drm/via_mm.c
parentFix compile while compiling drivers/mmc/host/mmc_spi.o with !BLOCK (diff)
downloadlinux-20caafa6ecb2487d9b223aa33e7cc704f912a758.tar.xz
linux-20caafa6ecb2487d9b223aa33e7cc704f912a758.zip
drm: 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 f shared code to *BSD code. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r--drivers/char/drm/via_mm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c
index 85d56acd9d82..36f2547254f9 100644
--- a/drivers/char/drm/via_mm.c
+++ b/drivers/char/drm/via_mm.c
@@ -136,7 +136,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 :
@@ -144,7 +144,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;
@@ -162,7 +162,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));