From: Thomas Zimmermann Date: Thu, 30 Mar 2023 07:36:33 +0000 (+0200) Subject: drm/exynos: Remove fb_helper from struct exynos_drm_private X-Git-Tag: v6.6.17~4917^2~5^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bf3b53446d14003193a8804d0d1f3e1761b2be2;p=platform%2Fkernel%2Flinux-rpi.git drm/exynos: Remove fb_helper from struct exynos_drm_private The DRM device stores a pointer to the fbdev helper. Remove struct exynos_drm_private.fb_helper, which contains the same value. No functional changes. Signed-off-by: Thomas Zimmermann Tested-by: Marek Szyprowski Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index 6ae9056..81d501e 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -197,8 +197,6 @@ struct drm_exynos_file_private { * @wait: wait an atomic commit to finish */ struct exynos_drm_private { - struct drm_fb_helper *fb_helper; - struct device *g2d_dev; struct device *dma_dev; void *mapping; diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index e705985..81f909cb 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -137,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_private *private = dev->dev_private; struct drm_fb_helper *helper; int ret; @@ -148,8 +147,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev) if (!helper) return -ENOMEM; - private->fb_helper = helper; - drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs); ret = drm_fb_helper_init(dev, helper); @@ -172,7 +169,6 @@ err_setup: drm_fb_helper_fini(helper); err_init: drm_fb_helper_unprepare(helper); - private->fb_helper = NULL; kfree(helper); return ret; @@ -197,14 +193,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 drm_fb_helper *fb_helper = dev->fb_helper; - if (!private || !private->fb_helper) + if (!fb_helper) return; - exynos_drm_fbdev_destroy(dev, private->fb_helper); - drm_fb_helper_unprepare(private->fb_helper); - kfree(private->fb_helper); - private->fb_helper = NULL; + exynos_drm_fbdev_destroy(dev, fb_helper); + drm_fb_helper_unprepare(fb_helper); + kfree(fb_helper); }