Skip to content

Commit 50e9760

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

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

drivers/gpu/drm/exynos/exynos_drm_fbdev.c

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@
2828
#define MAX_CONNECTOR 4
2929
#define PREFERRED_BPP 32
3030

31-
#define to_exynos_fbdev(x) container_of(x, struct exynos_drm_fbdev,\
32-
drm_fb_helper)
33-
34-
struct exynos_drm_fbdev {
35-
struct drm_fb_helper drm_fb_helper;
36-
};
37-
3831
static int exynos_drm_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
3932
{
4033
struct drm_fb_helper *helper = info->par;
@@ -144,19 +137,18 @@ static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
144137

145138
int exynos_drm_fbdev_init(struct drm_device *dev)
146139
{
147-
struct exynos_drm_fbdev *fbdev;
148140
struct exynos_drm_private *private = dev->dev_private;
149141
struct drm_fb_helper *helper;
150142
int ret;
151143

152144
if (!dev->mode_config.num_crtc)
153145
return 0;
154146

155-
fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
156-
if (!fbdev)
147+
helper = kzalloc(sizeof(*helper), GFP_KERNEL);
148+
if (!helper)
157149
return -ENOMEM;
158150

159-
private->fb_helper = helper = &fbdev->drm_fb_helper;
151+
private->fb_helper = helper;
160152

161153
drm_fb_helper_prepare(dev, helper, PREFERRED_BPP, &exynos_drm_fb_helper_funcs);
162154

@@ -181,7 +173,7 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
181173
err_init:
182174
drm_fb_helper_unprepare(helper);
183175
private->fb_helper = NULL;
184-
kfree(fbdev);
176+
kfree(helper);
185177

186178
return ret;
187179
}
@@ -206,16 +198,13 @@ static void exynos_drm_fbdev_destroy(struct drm_device *dev,
206198
void exynos_drm_fbdev_fini(struct drm_device *dev)
207199
{
208200
struct exynos_drm_private *private = dev->dev_private;
209-
struct exynos_drm_fbdev *fbdev;
210201

211202
if (!private || !private->fb_helper)
212203
return;
213204

214-
fbdev = to_exynos_fbdev(private->fb_helper);
215-
216205
exynos_drm_fbdev_destroy(dev, private->fb_helper);
217206
drm_fb_helper_unprepare(private->fb_helper);
218-
kfree(fbdev);
207+
kfree(private->fb_helper);
219208
private->fb_helper = NULL;
220209
}
221210

0 commit comments

Comments
 (0)