]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fbdev: video/tridentfb.c warning fix
authorAndrew Morton <akpm@osdl.org>
Sat, 15 May 2004 03:15:59 +0000 (20:15 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 15 May 2004 03:15:59 +0000 (20:15 -0700)
From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

Speaking with frame buffer people, we agree with this patch to fix the
warning:

drivers/video/tridentfb.c:455: warning: `tridentfb_fillrect' defined but not used
drivers/video/tridentfb.c:473: warning: `tridentfb_copyarea' defined but not used

drivers/video/Kconfig
drivers/video/tridentfb.c

index 028aee17671100f0e0948f8f56569540754f83f0..3c74fdfece77f3bcee2fd02f970d4086b9d1ded6 100644 (file)
@@ -787,6 +787,14 @@ 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 && EXPERIMENTAL
+       ---help---
+       This will compile the Trident frame buffer device with
+       acceleration functions.
+
+
 config FB_PM3
        tristate "Permedia3 support"
        depends on FB && PCI && BROKEN
index 500e97766989d7bca6184844a0b1c951d9a65373..17f8101ff554ca6ab2b312b73127816f519da69d 100644 (file)
@@ -450,7 +450,7 @@ static struct accel_switch accel_image = {
 /*
  * Accel functions called by the upper layers
  */
-
+#ifdef CONFIG_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,11 @@ static void tridentfb_copyarea(struct fb_info *info, const struct fb_copyarea *c
        acc->copy_rect(ca->sx,ca->sy,ca->dx,ca->dy,ca->width,ca->height);
        acc->wait_engine();
 }
+#else /* !CONFIG_FB_TRIDENT_ACCEL */
+#define tridentfb_fillrect cfb_fillrect
+#define tridentfb_copyarea cfb_copyarea
+#endif /* CONFIG_FB_TRIDENT_ACCEL */
+
 
 /*
  * Hardware access functions
@@ -1265,10 +1270,8 @@ static struct fb_ops tridentfb_ops = {
        .fb_blank = tridentfb_blank,
        .fb_check_var = tridentfb_check_var,
        .fb_set_par = tridentfb_set_par,
-//     .fb_fillrect = tridentfb_fillrect,
-//     .fb_copyarea= tridentfb_copyarea,
-       .fb_fillrect = cfb_fillrect,
-       .fb_copyarea= cfb_copyarea,
+       .fb_fillrect = tridentfb_fillrect,
+       .fb_copyarea= tridentfb_copyarea,
        .fb_imageblit = cfb_imageblit,
        .fb_cursor = soft_cursor,
 };