diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-03-30 09:36:32 +0200 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2023-04-17 16:47:55 +0900 |
commit | 50e97607f8853ad7efe1a8d451ccdd8f50e7fbe1 (patch) | |
tree | 9628efbe3b09d1a4248bd7b06b00e6d60da950df /drivers/gpu/drm/exynos | |
parent | 89c258b5226d86a5d57b6df17eec00ab0f3d5b80 (diff) |
drm/exynos: Remove struct exynos_drm_fbdev
Remove struct exynos_drm_fbdev, which is an empty wrapper around
struct drm_fb_helper. Use the latter directly. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index f11895d32982..e7059850baa2 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -28,13 +28,6 @@ #define MAX_CONNECTOR 4 #define PREFERRED_BPP 32 -#define to_exynos_fbdev(x) container_of(x, struct exynos_drm_fbdev,\ - drm_fb_helper) - -struct exynos_drm_fbdev { - struct drm_fb_helper drm_fb_helper; -}; - static int exynos_drm_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) { struct drm_fb_helper *helper = info->par; @@ -144,7 +137,6 @@ static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = { int exynos_drm_fbdev_init(struct drm_device *dev) { - struct exynos_drm_fbdev *fbdev; struct exynos_drm_private *private = dev->dev_private; struct drm_fb_helper *helper; int ret; @@ -152,11 +144,11 @@ int exynos_drm_fbdev_init(struct drm_device *dev) if (!dev->mode_config.num_crtc) return 0; - fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); - if (!fbdev) + helper = kzalloc(sizeof(*helper), GFP_KERNEL); + if (!helper) return -ENOMEM; - private->fb_helper = helper = &fbdev->drm_fb_helper; + private->fb_helper = helper; drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs); @@ -181,7 +173,7 @@ err_setup: err_init: drm_fb_helper_unprepare(helper); private->fb_helper = NULL; - kfree(fbdev); + kfree(helper); return ret; } @@ -206,16 +198,13 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev, void exynos_drm_fbdev_fini(struct drm_device *dev) { struct exynos_drm_private *private = dev->dev_private; - struct exynos_drm_fbdev *fbdev; if (!private || !private->fb_helper) return; - fbdev = to_exynos_fbdev(private->fb_helper); - exynos_drm_fbdev_destroy(dev, private->fb_helper); drm_fb_helper_unprepare(private->fb_helper); - kfree(fbdev); + kfree(private->fb_helper); private->fb_helper = NULL; } |