Thread (2 messages) 2 messages, 2 authors, 2009-05-04

Re: [PATCH] clps711xfb: use framebuffer_alloc() to allocate fb_info struct

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2009-05-04 19:39:39

On Mon, May 4, 2009 at 18:57, Krzysztof Helt [off-list ref] wrote:
quoted hunk
From: Krzysztof Helt <redacted>

Use the framebuffer_alloc() function to allocate the fb_info
structure so the structure is correctly initialized after allocation.

Signed-off-by: Krzysztof Helt <redacted>
---
 drivers/video/clps711xfb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/clps711xfb.c b/drivers/video/clps711xfb.c
index 16f5db4..80fd5f1 100644
--- a/drivers/video/clps711xfb.c
+++ b/drivers/video/clps711xfb.c
@@ -366,7 +366,7 @@ int __init clps711xfb_init(void)
       if (fb_get_options("clps711xfb", NULL))
               return -ENODEV;

-       cfb = kzalloc(sizeof(*cfb), GFP_KERNEL);
+       cfb = framebuffer_alloc(0, NULL);
       if (!cfb)
               goto out;
While currently framebuffer_release() is identical to kfree(), I think
these should
also be converted from kfree() to framebuffer_release().

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help