drm: cleanup: use drm_framebuffer_reference instead of a kref_get
authorarchit taneja <archit@ti.com>
Wed, 10 Apr 2013 08:59:39 +0000 (08:59 +0000)
committerDave Airlie <airlied@redhat.com>
Fri, 12 Apr 2013 04:08:15 +0000 (14:08 +1000)
drm_framebuffer_lookup() does a kref_get() for the framebuffer if it finds one
corresponding to the fb id passed to it. Use drm_framebuffer_reference() instead
for clarity since it's the function used in other places to take a reference.

Signed-off-by: Archit Taneja <archit@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c

index dd64a06..a3b63cf 100644 (file)
@@ -412,7 +412,7 @@ struct drm_framebuffer *drm_framebuffer_lookup(struct drm_device *dev,
        mutex_lock(&dev->mode_config.fb_lock);
        fb = __drm_framebuffer_lookup(dev, id);
        if (fb)
-               kref_get(&fb->refcount);
+               drm_framebuffer_reference(fb);
        mutex_unlock(&dev->mode_config.fb_lock);
 
        return fb;