@@ -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;
@@ -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 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
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);
}
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 <tzimmermann@suse.de> --- drivers/gpu/drm/exynos/exynos_drm_drv.h | 2 -- drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-)