[PATCH 15/24] drm/tegra: Use drm_gem_fb_destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Now that our destroy function is the same as the helper, use that
directly.

Signed-off-by: Daniel Stone <daniels@xxxxxxxxxxxxx>
Cc: Thierry Reding <thierry.reding@xxxxxxxxx>
Cc: linux-tegra@xxxxxxxxxxxxxxx
---
 drivers/gpu/drm/tegra/fb.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index 709aa6ef171a..4c22cdded3c2 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -92,23 +92,8 @@ int tegra_fb_get_tiling(struct drm_framebuffer *framebuffer,
 	return 0;
 }
 
-static void tegra_fb_destroy(struct drm_framebuffer *framebuffer)
-{
-	unsigned int i;
-
-	for (i = 0; i < framebuffer->format->num_planes; i++) {
-		struct tegra_bo *bo = tegra_fb_get_plane(framebuffer, i);
-
-		if (bo)
-			drm_gem_object_put_unlocked(&bo->gem);
-	}
-
-	drm_framebuffer_cleanup(framebuffer);
-	kfree(framebuffer);
-}
-
 static const struct drm_framebuffer_funcs tegra_fb_funcs = {
-	.destroy = tegra_fb_destroy,
+	.destroy = drm_gem_fb_destroy,
 	.create_handle = drm_gem_fb_create_handle,
 };
 
-- 
2.16.2

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux