drm/exynos: exynos_drm_fb -> drm_framebuffer
authorDaniel Stone <daniels@collabora.com>
Fri, 30 Mar 2018 14:11:32 +0000 (15:11 +0100)
committerInki Dae <inki.dae@samsung.com>
Tue, 17 Apr 2018 05:55:41 +0000 (14:55 +0900)
Now exynos_drm_fb is just an empty wrapper around drm_framebuffer, we
can drop it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_fb.c

index 168c71f80b724fd98334ac9a3111139c8a023a4a..f0e79178bde61dea434f15d5cc47f30786812994 100644 (file)
 #include "exynos_drm_iommu.h"
 #include "exynos_drm_crtc.h"
 
-#define to_exynos_fb(x)        container_of(x, struct exynos_drm_fb, fb)
-
-/*
- * exynos specific framebuffer structure.
- *
- * @fb: drm framebuffer obejct.
- * @exynos_gem: array of exynos specific gem object containing a gem object.
- */
-struct exynos_drm_fb {
-       struct drm_framebuffer  fb;
-};
-
 static int check_fb_gem_memory_type(struct drm_device *drm_dev,
                                    struct exynos_drm_gem *exynos_gem)
 {
@@ -76,12 +64,12 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
                            struct exynos_drm_gem **exynos_gem,
                            int count)
 {
-       struct exynos_drm_fb *exynos_fb;
+       struct drm_framebuffer *fb;
        int i;
        int ret;
 
-       exynos_fb = kzalloc(sizeof(*exynos_fb), GFP_KERNEL);
-       if (!exynos_fb)
+       fb = kzalloc(sizeof(*fb), GFP_KERNEL);
+       if (!fb)
                return ERR_PTR(-ENOMEM);
 
        for (i = 0; i < count; i++) {
@@ -89,21 +77,21 @@ exynos_drm_framebuffer_init(struct drm_device *dev,
                if (ret < 0)
                        goto err;
 
-               exynos_fb->fb.obj[i] = &exynos_gem[i]->base;
+               fb->obj[i] = &exynos_gem[i]->base;
        }
 
-       drm_helper_mode_fill_fb_struct(dev, &exynos_fb->fb, mode_cmd);
+       drm_helper_mode_fill_fb_struct(dev, fb, mode_cmd);
 
-       ret = drm_framebuffer_init(dev, &exynos_fb->fb, &exynos_drm_fb_funcs);
+       ret = drm_framebuffer_init(dev, fb, &exynos_drm_fb_funcs);
        if (ret < 0) {
                DRM_ERROR("failed to initialize framebuffer\n");
                goto err;
        }
 
-       return &exynos_fb->fb;
+       return fb;
 
 err:
-       kfree(exynos_fb);
+       kfree(fb);
        return ERR_PTR(ret);
 }