Thread (8 messages) flat view 8 messages, 6 authors, 2008-03-10

RE: [Linux-fbdev-devel] [PATCH 1/1 try#2] [VIDEO/FRAMEBUFFER]: add BF52x EZkit Display driver

From: "Hennerich, Michael" <Michael.Hennerich@analog.com>
Date: 2008-03-10 14:36:32
Also in: lkml

From: geert@linux-m68k.org [mailto:geert@linux-m68k.org]
Subject: Re: [Linux-fbdev-devel] [PATCH 1/1 try#2] [VIDEO/FRAMEBUFFER]:
add
BF52x EZkit Display driver

On Thu, 6 Mar 2008, Bryan Wu wrote:
quoted
On Wed, Mar 5, 2008 at 11:02 PM, Andrew Morton
[off-list ref] wrote:
quoted
On Thu, 31 Jan 2008 00:49:43 +0800 Bryan Wu [off-list ref]
wrote:
quoted
quoted
 > +     fbinfo =
 > +         framebuffer_alloc(sizeof(struct bfin_t350mcqbfb_info),
&pdev->dev);
quoted
quoted
 > +     if (!fbinfo) {
 > +             ret = -ENOMEM;
 > +             goto out2;
 > +     }
   [...]
quoted
quoted
 > +     fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16,
GFP_KERNEL);
quoted
quoted
 > +     if (!fbinfo->pseudo_palette) {
 > +             printk(KERN_ERR DRIVER_NAME
 > +                    "Fail to allocate pseudo_palette\n");
 > +
 > +             ret = -ENOMEM;
 > +             goto out4;
 > +     }
 > +
 > +     memset(fbinfo->pseudo_palette, 0, sizeof(u32) * 16);

 You just invented kzalloc!
Right
Alternatively, you could embed the pseudo palette inside struct
bfin_t350mcqbfb_info, so it's allocated by the framebuffer_alloc() call
above.
This makes the most sense.
Bryan is going to send an updated patch, including your and Andrew's
recommendations.

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