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

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

flat view

From: Krzysztof Helt <hidden>
Date: 2009-05-04 20:26:02

On Mon, 4 May 2009 21:39:27 +0200
Geert Uytterhoeven [off-list ref] wrote:
On Mon, May 4, 2009 at 18:57, Krzysztof Helt [off-list ref] wrote:
quoted
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().
Ok.

Regards,
Krzysztof

----------------------------------------------------------------------
Dzwonki na komorkê!
Sprawdz >> http://link.interia.pl/f2152 


------------------------------------------------------------------------------
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help