Commit 32709793 authored by Liu Ying's avatar Liu Ying Committed by Daniel Vetter

drm/crtc: Use drm_mode_object_put() in __drm_framebuffer_unregister()

The function __drm_framebuffer_unregister() has boilerplate code to drop idr
reference.  Let's replace it with drm_mode_object_put() to simplify the code.
Signed-off-by: default avatarLiu Ying <gnuiyl@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1456716070-2602-1-git-send-email-gnuiyl@gmail.com
parent 44ab4042
......@@ -430,9 +430,7 @@ EXPORT_SYMBOL(drm_framebuffer_init);
static void __drm_framebuffer_unregister(struct drm_device *dev,
struct drm_framebuffer *fb)
{
mutex_lock(&dev->mode_config.idr_mutex);
idr_remove(&dev->mode_config.crtc_idr, fb->base.id);
mutex_unlock(&dev->mode_config.idr_mutex);
drm_mode_object_put(dev, &fb->base);
fb->base.id = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment