aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2016-12-27 11:49:25 +0100
committerDaniel Vetter <[email protected]>2017-01-12 16:37:44 +0100
commit3e7d2fddba5a3e9243fc461027511a350f88c23b (patch)
tree4a27819171e3d1a1565ae739c7c27878f70fa594
parent2384d62385aea91d7ec1589287b6daa41af1ed8b (diff)
drm/tegra: Stop using drm_framebuffer_unregister_private
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 <[email protected]> Reviewed-by: Archit Taneja <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--drivers/gpu/drm/tegra/fb.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index 8df7783cecc2..f896e2ff7d47 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -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);