From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Antonino A. Daplas" <adaplas@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH 06/24] fm2fb: The pseudo_palette is only 16 elements long
Date: Sun, 3 Jun 2007 10:27:23 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0706031026540.9351@anakin> (raw)
In-Reply-To: <46613F1C.50606@gmail.com>
On Sat, 2 Jun 2007, Antonino A. Daplas wrote:
> The pseudo_palette is only 16 elements long.
>
> Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>
> drivers/video/fm2fb.c | 16 +++++++++-------
> 1 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/video/fm2fb.c b/drivers/video/fm2fb.c
> index 70ff55b..6c91c61 100644
> --- a/drivers/video/fm2fb.c
> +++ b/drivers/video/fm2fb.c
> @@ -195,13 +195,15 @@ static int fm2fb_blank(int blank, struct
> static int fm2fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
> u_int transp, struct fb_info *info)
> {
> - if (regno > info->cmap.len)
> - return 1;
> - red >>= 8;
> - green >>= 8;
> - blue >>= 8;
> + if (regno < 16) {
> + red >>= 8;
> + green >>= 8;
> + blue >>= 8;
> +
> + ((u32*)(info->pseudo_palette))[regno] = (red << 16) |
> + (green << 8) | blue;
> + }
>
> - ((u32*)(info->pseudo_palette))[regno] = (red << 16) | (green << 8) | blue;
> return 0;
> }
>
> @@ -237,7 +239,7 @@ static int __devinit fm2fb_probe(struct
> if (!zorro_request_device(z,"fm2fb"))
> return -ENXIO;
>
> - info = framebuffer_alloc(256 * sizeof(u32), &z->dev);
> + info = framebuffer_alloc(16 * sizeof(u32), &z->dev);
> if (!info) {
> zorro_release_device(z);
> return -ENOMEM;
>
>
>
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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
prev parent reply other threads:[~2007-06-03 8:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-02 9:57 [PATCH 06/24] fm2fb: The pseudo_palette is only 16 elements long Antonino A. Daplas
2007-06-03 8:27 ` Geert Uytterhoeven [this message]
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.0706031026540.9351@anakin \
--to=geert@linux-m68k.org \
--cc=adaplas@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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).