Thread (8 messages) 8 messages, 3 authors, 2004-04-16

Re: Re: [PATCH] - video/tridentfb.c warning fix.

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2004-04-16 19:44:16

On Fri, 16 Apr 2004, Luiz Fernando N. Capitulino wrote:
quoted hunk ↗ jump to hunk
--- a/drivers/video/Kconfig	2004-04-16 15:02:28.000000000 -0300
+++ a~/drivers/video/Kconfig	2004-04-16 14:46:48.000000000 -0300
@@ -772,6 +772,13 @@ config FB_TRIDENT
 	  To compile this driver as a module, choose M here: the
 	  module will be called tridentfb.

+config FB_TRIDENT_ACCEL
+	bool "Trident Acceleration functions (EXPERIMENTAL)"
+	depends on FB_TRIDENT
+	---help---
+	This will compile FB_TRIDENT with acceleration functions.
                          ^^^^^^^^^^
the Trident frame buffer device?
quoted hunk ↗ jump to hunk
--- a/drivers/video/tridentfb.c	2004-04-16 15:02:36.000000000 -0300
+++ a~/drivers/video/tridentfb.c	2004-04-16 14:36:00.000000000 -0300
@@ -450,7 +450,7 @@ static struct accel_switch accel_image =
 /*
  * Accel functions called by the upper layers
  */
-
+#ifdef FB_TRIDENT_ACCEL
 static void tridentfb_fillrect(struct fb_info * info, const struct fb_fillrect *fr)
 {
 	int bpp = info->var.bits_per_pixel;
@@ -474,6 +474,7 @@ static void tridentfb_copyarea(struct fb
 	acc->copy_rect(ca->sx,ca->sy,ca->dx,ca->dy,ca->width,ca->height);
 	acc->wait_engine();
 }
+#endif
Alternatively, you can do

    #else /* !FB_TRIDENT_ACCEL */
    #define tridentfb_fillrect	cfb_fillrect
    #define tridentfb_copyarea	cfb_copyarea
    #endif /* !FB_TRIDENT_ACCEL */

here, and get rid of the #ifdef in tridentfb_ops.

if FB_TRIDENT_ACCEL is not set, and get rid of the second #ifdef
FB_TRIDENT_ACCEL.
 I don't know if it is good, but It will be temporary anyway,
(just util the code is tested). The warning is gone, and the code
can be tested.
Looks fine!

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: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help