Mon Jan 21 19:49:16 2013 UTC ()
Make internal functions static


(mlelstv)
diff -r1.109 -r1.110 src/sys/dev/ic/vga.c
diff -r1.35 -r1.36 src/sys/dev/ic/vga_raster.c
diff -r1.29 -r1.30 src/sys/dev/ic/vgavar.h

cvs diff -r1.109 -r1.110 src/sys/dev/ic/vga.c (expand / switch to context diff)
--- src/sys/dev/ic/vga.c 2012/08/09 23:56:35 1.109
+++ src/sys/dev/ic/vga.c 2013/01/21 19:49:15 1.110
@@ -1,4 +1,4 @@
-/* $NetBSD: vga.c,v 1.109 2012/08/09 23:56:35 uwe Exp $ */
+/* $NetBSD: vga.c,v 1.110 2013/01/21 19:49:15 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.109 2012/08/09 23:56:35 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.110 2013/01/21 19:49:15 mlelstv Exp $");
 
 /* for WSCONS_SUPPORT_PCVTFONTS */
 #include "opt_wsdisplay_compat.h"
@@ -111,23 +111,23 @@
 static struct vgascreen vga_console_screen;
 static struct vga_config vga_console_vc;
 
-struct egavga_font *egavga_getfont(struct vga_config *, struct vgascreen *,
+static struct egavga_font *egavga_getfont(struct vga_config *, struct vgascreen *,
 				   const char *, int);
-void egavga_unreffont(struct vga_config *, struct egavga_font *);
+static void egavga_unreffont(struct vga_config *, struct egavga_font *);
 
-int vga_selectfont(struct vga_config *, struct vgascreen *, const char *,
+static int vga_selectfont(struct vga_config *, struct vgascreen *, const char *,
 				   const char *);
-void vga_init_screen(struct vga_config *, struct vgascreen *,
+static void vga_init_screen(struct vga_config *, struct vgascreen *,
 		     const struct wsscreen_descr *, int, long *);
-void vga_init(struct vga_config *, bus_space_tag_t, bus_space_tag_t);
+static void vga_init(struct vga_config *, bus_space_tag_t, bus_space_tag_t);
 static void vga_setfont(struct vga_config *, struct vgascreen *);
 
 static int vga_mapchar(void *, int, unsigned int *);
-void vga_putchar(void *, int, int, u_int, long);
+static void vga_putchar(void *, int, int, u_int, long);
 static int vga_allocattr(void *, int, int, int, long *);
 static void vga_copyrows(void *, int, int, int);
 #ifdef WSDISPLAY_SCROLLSUPPORT
-void vga_scroll (void *, void *, int);
+static void vga_scroll (void *, void *, int);
 #endif
 
 const struct wsdisplay_emulops vga_emulops = {
@@ -287,8 +287,11 @@
 static int	vga_setborder(struct vga_config *, u_int);
 #endif /* WSDISPLAY_CUSTOM_BORDER */
 
-void vga_doswitch(struct vga_config *);
+static void vga_doswitch(struct vga_config *);
+static void    vga_save_palette(struct vga_config *);
+static void    vga_restore_palette(struct vga_config *);
 
+
 const struct wsdisplay_accessops vga_accessops = {
 	vga_ioctl,
 	vga_mmap,
@@ -315,7 +318,7 @@
 	f->wsfont->encoding == WSDISPLAY_FONTENC_ISO7 || \
 	f->wsfont->encoding == WSDISPLAY_FONTENC_KOI8_R)
 
-struct egavga_font *
+static struct egavga_font *
 egavga_getfont(struct vga_config *vc, struct vgascreen *scr, const char *name,
 	       int primary)
 {
@@ -376,7 +379,7 @@
 	return (f);
 }
 
-void
+static void
 egavga_unreffont(struct vga_config *vc, struct egavga_font *f)
 {
 
@@ -398,7 +401,7 @@
 	}
 }
 
-int
+static int
 vga_selectfont(struct vga_config *vc, struct vgascreen *scr, const char *name1,
 	       const char *name2)
 {
@@ -437,7 +440,7 @@
 	return (0);
 }
 
-void
+static void
 vga_init_screen(struct vga_config *vc, struct vgascreen *scr,
 		const struct wsscreen_descr *type, int existing, long *attrp)
 {
@@ -523,7 +526,7 @@
 	LIST_INSERT_HEAD(&vc->screens, scr, next);
 }
 
-void
+static void
 vga_init(struct vga_config *vc, bus_space_tag_t iot, bus_space_tag_t memt)
 {
 	struct vga_handle *vh = &vc->hdl;
@@ -775,7 +778,7 @@
 	vga_ts_write(&vc->hdl, syncreset, 0x03);
 }
 
-int
+static int
 vga_ioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	struct vga_config *vc = v;
@@ -858,7 +861,7 @@
 	return ((*vf->vf_mmap)(v, offset, prot));
 }
 
-int
+static int
 vga_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
 		 int *curxp, int *curyp, long *defattrp)
 {
@@ -893,7 +896,7 @@
 	return (0);
 }
 
-void
+static void
 vga_free_screen(void *v, void *cookie)
 {
 	struct vgascreen *vs = cookie;
@@ -973,7 +976,7 @@
 	}
 }
 
