diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-07-15 21:52:00 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-07-24 17:50:39 +0300 |
commit | c07e1f20dcbe010ceefb7ccdeac0198222366168 (patch) | |
tree | c031701d8d7bf28cb1e2a5dd18cbc91023de4987 /drivers/video/fbdev/core | |
parent | 0444fa357c16a4c36c6c6e3ef13e690875fad208 (diff) | |
download | linux-c07e1f20dcbe010ceefb7ccdeac0198222366168.tar.xz |
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
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r-- | drivers/video/fbdev/core/fb_info.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/core/fb_info.c b/drivers/video/fbdev/core/fb_info.c index 8bdbefdd4b70..4847ebe50d7d 100644 --- a/drivers/video/fbdev/core/fb_info.c +++ b/drivers/video/fbdev/core/fb_info.c @@ -13,7 +13,8 @@ * * Creates a new frame buffer info structure. Also reserves @size bytes * for driver private data (info->par). info->par (if any) will be - * aligned to sizeof(long). + * aligned to sizeof(long). The new instances of struct fb_info and + * the driver private data are both cleared to zero. * * Returns the new structure, or NULL if an error occurred. * |