Commit 164fc4cf authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fbdev: video/tdfxfb.c warning fix

From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

Fix this:

drivers/video/tdfxfb.c:1005: warning: `tdfxfb_cursor' defined but not used

and make the acceleration function selectable (like hgafb and tridentfb)

Geert says:

 tdfxfb_cursor() was not used before, causing a compiler warning. 
 tdfxfb_cursor() may work, but we don't know, so we didn't dare to enable it
 by default.  Now the user (he who has the hardware) can enable it, and tell
 us whether it works or not.
parent 042c5b0d
...@@ -766,6 +766,14 @@ config FB_3DFX ...@@ -766,6 +766,14 @@ config FB_3DFX
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called tdfxfb. module will be called tdfxfb.
config FB_3DFX_ACCEL
bool "3Dfx Banshee/Voodoo3 Acceleration functions (EXPERIMENTAL)"
depends on FB_3DFX && EXPERIMENTAL
---help---
This will compile the 3Dfx Banshee/Voodoo3 frame buffer device
with acceleration functions.
config FB_VOODOO1 config FB_VOODOO1
tristate "3Dfx Voodoo Graphics (sst1) support" tristate "3Dfx Voodoo Graphics (sst1) support"
depends on FB && PCI depends on FB && PCI
......
...@@ -166,7 +166,11 @@ static int tdfxfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *inf ...@@ -166,7 +166,11 @@ static int tdfxfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *inf
static void tdfxfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); static void tdfxfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
static void tdfxfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); static void tdfxfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image); static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image);
#ifdef CONFIG_FB_3DFX_ACCEL
static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor); static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor);
#else /* !CONFIG_FB_3DFX_ACCEL */
#define tdfxfb_cursor soft_cursor
#endif /* CONFIG_FB_3DFX_ACCEL */
static int banshee_wait_idle(struct fb_info *info); static int banshee_wait_idle(struct fb_info *info);
static struct fb_ops tdfxfb_ops = { static struct fb_ops tdfxfb_ops = {
...@@ -180,7 +184,7 @@ static struct fb_ops tdfxfb_ops = { ...@@ -180,7 +184,7 @@ static struct fb_ops tdfxfb_ops = {
.fb_copyarea = tdfxfb_copyarea, .fb_copyarea = tdfxfb_copyarea,
.fb_imageblit = tdfxfb_imageblit, .fb_imageblit = tdfxfb_imageblit,
.fb_sync = banshee_wait_idle, .fb_sync = banshee_wait_idle,
.fb_cursor = soft_cursor, .fb_cursor = tdfxfb_cursor,
}; };
/* /*
...@@ -1001,6 +1005,7 @@ static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image) ...@@ -1001,6 +1005,7 @@ static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image)
banshee_wait_idle(info); banshee_wait_idle(info);
} }
#ifdef CONFIG_FB_3DFX_ACCEL
static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{ {
struct tdfx_par *par = (struct tdfx_par *) info->par; struct tdfx_par *par = (struct tdfx_par *) info->par;
...@@ -1137,6 +1142,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor) ...@@ -1137,6 +1142,7 @@ static int tdfxfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
spin_unlock_irqrestore(&par->DAClock, flags); spin_unlock_irqrestore(&par->DAClock, flags);
return 0; return 0;
} }
#endif /* CONFIG_FB_3DFX_ACCEL */
/** /**
* tdfxfb_probe - Device Initializiation * tdfxfb_probe - Device Initializiation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment