Re: [PATCH] radeonfb: screeninfo initialization cleanup

From: Geert Uytterhoeven
Date: Fri Oct 29 2004 - 21:08:30 EST


On Thu, 28 Oct 2004, Linux Kernel Mailing List wrote:
> ChangeSet 1.2265, 2004/10/28 08:23:51-07:00, penberg@xxxxxxxxxxxxxx
>
> [PATCH] radeonfb: screeninfo initialization cleanup
>
> This patch changes the initialization of radeonfb_default_var to use named
> initializers and avoids explicitly setting fields that are automatically
> zeroed.

> --- a/drivers/video/aty/radeon_monitor.c 2004-10-28 10:13:09 -07:00
> +++ b/drivers/video/aty/radeon_monitor.c 2004-10-28 10:13:09 -07:00
> @@ -7,10 +7,25 @@
> #endif /* CONFIG_PPC_OF */
>
> static struct fb_var_screeninfo radeonfb_default_var = {
> - 640, 480, 640, 480, 0, 0, 8, 0,
> - {0, 6, 0}, {0, 6, 0}, {0, 6, 0}, {0, 0, 0},
> - 0, 0, -1, -1, 0, 39721, 40, 24, 32, 11, 96, 2,
> - 0, FB_VMODE_NONINTERLACED
> + .xres = 640,
> + .yres = 480,
> + .xres_virtual = 640,
> + .yres_virtual = 480,
> + .bits_per_pixel = 8,
> + .red = { 0, 6, 0 },
^
> + .green = { 0, 6, 0 },
^
> + .blue = { 0, 6, 0 },
^
Should be 8 these days (256 usable color palette entries).
And why not use `{ .length = 8 }' if you don't care about automatically zeroed
fields?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/