Skip to content

Commit c07e1f2

Browse files
committed
fbdev: Document that framebuffer_alloc() returns zero'ed data
Most fbdev drivers depend on framebuffer_alloc() to initialize the allocated memory to 0. Document this guarantee. v3: * slightly reword the sentence (Miguel) Suggested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Reviewed-by: Sui Jingfeng <suijingfeng@loongson.cn> Cc: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230715185343.7193-19-tzimmermann@suse.de
1 parent 0444fa3 commit c07e1f2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/video/fbdev/core/fb_info.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
*
1414
* Creates a new frame buffer info structure. Also reserves @size bytes
1515
* for driver private data (info->par). info->par (if any) will be
16-
* aligned to sizeof(long).
16+
* aligned to sizeof(long). The new instances of struct fb_info and
17+
* the driver private data are both cleared to zero.
1718
*
1819
* Returns the new structure, or NULL if an error occurred.
1920
*

0 commit comments

Comments
 (0)