drm/tegra: fb: Do not destroy framebuffer
authorThierry Reding <treding@nvidia.com>
Tue, 21 Oct 2014 11:56:59 +0000 (13:56 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 15:18:32 +0000 (16:18 +0100)
Drop a reference instead of directly calling the framebuffer .destroy()
callback at fbdev free time. This is necessary to make sure the object
isn't destroyed if anyone else still has a reference.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/fb.c

index fab39eb2dae878d7daf88a2f4d9011b111728700..ec5ae7cf43493e5b256e042fb54bfe5bdf5aec65 100644 (file)
@@ -360,7 +360,7 @@ static void tegra_fbdev_exit(struct tegra_fbdev *fbdev)
 
        if (fbdev->fb) {
                drm_framebuffer_unregister_private(&fbdev->fb->base);
-               tegra_fb_destroy(&fbdev->fb->base);
+               drm_framebuffer_remove(&fbdev->fb->base);
        }
 
        drm_fb_helper_fini(&fbdev->base);