diff options
author | Liu Ying <gnuiyl@gmail.com> | 2016-02-29 11:21:10 +0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-02-29 17:51:09 +0100 |
commit | 327097930d655de5964fcb843b2b412ab68a9bac (patch) | |
tree | 17959060e9c776e95940aa8d13ea0bc0570c5a26 /drivers/gpu/drm/drm_crtc.c | |
parent | 44ab4042178bd596275927ea050980aa4257581b (diff) | |
download | lwn-327097930d655de5964fcb843b2b412ab68a9bac.tar.gz lwn-327097930d655de5964fcb843b2b412ab68a9bac.zip |
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
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 65258acddb90..579505c0a498 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -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; } |