
From: Adrian Bunk <bunk@stusta.de>

The patch below removes some unused function from drivers/video/

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 /dev/null                               |    0 
 25-akpm/drivers/video/console/mdacon.c  |   11 --------
 25-akpm/drivers/video/i810/i810_accel.c |   43 --------------------------------
 25-akpm/drivers/video/neofb.c           |    5 ---
 25-akpm/drivers/video/pm2fb.c           |    7 -----
 25-akpm/drivers/video/radeonfb.c        |   24 -----------------
 25-akpm/drivers/video/tdfxfb.c          |   35 --------------------------
 25-akpm/drivers/video/tridentfb.c       |    7 -----
 8 files changed, 132 deletions(-)

diff -puN drivers/video/console/mdacon.c~video-drivers-remove-unused-functions-fwd drivers/video/console/mdacon.c
--- 25/drivers/video/console/mdacon.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/console/mdacon.c	Thu Dec  9 13:36:50 2004
@@ -64,7 +64,6 @@ static unsigned int	mda_gfx_port;		/* Gr
 
 /* current hardware state */
 
-static int	mda_origin_loc=-1;
 static int	mda_cursor_loc=-1;
 static int	mda_cursor_size_from=-1;
 static int	mda_cursor_size_to=-1;
@@ -148,16 +147,6 @@ static int test_mda_b(unsigned char val,
 }
 #endif
 
-static inline void mda_set_origin(unsigned int location)
-{
-	if (mda_origin_loc == location)
-		return;
-
-	write_mda_w(location >> 1, 0x0c);
-
-	mda_origin_loc = location;
-}
-
 static inline void mda_set_cursor(unsigned int location) 
 {
 	if (mda_cursor_loc == location)
diff -L drivers/video/console/mdacon.c.old -puN /dev/null /dev/null
diff -puN drivers/video/i810/i810_accel.c~video-drivers-remove-unused-functions-fwd drivers/video/i810/i810_accel.c
--- 25/drivers/video/i810/i810_accel.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/i810/i810_accel.c	Thu Dec  9 13:36:50 2004
@@ -252,49 +252,6 @@ static inline void mono_src_copy_imm_bli
 	end_iring(par);
 }
 
