diff options
author | Eric Anholt <eric@anholt.net> | 2007-08-25 05:22:43 -0400 |
---|---|---|
committer | Dave Airlie <airlied@optimus.(none)> | 2007-10-14 20:38:19 -0400 |
commit | 20caafa6ecb2487d9b223aa33e7cc704f912a758 (patch) | |
tree | 7df033fdee81305dad0a67ceba79f51ead7c1b8b /drivers/char/drm/via_mm.c | |
parent | 23fd50450a34f2558070ceabb0bfebc1c9604af5 (diff) |
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.c | 6 |
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) | |||
136 | 136 | ||
137 | if (mem.type > VIA_MEM_AGP) { | 137 | if (mem.type > VIA_MEM_AGP) { |
138 | DRM_ERROR("Unknown memory type allocation\n"); | 138 | DRM_ERROR("Unknown memory type allocation\n"); |
139 | return DRM_ERR(EINVAL); | 139 | return -EINVAL; |
140 | } | 140 | } |
141 | mutex_lock(&dev->struct_mutex); | 141 | mutex_lock(&dev->struct_mutex); |
142 | if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : | 142 | if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : |
@@ -144,7 +144,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS) | |||
144 | DRM_ERROR | 144 | DRM_ERROR |
145 | ("Attempt to allocate from uninitialized memory manager.\n"); | 145 | ("Attempt to allocate from uninitialized memory manager.\n"); |
146 | mutex_unlock(&dev->struct_mutex); | 146 | mutex_unlock(&dev->struct_mutex); |
147 | return DRM_ERR(EINVAL); | 147 | return -EINVAL; |
148 | } | 148 | } |
149 | 149 | ||
150 | tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT; | 150 | tmpSize = (mem.size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT; |
@@ -162,7 +162,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS) | |||
162 | mem.size = 0; | 162 | mem.size = 0; |
163 | mem.index = 0; | 163 | mem.index = 0; |
164 | DRM_DEBUG("Video memory allocation failed\n"); | 164 | DRM_DEBUG("Video memory allocation failed\n"); |
165 | retval = DRM_ERR(ENOMEM); | 165 | retval = -ENOMEM; |
166 | } | 166 | } |
167 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem)); | 167 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, sizeof(mem)); |
168 | 168 | ||