drm/mode: rework drm_mode_object_put to drm_mode_object_unregister.

This changes the code to handle being called multiple times without
side effects. The new names seems more suitable for what it does.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2016-04-15 15:10:32 +10:00
parent 9a297b36f4
commit 7c8f6d2577
3 changed files with 24 additions and 19 deletions

View File

@@ -98,7 +98,7 @@ void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode)
if (!mode)
return;
drm_mode_object_put(dev, &mode->base);
drm_mode_object_unregister(dev, &mode->base);
kfree(mode);
}