drm/fbdev-generic: Inline clean-up helpers into drm_fbdev_fb_destroy()
The fbdev framebuffer cleanup in drm_fbdev_fb_destroy() calls drm_fbdev_release() and drm_fbdev_cleanup(). Inline both into the caller. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230125200415.14123-10-tzimmermann@suse.de
This commit is contained in:
parent
032116bbe1
commit
7f5fe87396
|
@ -43,8 +43,9 @@ static int drm_fbdev_fb_release(struct fb_info *info, int user)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drm_fbdev_cleanup(struct drm_fb_helper *fb_helper)
|
static void drm_fbdev_fb_destroy(struct fb_info *info)
|
||||||
{
|
{
|
||||||
|
struct drm_fb_helper *fb_helper = info->par;
|
||||||
struct fb_info *fbi = fb_helper->info;
|
struct fb_info *fbi = fb_helper->info;
|
||||||
void *shadow = NULL;
|
void *shadow = NULL;
|
||||||
|
|
||||||
|
@ -64,24 +65,10 @@ static void drm_fbdev_cleanup(struct drm_fb_helper *fb_helper)
|
||||||
drm_client_buffer_vunmap(fb_helper->buffer);
|
drm_client_buffer_vunmap(fb_helper->buffer);
|
||||||
|
|
||||||
drm_client_framebuffer_delete(fb_helper->buffer);
|
drm_client_framebuffer_delete(fb_helper->buffer);
|
||||||
}
|
|
||||||
|
|
||||||
static void drm_fbdev_release(struct drm_fb_helper *fb_helper)
|
|
||||||
{
|
|
||||||
drm_fbdev_cleanup(fb_helper);
|
|
||||||
drm_client_release(&fb_helper->client);
|
drm_client_release(&fb_helper->client);
|
||||||
kfree(fb_helper);
|
kfree(fb_helper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* fb_ops.fb_destroy is called by the last put_fb_info() call at the end of
|
|
||||||
* unregister_framebuffer() or fb_release().
|
|
||||||
*/
|
|
||||||
static void drm_fbdev_fb_destroy(struct fb_info *info)
|
|
||||||
{
|
|
||||||
drm_fbdev_release(info->par);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
struct drm_fb_helper *fb_helper = info->par;
|
struct drm_fb_helper *fb_helper = info->par;
|
||||||
|
|
Loading…
Reference in New Issue