diff options
Diffstat (limited to 'drivers/char/drm/via_mm.c')
-rw-r--r-- | drivers/char/drm/via_mm.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c index 3baddacdff26..33e0cb12e4c3 100644 --- a/drivers/char/drm/via_mm.c +++ b/drivers/char/drm/via_mm.c | |||
@@ -42,7 +42,7 @@ static int via_agp_free(drm_via_mem_t * mem); | |||
42 | static int via_fb_alloc(drm_via_mem_t * mem); | 42 | static int via_fb_alloc(drm_via_mem_t * mem); |
43 | static int via_fb_free(drm_via_mem_t * mem); | 43 | static int via_fb_free(drm_via_mem_t * mem); |
44 | 44 | ||
45 | static int add_alloc_set(int context, int type, unsigned int val) | 45 | static int add_alloc_set(int context, int type, unsigned long val) |
46 | { | 46 | { |
47 | int i, retval = 0; | 47 | int i, retval = 0; |
48 | 48 | ||
@@ -56,7 +56,7 @@ static int add_alloc_set(int context, int type, unsigned int val) | |||
56 | return retval; | 56 | return retval; |
57 | } | 57 | } |
58 | 58 | ||
59 | static int del_alloc_set(int context, int type, unsigned int val) | 59 | static int del_alloc_set(int context, int type, unsigned long val) |
60 | { | 60 | { |
61 | int i, retval = 0; | 61 | int i, retval = 0; |
62 | 62 | ||
@@ -199,13 +199,13 @@ int via_mem_alloc(DRM_IOCTL_ARGS) | |||
199 | sizeof(mem)); | 199 | sizeof(mem)); |
200 | 200 | ||
201 | switch (mem.type) { | 201 | switch (mem.type) { |
202 | case VIDEO: | 202 | case VIA_MEM_VIDEO: |
203 | if (via_fb_alloc(&mem) < 0) | 203 | if (via_fb_alloc(&mem) < 0) |
204 | return -EFAULT; | 204 | return -EFAULT; |
205 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, | 205 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, |
206 | sizeof(mem)); | 206 | sizeof(mem)); |
207 | return 0; | 207 | return 0; |
208 | case AGP: | 208 | case VIA_MEM_AGP: |
209 | if (via_agp_alloc(&mem) < 0) | 209 | if (via_agp_alloc(&mem) < 0) |
210 | return -EFAULT; | 210 | return -EFAULT; |
211 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, | 211 | DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem, |
@@ -232,7 +232,7 @@ static int via_fb_alloc(drm_via_mem_t * mem) | |||
232 | if (block) { | 232 | if (block) { |
233 | fb.offset = block->ofs; | 233 | fb.offset = block->ofs; |
234 | fb.free = (unsigned long)block; | 234 | fb.free = (unsigned long)block; |
235 | if (!add_alloc_set(fb.context, VIDEO, fb.free)) { | 235 | if (!add_alloc_set(fb.context, VIA_MEM_VIDEO, fb.free)) { |
236 | DRM_DEBUG("adding to allocation set fails\n"); | 236 | DRM_DEBUG("adding to allocation set fails\n"); |
237 | via_mmFreeMem((PMemBlock) fb.free); | 237 | via_mmFreeMem((PMemBlock) fb.free); |
238 | retval = -1; | 238 | retval = -1; |
@@ -269,7 +269,7 @@ static int via_agp_alloc(drm_via_mem_t * mem) | |||
269 | if (block) { | 269 | if (block) { |
270 | agp.offset = block->ofs; | 270 | agp.offset = block->ofs; |
271 | agp.free = (unsigned long)block; | 271 | agp.free = (unsigned long)block; |
272 | if (!add_alloc_set(agp.context, AGP, agp.free)) { | 272 | if (!add_alloc_set(agp.context, VIA_MEM_AGP, agp.free)) { |
273 | DRM_DEBUG("adding to allocation set fails\n"); | 273 | DRM_DEBUG("adding to allocation set fails\n"); |
274 | via_mmFreeMem((PMemBlock) agp.free); | 274 | via_mmFreeMem((PMemBlock) agp.free); |
275 | retval = -1; | 275 | retval = -1; |
@@ -297,11 +297,11 @@ int via_mem_free(DRM_IOCTL_ARGS) | |||
297 | 297 | ||
298 | switch (mem.type) { | 298 | switch (mem.type) { |
299 | 299 | ||
300 | case VIDEO: | 300 | case VIA_MEM_VIDEO: |
301 | if (via_fb_free(&mem) == 0) | 301 | if (via_fb_free(&mem) == 0) |
302 | return 0; | 302 | return 0; |
303 | break; | 303 | break; |
304 | case AGP: | 304 | case VIA_MEM_AGP: |
305 | if (via_agp_free(&mem) == 0) | 305 | if (via_agp_free(&mem) == 0) |
306 | return 0; | 306 | return 0; |
307 | break; | 307 | break; |
@@ -329,7 +329,7 @@ static int via_fb_free(drm_via_mem_t * mem) | |||
329 | 329 | ||
330 | via_mmFreeMem((PMemBlock) fb.free); | 330 | via_mmFreeMem((PMemBlock) fb.free); |
331 | 331 | ||
332 | if (!del_alloc_set(fb.context, VIDEO, fb.free)) { | 332 | if (!del_alloc_set(fb.context, VIA_MEM_VIDEO, fb.free)) { |
333 | retval = -1; | 333 | retval = -1; |
334 | } | 334 | } |
335 | 335 | ||
@@ -352,7 +352,7 @@ static int via_agp_free(drm_via_mem_t * mem) | |||
352 | 352 | ||
353 | via_mmFreeMem((PMemBlock) agp.free); | 353 | via_mmFreeMem((PMemBlock) agp.free); |
354 | 354 | ||
355 | if (!del_alloc_set(agp.context, AGP, agp.free)) { | 355 | if (!del_alloc_set(agp.context, VIA_MEM_AGP, agp.free)) { |
356 | retval = -1; | 356 | retval = -1; |
357 | } | 357 | } |
358 | 358 | ||