summaryrefslogtreecommitdiff
path: root/shared-core/via_verifier.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-09-07 20:17:49 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-09-07 20:17:49 +0200
commitb257bbe48a0851d27150d21cd124af2dc3e53385 (patch)
treec230ae915264a7249a23c0f858265cfe12622554 /shared-core/via_verifier.c
parentcbf7c5cace00d23f6b694977aa058026b9d39e9f (diff)
parent06bb07259531d10df2c1979919af899e3812057b (diff)
Merge remote branch 'upstream/master' into i915-zone-renderingi915-zone-rendering
Conflicts: linux-core/drm_bo.c linux-core/drm_objects.h linux-core/i915_buffer.c shared-core/i915_dma.c shared-core/i915_drm.h shared-core/i915_drv.h shared-core/i915_irq.c
Diffstat (limited to 'shared-core/via_verifier.c')
-rw-r--r--shared-core/via_verifier.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/shared-core/via_verifier.c b/shared-core/via_verifier.c
index b5a1d33a..ded5c4e1 100644
--- a/shared-core/via_verifier.c
+++ b/shared-core/via_verifier.c
@@ -252,11 +252,10 @@ eat_words(const uint32_t ** buf, const uint32_t * buf_end, unsigned num_words)
static __inline__ drm_local_map_t *via_drm_lookup_agp_map(drm_via_state_t * seq,
unsigned long offset,
unsigned long size,
- drm_device_t * dev)
+ struct drm_device * dev)
{
#ifdef __linux__
- struct list_head *list;
- drm_map_list_t *r_list;
+ struct drm_map_list *r_list;
#endif
drm_local_map_t *map = seq->map_cache;
@@ -265,8 +264,7 @@ static __inline__ drm_local_map_t *via_drm_lookup_agp_map(drm_via_state_t * seq,
return map;
}
#ifdef __linux__
- list_for_each(list, &dev->maplist->head) {
- r_list = (drm_map_list_t *) list;
+ list_for_each_entry(r_list, &dev->maplist, head) {
map = r_list->map;
if (!map)
continue;
@@ -969,7 +967,7 @@ via_parse_vheader6(drm_via_private_t * dev_priv, uint32_t const **buffer,
int
via_verify_command_stream(const uint32_t * buf, unsigned int size,
- drm_device_t * dev, int agp)
+ struct drm_device * dev, int agp)
{
drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private;
@@ -1033,18 +1031,18 @@ via_verify_command_stream(const uint32_t * buf, unsigned int size,
case state_error:
default:
*hc_state = saved_state;
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
}
if (state == state_error) {
*hc_state = saved_state;
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
return 0;
}
int
-via_parse_command_stream(drm_device_t * dev, const uint32_t * buf,
+via_parse_command_stream(struct drm_device * dev, const uint32_t * buf,
unsigned int size)
{
@@ -1089,11 +1087,11 @@ via_parse_command_stream(drm_device_t * dev, const uint32_t * buf,
break;
case state_error:
default:
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
}
if (state == state_error) {
- return DRM_ERR(EINVAL);
+ return -EINVAL;
}
return 0;
}