drm/i915: don't use ->driver_private anymore
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 9 Apr 2010 19:05:08 +0000 (19:05 +0000)
committerDave Airlie <airlied@redhat.com>
Tue, 20 Apr 2010 03:22:56 +0000 (13:22 +1000)
Thanks to the to_intel_bo helper, this change is rather trivial.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c

index d1b7dec9add26c0d523380003ac4b1ec052014d4..354b00f92d450d45d36f91e4ed01ce8cf3673d7d 100644 (file)
@@ -747,7 +747,7 @@ struct drm_i915_gem_object {
        atomic_t pending_flip;
 };
 
-#define to_intel_bo(x) ((struct drm_i915_gem_object *) (x)->driver_private)
+#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
 
 /**
  * Request queue structure.
index 23c67e084de765e816bce5eee3bdd018506f162b..7c8c01b49d63f5583953f9bdf119b4164d544edb 100644 (file)
@@ -4440,7 +4440,7 @@ struct drm_gem_object * i915_gem_alloc_object(struct drm_device *dev,
 
        obj->agp_type = AGP_USER_MEMORY;
 
-       obj->base.driver_private = obj;
+       obj->base.driver_private = NULL;
        obj->obj = &obj->base;
        obj->fence_reg = I915_FENCE_REG_NONE;
        INIT_LIST_HEAD(&obj->list);