From: archit taneja Date: Wed, 10 Apr 2013 08:59:39 +0000 (+0000) Subject: drm: cleanup: use drm_framebuffer_reference instead of a kref_get X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9131d3d87bf7c8cfc9bdc3d3d927ec3967f0e9a6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm: cleanup: use drm_framebuffer_reference instead of a kref_get 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 Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index dd64a06dc5b4..a3b63cf31eeb 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -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;