[PATCH v2 18/18] fbdev: Document that framebuffer_alloc() returns zero'ed data

Thomas Zimmermann <[email protected]>
Newsgroups gmane.comp.freedesktop.amd-gfx,gmane.comp.emulators.kvm.devel,gmane.linux.ports.sh.devel,gmane.linux.kernel,gmane.linux.ports.geode,gmane.comp.video.dri.devel,gmane.linux.kernel.input,gmane.linux.ports.arm.omap,gmane.linux.ports.ppc64.devel,gmane.linux.ports.arm.kernel,gmane.linux.drivers.video-input-infrastructure
Message-ID <[email protected]>
Most fbdev drivers depend on framebuffer_alloc() to initialize the
allocated memory to 0. Document this guarantee.

Suggested-by: Miguel Ojeda <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Helge Deller <[email protected]>
---
 drivers/video/fbdev/core/fb_info.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/core/fb_info.c b/drivers/video/fbdev/core/fb_info.c
index 8bdbefdd4b70..1b7615fc393d 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). Both, the instance of struct fb_info and
+ * the driver private data, are cleared to zero.
  *
  * Returns the new structure, or NULL if an error occurred.
  *
-- 
2.41.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.