fbdev/core: Add fb_device_{create,destroy}()
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 13 Jun 2023 11:07:09 +0000 (13:07 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 27 Jun 2023 07:58:51 +0000 (09:58 +0200)
commite2af003210c6395f32a5ba9a032ff9589ee7bb09
treecb87270b0ba207cfb7ca0c82102e7e414d07d068
parentf0f6839be41d71a367611284412949f1d3c8baea
fbdev/core: Add fb_device_{create,destroy}()

Move the logic to create and destroy fbdev devices into the new
helpers fb_device_create() and fb_device_destroy().

There was a call to fb_cleanup_device() in do_unregister_framebuffer()
that was too late. The device had already been removed at this point.
Move the call into fb_device_destroy().

Declare the helpers in the new internal header file  fb_internal.h, as
they are only used within the fbdev core module.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613110953.24176-35-tzimmermann@suse.de
drivers/video/fbdev/core/fb_internal.h [new file with mode: 0644]
drivers/video/fbdev/core/fbmem.c
drivers/video/fbdev/core/fbsysfs.c
include/linux/fb.h