staging: vboxvideo: Remove vboxfb_create_object() wrapper
authorHans de Goede <hdegoede@redhat.com>
Tue, 11 Sep 2018 07:15:43 +0000 (09:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Sep 2018 11:22:59 +0000 (13:22 +0200)
The vboxfb_create_object() wrapper really does nothing more then just
call vbox_gem_create(), so this commit drops it, replacing it with
a direct call to vbox_gem_create().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxvideo/vbox_fb.c

index 43c39eca4ae1498940f28e54f799943eb615f215..79814117e063338937c9510a05c201a6d21b137d 100644 (file)
@@ -66,26 +66,6 @@ static struct fb_ops vboxfb_ops = {
        .fb_debug_leave = drm_fb_helper_debug_leave,
 };
 
-static int vboxfb_create_object(struct vbox_fbdev *fbdev,
-                               struct DRM_MODE_FB_CMD *mode_cmd,
-                               struct drm_gem_object **gobj_p)
-{
-       struct drm_device *dev = fbdev->helper.dev;
-       u32 size;
-       struct drm_gem_object *gobj;
-       u32 pitch = mode_cmd->pitches[0];
-       int ret;
-
-       size = pitch * mode_cmd->height;
-       ret = vbox_gem_create(dev, size, true, &gobj);
-       if (ret)
-               return ret;
-
-       *gobj_p = gobj;
-
-       return 0;
-}
-
 static int vboxfb_create(struct drm_fb_helper *helper,
                         struct drm_fb_helper_surface_size *sizes)
 {
@@ -109,7 +89,7 @@ static int vboxfb_create(struct drm_fb_helper *helper,
 
        size = pitch * mode_cmd.height;
 
-       ret = vboxfb_create_object(fbdev, &mode_cmd, &gobj);
+       ret = vbox_gem_create(fbdev->helper.dev, size, true, &gobj);
        if (ret) {
                DRM_ERROR("failed to create fbcon backing object %d\n", ret);
                return ret;