}
EXPORT_SYMBOL(drm_mode_object_find);
-/* dev->mode_config.fb_lock must be held! */
-static void __drm_framebuffer_unregister(struct drm_device *dev,
- struct drm_framebuffer *fb)
-{
- drm_mode_object_put(dev, &fb->base);
-
- fb->base.id = 0;
-}
-
static void drm_framebuffer_free(struct kref *kref)
{
struct drm_framebuffer *fb =
* removed at this point. Check for that.
*/
mutex_lock(&dev->mode_config.fb_lock);
- if (fb->base.id) {
- /* Mark fb as reaped and drop idr ref. */
- __drm_framebuffer_unregister(dev, fb);
- }
+ drm_mode_object_unregister(dev, &fb->base);
mutex_unlock(&dev->mode_config.fb_lock);
fb->funcs->destroy(fb);
mutex_lock(&dev->mode_config.fb_lock);
/* Mark fb as reaped and drop idr ref. */
- __drm_framebuffer_unregister(dev, fb);
+ drm_mode_object_unregister(dev, &fb->base);
mutex_unlock(&dev->mode_config.fb_lock);
}
EXPORT_SYMBOL(drm_framebuffer_unregister_private);