-int
+static int
 vga_show_screen(void *v, void *cookie, int waitok,
 		void (*cb)(void *, int, int), void *cbarg)
 {
@@ -998,7 +1001,7 @@
 	return (0);
 }
 
-void
+static void
 vga_doswitch(struct vga_config *vc)
 {
 	struct vgascreen *scr, *oldscr;
@@ -1452,7 +1455,7 @@
 }
 
 #ifdef WSDISPLAY_SCROLLSUPPORT
-void
+static void
 vga_scroll(void *v, void *cookie, int lines)
 {
 	struct vga_config *vc = v;
@@ -1494,7 +1497,7 @@
 }
 #endif
 
-void
+static void
 vga_putchar(void *c, int row, int col, u_int uc, long attr)
 {
 
@@ -1550,7 +1553,7 @@
 #endif
 }
 
-void
+static void
 vga_save_palette(struct vga_config *vc)
 {
 	struct vga_handle *vh = &vc->hdl;
@@ -1568,7 +1571,7 @@
 	vga_reset_state(vh);			/* reset flip/flop */
 }
 
-void
+static void
 vga_restore_palette(struct vga_config *vc)
 {
 	struct vga_handle *vh = &vc->hdl;

cvs diff -r1.35 -r1.36 src/sys/dev/ic/vga_raster.c (expand / switch to context diff)
--- src/sys/dev/ic/vga_raster.c 2012/01/11 20:41:28 1.35
+++ src/sys/dev/ic/vga_raster.c 2013/01/21 19:49:15 1.36
@@ -1,4 +1,4 @@
-/*	$NetBSD: vga_raster.c,v 1.35 2012/01/11 20:41:28 macallan Exp $	*/
+/*	$NetBSD: vga_raster.c,v 1.36 2013/01/21 19:49:15 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.35 2012/01/11 20:41:28 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.36 2013/01/21 19:49:15 mlelstv Exp $");
 
 #include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
 
@@ -372,7 +372,7 @@
 	return (0);
 }
 
-void
+static void
 vga_raster_init(struct vga_config *vc, bus_space_tag_t iot,
     bus_space_tag_t memt)
 {
@@ -439,7 +439,7 @@
 	LIST_INSERT_HEAD(&vc->vc_fontlist, vf, next);
 }
 
-void
+static void
 vga_raster_init_screen(struct vga_config *vc, struct vgascreen *scr,
     const struct wsscreen_descr *type, int existing, long *attrp)
 {
@@ -684,7 +684,7 @@
 	return ((*vf->vf_mmap)(v, offset, prot));
 }
 
-int
+static int
 vga_raster_alloc_screen(void *v, const struct wsscreen_descr *type,
     void **cookiep, int *curxp, int *curyp, long *defattrp)
 {
@@ -715,7 +715,7 @@
 	return (0);
 }
 
-void
+static void
 vga_raster_free_screen(void *v, void *cookie)
 {
 	struct vgascreen *vs = cookie;
@@ -732,7 +732,7 @@
 		vc->active = 0;
 }
 
-int
+static int
 vga_raster_show_screen(void *v, void *cookie, int waitok,
     void (*cb)(void *, int, int), void *cbarg)
 {
@@ -757,7 +757,7 @@
 	return (0);
 }
 
-void
+static void
 vga_switch_screen(struct vga_config *vc)
 {
 	struct vgascreen *scr, *oldscr;
@@ -829,7 +829,7 @@
 	return (0);
 }
 
-void
+static void
 vga_raster_setup_font(struct vga_config *vc, struct vgascreen *scr)
 {
 	struct vga_raster_font *vf;
@@ -864,7 +864,7 @@
 	LIST_INSERT_HEAD(&scr->fontset, vf, next);
 }
 
-void
+static void
 vga_setup_regs(struct videomode *mode, struct vga_moderegs *regs)
 {
 	int i;
@@ -989,7 +989,7 @@
 	regs->atc[20] = 0x00;
 }
 
-void
+static void
 vga_set_mode(struct vga_handle *vh, struct vga_moderegs *regs)
 {
 	int i;
@@ -1027,7 +1027,7 @@
 	vga_ts_write(vh, mode, vga_ts_read(vh, mode) & ~VGA_TS_MODE_BLANK);
 }
 
-void
+static void
 vga_raster_cursor_init(struct vgascreen *scr, int existing)
 {
 	struct vga_handle *vh = scr->hdl;
@@ -1058,7 +1058,7 @@
 	scr->cursoron = 1;
 }
 
-void
+static void
 vga_raster_cursor(void *id, int on, int row, int col)
 {
 	struct vgascreen *scr = id;
@@ -1118,7 +1118,7 @@
 	}
 }
 
-void
+static void
 vga_raster_putchar(void *id, int row, int col, u_int c, long attr)
 {
 	struct vgascreen *scr = id;
@@ -1251,7 +1251,7 @@
 	}
 }
 
-void
+static void
 vga_raster_copycols(void *id, int row, int srccol, int dstcol, int ncols)
 {
 	struct vgascreen *scr = id;
@@ -1281,7 +1281,7 @@
 	}
 }
 
-void
+static void
 vga_raster_erasecols(void *id, int row, int startcol, int ncols, long fillattr)
 {
 	struct vgascreen *scr = id;
@@ -1294,7 +1294,7 @@
 		vga_raster_putchar(id, row, i, ' ', fillattr);
 }
 
-void
+static void
 vga_raster_copyrows(void *id, int srcrow, int dstrow, int nrows)
 {
 	struct vgascreen *scr = id;
@@ -1352,7 +1352,7 @@
 	    nrows * ncols * sizeof(struct vga_scrmem));
 }
 
-void
+static void
 vga_raster_eraserows(void *id, int startrow, int nrows, long fillattr)
 {
 	struct vgascreen *scr = id;
@@ -1431,7 +1431,7 @@
 	return (0);
 }
 
-void
+static void
 vga_restore_screen(struct vgascreen *scr,
     const struct wsscreen_descr *type, struct vga_scrmem *mem)
 {
@@ -1451,7 +1451,7 @@
 	scr->encoding = tmp;
 }
 
-void
+static void
 vga_raster_setscreentype(struct vga_config *vc,
     const struct wsscreen_descr *type)
 {
@@ -1463,7 +1463,7 @@
 }
 
 #ifdef WSDISPLAY_CUSTOM_OUTPUT
-void
+static void
 vga_raster_replaceattr(void *id, long oldattr, long newattr)
 {
 	struct vgascreen *scr = id;

cvs diff -r1.29 -r1.30 src/sys/dev/ic/vgavar.h (expand / switch to context diff)
--- src/sys/dev/ic/vgavar.h 2010/12/09 23:33:30 1.29
+++ src/sys/dev/ic/vgavar.h 2013/01/21 19:49:15 1.30
@@ -1,4 +1,4 @@
-/* $NetBSD: vgavar.h,v 1.29 2010/12/09 23:33:30 christos Exp $ */
+/* $NetBSD: vgavar.h,v 1.30 2013/01/21 19:49:15 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -217,7 +217,5 @@
 #endif /* !VGA_RASTERCONSOLE */
 void	vga_reset(struct vga_handle *, void (*)(struct vga_handle *));
 void	vga_initregs(struct vga_handle *);
-void	vga_save_palette(struct vga_config *);
-void	vga_restore_palette(struct vga_config *);
 
 extern int vga_no_builtinfont;