From: Geert Uytterhoeven <geert@linux-m68k.org>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: bryan.wu@analog.com, Randy Dunlap <randy.dunlap@oracle.com>,
adaplas@gmail.com,
Michael Hennerich <michael.hennerich@analog.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/1 try#2] [VIDEO/FRAMEBUFFER]: add BF52x EZkit Display driver
Date: Thu, 6 Mar 2008 19:07:34 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0803061906210.20407@anakin> (raw)
In-Reply-To: <386072610803060850i2e0b6e35q7e05448d5fd39bca@mail.gmail.com>
On Thu, 6 Mar 2008, Bryan Wu wrote:
> On Wed, Mar 5, 2008 at 11:02 PM, Andrew Morton
> <akpm@linux-foundation.org> wrote:
> > On Thu, 31 Jan 2008 00:49:43 +0800 Bryan Wu <bryan.wu@analog.com> wrote:
> > > + fbinfo =
> > > + framebuffer_alloc(sizeof(struct bfin_t350mcqbfb_info), &pdev->dev);
> > > + if (!fbinfo) {
> > > + ret = -ENOMEM;
> > > + goto out2;
> > > + }
[...]
> > > + fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL);
> > > + 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.
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
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-03-06 18:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 9:53 [PATCH 1/1] [VIDEO/FRAMEBUFFER]: add BF52x EZkit Display driver Bryan Wu
2008-01-30 16:38 ` [Linux-fbdev-devel] " Randy Dunlap
2008-01-30 16:42 ` Bryan Wu
2008-01-30 16:49 ` [PATCH 1/1 try#2] " Bryan Wu
2008-03-06 7:02 ` Andrew Morton
2008-03-06 16:50 ` [Linux-fbdev-devel] " Bryan Wu
2008-03-06 18:07 ` Geert Uytterhoeven [this message]
2008-03-10 14:35 ` Hennerich, Michael
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0803061906210.20407@anakin \
--to=geert@linux-m68k.org \
--cc=adaplas@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bryan.wu@analog.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=randy.dunlap@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).