mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 21:33:00 +00:00
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: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1456716070-2602-1-git-send-email-gnuiyl@gmail.com
This commit is contained in:
parent
44ab404217
commit
327097930d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user