diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-30 12:45:57 +0300 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2024-08-30 19:42:38 +0300 |
| commit | 929c81ade6355b87097a2a4886c10750e68626cf (patch) | |
| tree | 64a08f69c537121249bc79f619683d5c259680b1 /include/linux | |
| parent | 2451a285ee5e8c83bedcee7f4962c828b890becf (diff) | |
| download | linux-929c81ade6355b87097a2a4886c10750e68626cf.tar.xz | |
fbdev: Introduce devm_register_framebuffer()
Introduce a device-managed variant of register_framebuffer() which
automatically unregisters the framebuffer on device destruction.
This can simplify the error handling and resource management in drivers.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fb.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index db7d97b10964..abf6643ebcaf 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -601,6 +601,7 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf, /* fbmem.c */ extern int register_framebuffer(struct fb_info *fb_info); extern void unregister_framebuffer(struct fb_info *fb_info); +extern int devm_register_framebuffer(struct device *dev, struct fb_info *fb_info); extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); extern void fb_pad_unaligned_buffer(u8 *dst, u32 d_pitch, u8 *src, u32 idx, u32 height, u32 shift_high, u32 shift_low, u32 mod); |