-/**
- * mono_src_copy_blit - color expand from video memory to framebuffer
- * @dwidth: width of destination
- * @dheight: height of destination
- * @dpitch: pixels per line of the buffer
- * @qsize: size of bitmap in quad words
- * @dest: address of first byte of pixel;
- * @rop: raster operation
- * @blit_bpp: pixelformat to use which can be different from the 
- *            framebuffer's pixelformat
- * @src: address of image data
- * @bg: backgound color
- * @fg: forground color
- * @par: pointer to i810fb_par structure
- *
- * DESCRIPTION:
- * A color expand operation where the  source data is in video memory. 
- * Useful for drawing text. 
- *
- * REQUIREMENT:
- * The end of a scanline must be padded to the next word.
- */
-static inline void mono_src_copy_blit(int dwidth, int dheight, int dpitch, 
-				      int qsize, int blit_bpp, int rop, 
-				      int dest, int src, int bg,
-				      int fg, struct fb_info *info)
-{
-	struct i810fb_par *par = (struct i810fb_par *) info->par;
-
-	if (begin_iring(info, 32 + IRING_PAD)) return;
-
-	PUT_RING(BLIT | MONO_SOURCE_COPY_BLIT | 6);
-	PUT_RING(DYN_COLOR_EN | blit_bpp | rop << 16 | dpitch | 1 << 27);
-	PUT_RING(dheight << 16 | dwidth);
-	PUT_RING(dest);
-	PUT_RING(qsize - 1);
-	PUT_RING(src);
-	PUT_RING(bg);
-	PUT_RING(fg);
-
-	end_iring(par);
-}
-
 static inline void load_front(int offset, struct fb_info *info)
 {
 	struct i810fb_par *par = (struct i810fb_par *) info->par;
diff -L drivers/video/i810/i810_accel.c.old -puN /dev/null /dev/null
diff -puN drivers/video/neofb.c~video-drivers-remove-unused-functions-fwd drivers/video/neofb.c
--- 25/drivers/video/neofb.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/neofb.c	Thu Dec  9 13:36:50 2004
@@ -152,11 +152,6 @@ static biosMode bios32[] = {
 };
 #endif
 
-static inline u32 read_le32(int regindex, const struct neofb_par *par)
-{
-	return readl(par->neo2200 + par->cursorOff + regindex);
-}
-
 static inline void write_le32(int regindex, u32 val, const struct neofb_par *par)
 {
 	writel(val, par->neo2200 + par->cursorOff + regindex);
diff -L drivers/video/neofb.c.old -puN /dev/null /dev/null
diff -puN drivers/video/pm2fb.c~video-drivers-remove-unused-functions-fwd drivers/video/pm2fb.c
--- 25/drivers/video/pm2fb.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/pm2fb.c	Thu Dec  9 13:36:50 2004
@@ -201,13 +201,6 @@ inline static void pm2_RDAC_WR(struct pm
 	pm2_WR(p, index, v);
 }
 
-inline static u32 pm2v_RDAC_RD(struct pm2fb_par* p, s32 idx)
-{
-	pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
-	mb();
-	return pm2_RD(p, PM2VR_RD_INDEXED_DATA);
-}
-
 inline static void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
 {
 	pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
diff -L drivers/video/pm2fb.c.old -puN /dev/null /dev/null
diff -puN drivers/video/radeonfb.c~video-drivers-remove-unused-functions-fwd drivers/video/radeonfb.c
--- 25/drivers/video/radeonfb.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/radeonfb.c	Thu Dec  9 13:36:50 2004
@@ -621,30 +621,6 @@ static void _radeon_engine_reset(struct 
 #define radeon_engine_reset()		_radeon_engine_reset(rinfo)
 
 
-static __inline__ u8 radeon_get_post_div_bitval(int post_div)
-{
-        switch (post_div) {
-                case 1:
-                        return 0x00;
-                case 2: 
-                        return 0x01;
-                case 3: 
-                        return 0x04;
-                case 4:
-                        return 0x02;
-                case 6:
-                        return 0x06;
-                case 8:
-                        return 0x03;
-                case 12:
-                        return 0x07;
-                default:
-                        return 0x02;
-        }
-}
-
-
-
 static __inline__ int round_div(int num, int den)
 {
         return (num + (den / 2)) / den;
diff -L drivers/video/radeonfb.c.old -puN /dev/null /dev/null
diff -puN drivers/video/tdfxfb.c~video-drivers-remove-unused-functions-fwd drivers/video/tdfxfb.c
--- 25/drivers/video/tdfxfb.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/tdfxfb.c	Thu Dec  9 13:36:50 2004
@@ -210,41 +210,21 @@ static char *mode_option __initdata = NU
 
 #ifdef VGA_REG_IO 
 static inline  u8 vga_inb(struct tdfx_par *par, u32 reg) { return inb(reg); }
-static inline u16 vga_inw(struct tdfx_par *par, u32 reg) { return inw(reg); }
-static inline u16 vga_inl(struct tdfx_par *par, u32 reg) { return inl(reg); }
 
 static inline void vga_outb(struct tdfx_par *par, u32 reg,  u8 val) { outb(val, reg); }
-static inline void vga_outw(struct tdfx_par *par, u32 reg, u16 val) { outw(val, reg); }
-static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) { outl(val, reg); }
 #else
 static inline  u8 vga_inb(struct tdfx_par *par, u32 reg) { 
 	return inb(par->iobase + reg - 0x300); 
 }
-static inline u16 vga_inw(struct tdfx_par *par, u32 reg) { 
-	return inw(par->iobase + reg - 0x300); 
-}
-static inline u16 vga_inl(struct tdfx_par *par, u32 reg) { 
-	return inl(par->iobase + reg - 0x300); 
-}
 static inline void vga_outb(struct tdfx_par *par, u32 reg,  u8 val) { 
 	outb(val, par->iobase + reg - 0x300); 
 }
-static inline void vga_outw(struct tdfx_par *par, u32 reg, u16 val) { 
-	outw(val, par->iobase + reg - 0x300); 
-}
-static inline void vga_outl(struct tdfx_par *par, u32 reg, u32 val) { 
-	outl(val, par->iobase + reg - 0x300); 
-}
 #endif
 
 static inline void gra_outb(struct tdfx_par *par, u32 idx, u8 val) {
 	vga_outb(par, GRA_I, idx); vga_outb(par, GRA_D, val);
 }
 
-static inline u8 gra_inb(struct tdfx_par *par, u32 idx) {
-	vga_outb(par, GRA_I, idx); return vga_inb(par, GRA_D);
-}
-
 static inline void seq_outb(struct tdfx_par *par, u32 idx, u8 val) {
 	vga_outb(par, SEQ_I, idx); vga_outb(par, SEQ_D, val);
 }
@@ -270,15 +250,6 @@ static inline void att_outb(struct tdfx_
 	vga_outb(par, ATT_IW, val);
 }
 
-static inline u8 att_inb(struct tdfx_par *par, u32 idx) 
-{
-	unsigned char tmp;
-
-	tmp = vga_inb(par, IS1_R);
-	vga_outb(par, ATT_IW, idx);
-	return vga_inb(par, ATT_IW);
-}
-
 static inline void vga_disable_video(struct tdfx_par *par)
 {
 	unsigned char s;
@@ -299,12 +270,6 @@ static inline void vga_enable_video(stru
 	seq_outb(par, 0x00, 0x03);
 }
 
-static inline void vga_disable_palette(struct tdfx_par *par)
-{
-	vga_inb(par, IS1_R);
-	vga_outb(par, ATT_IW, 0x00);
-}
-
 static inline void vga_enable_palette(struct tdfx_par *par)
 {
 	vga_inb(par, IS1_R);
diff -L drivers/video/tdfxfb.c.old -puN /dev/null /dev/null
diff -puN drivers/video/tridentfb.c~video-drivers-remove-unused-functions-fwd drivers/video/tridentfb.c
--- 25/drivers/video/tridentfb.c~video-drivers-remove-unused-functions-fwd	Thu Dec  9 13:36:50 2004
+++ 25-akpm/drivers/video/tridentfb.c	Thu Dec  9 13:36:50 2004
@@ -523,13 +523,6 @@ static inline void writeAttr(int reg, un
 	t_outb(val, 0x3C0);
 }
 
-static inline unsigned char readAttr(int reg)
-{
-	readb(((struct tridentfb_par *)fb_info.par)->io_virt + CRT + 0x0A);	//flip-flop to index
-	t_outb(reg, 0x3C0);
-	return t_inb(0x3C1);
-}
-
 static inline void write3CE(int reg, unsigned char val)
 {
 	t_outb(reg, 0x3CE);
diff -L drivers/video/tridentfb.c.old -puN /dev/null /dev/null
_
