Skip to content

Commit 3bf3b53

Browse files
Thomas Zimmermanndaeinki
authored andcommitted
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 <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
1 parent 50e9760 commit 3bf3b53

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

drivers/gpu/drm/exynos/exynos_drm_drv.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ struct drm_exynos_file_private {
197197
* @wait: wait an atomic commit to finish
198198
*/
199199
struct exynos_drm_private {
200-
struct drm_fb_helper *fb_helper;
201-
202200
struct device *g2d_dev;
203201
struct device *dma_dev;
204202
void *mapping;

drivers/gpu/drm/exynos/exynos_drm_fbdev.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
137137

138138
int exynos_drm_fbdev_init(struct drm_device *dev)
139139
{
140-
struct exynos_drm_private *private = dev->dev_private;
141140
struct drm_fb_helper *helper;
142141
int ret;
143142

@@ -148,8 +147,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
148147
if (!helper)
149148
return -ENOMEM;
150149

151-
private->fb_helper = helper;
152-
153150
drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs);
154151

155152
ret = drm_fb_helper_init(dev, helper);
@@ -172,7 +169,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
172169
drm_fb_helper_fini(helper);
173170
err_init:
174171
drm_fb_helper_unprepare(helper);
175-
private->fb_helper = NULL;
176172
kfree(helper);
177173

178174
return ret;
@@ -197,14 +193,13 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
197193

198194
void exynos_drm_fbdev_fini(struct drm_device *dev)
199195
{
200-
struct exynos_drm_private *private = dev->dev_private;
196+
struct drm_fb_helper *fb_helper = dev->fb_helper;
201197

202-
if (!private || !private->fb_helper)
198+
if (!fb_helper)
203199
return;
204200

205-
exynos_drm_fbdev_destroy(dev, private->fb_helper);
206-
drm_fb_helper_unprepare(private->fb_helper);
207-
kfree(private->fb_helper);
208-
private->fb_helper = NULL;
201+
exynos_drm_fbdev_destroy(dev, fb_helper);
202+
drm_fb_helper_unprepare(fb_helper);
203+
kfree(fb_helper);
209204
}
210205

0 commit comments

Comments
 (0)