drm/tegra: Stop using drm_framebuffer_unregister_private
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Dec 2016 10:49:25 +0000 (11:49 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 12 Jan 2017 15:37:44 +0000 (16:37 +0100)
This is the deprecated function for when you embedded the framebuffer
somewhere else (which breaks refcounting). But Tegra is using
drm_framebuffer_remove and a free-standing FB, so this is redundant.

One caveat here is that the failure path in the init code still
manually cleaned up the fb. I presume that was an oversight and
changed it over to drm_framebuffer_remove too.

Cc: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-5-git-send-email-daniel.vetter@ffwll.ch
Link: http://patchwork.freedesktop.org/patch/msgid/1482835765-12044-2-git-send-email-daniel.vetter@ffwll.ch
drivers/gpu/drm/tegra/fb.c

index 8df7783cecc2dc01bf1662103a38b9cf077df76d..f896e2ff7d471c545f1ee305457bdbd7a12ac21d 100644 (file)
@@ -271,8 +271,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
        return 0;
 
 destroy:
-       drm_framebuffer_unregister_private(fb);
-       tegra_fb_destroy(fb);
+       drm_framebuffer_remove(fb);
 release:
        drm_fb_helper_release_fbi(helper);
        return err;
@@ -342,10 +341,8 @@ static void tegra_fbdev_exit(struct tegra_fbdev *fbdev)
        drm_fb_helper_unregister_fbi(&fbdev->base);
        drm_fb_helper_release_fbi(&fbdev->base);
 
-       if (fbdev->fb) {
-               drm_framebuffer_unregister_private(&fbdev->fb->base);
+       if (fbdev->fb)
                drm_framebuffer_remove(&fbdev->fb->base);
-       }
 
        drm_fb_helper_fini(&fbdev->base);
        tegra_fbdev_free(fbdev);