
From: Gerd Knorr <kraxel@bytesex.org>

This patch only makes code that is neither mentioned in a header file nor
declared extern in another file static.

Additionally, it does remove the unused function stradis_driver from stradis.c
(or what should the comment mean?).

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

 25-akpm/drivers/media/video/bt819.c                 |    2 +-
 25-akpm/drivers/media/video/bttv-cards.c            |   20 ++++++++++----------
 25-akpm/drivers/media/video/bttv-driver.c           |    6 +++---
 25-akpm/drivers/media/video/bttv-i2c.c              |    2 +-
 25-akpm/drivers/media/video/bw-qcam.c               |    8 ++++----
 25-akpm/drivers/media/video/c-qcam.c                |    4 ++--
 25-akpm/drivers/media/video/dpc7146.c               |    7 +++----
 25-akpm/drivers/media/video/hexium_orion.c          |    4 ++--
 25-akpm/drivers/media/video/mxb.c                   |    4 ++--
 25-akpm/drivers/media/video/mxb.h                   |    2 +-
 25-akpm/drivers/media/video/pms.c                   |    2 +-
 25-akpm/drivers/media/video/saa7134/saa7134-core.c  |    2 +-
 25-akpm/drivers/media/video/saa7134/saa7134-video.c |   14 +++++++-------
 25-akpm/drivers/media/video/stradis.c               |    7 -------
 25-akpm/drivers/media/video/tuner-3036.c            |    4 ++--
 15 files changed, 40 insertions(+), 48 deletions(-)

diff -puN drivers/media/video/bt819.c~drivers-media-video-the-easy-cleanups drivers/media/video/bt819.c
--- 25/drivers/media/video/bt819.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/bt819.c	Fri Nov 19 15:23:53 2004
@@ -95,7 +95,7 @@ struct timing {
 };
 
 /* for values, see the bt819 datasheet */
-struct timing timing_data[] = {
+static struct timing timing_data[] = {
 	{864 - 24, 20, 625 - 2, 1, 0x0504, 0x0000},
 	{858 - 24, 20, 525 - 2, 1, 0x00f8, 0x0000},
 };
diff -puN drivers/media/video/bttv-cards.c~drivers-media-video-the-easy-cleanups drivers/media/video/bttv-cards.c
--- 25/drivers/media/video/bttv-cards.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/bttv-cards.c	Fri Nov 19 15:23:53 2004
@@ -2158,7 +2158,7 @@ struct tvcard bttv_tvcards[] = {
 	// .has_remote     = 1,
 }};
 
-const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
+static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards);
 
 /* ----------------------------------------------------------------------- */
 
@@ -2327,10 +2327,10 @@ static void flyvideo_gpio(struct bttv *b
 	//todo: if(has_tda9874) btv->audio_hook = fv2000s_audio;
 }
 
-int miro_tunermap[] = { 0,6,2,3,   4,5,6,0,  3,0,4,5,  5,2,16,1,
-			14,2,17,1, 4,1,4,3,  1,2,16,1, 4,4,4,4 };
-int miro_fmtuner[]  = { 0,0,0,0,   0,0,0,0,  0,0,0,0,  0,0,0,1,
-			1,1,1,1,   1,1,1,0,  0,0,0,0,  0,1,0,0 };
+static int miro_tunermap[] = { 0,6,2,3,   4,5,6,0,  3,0,4,5,  5,2,16,1,
+			       14,2,17,1, 4,1,4,3,  1,2,16,1, 4,4,4,4 };
+static int miro_fmtuner[]  = { 0,0,0,0,   0,0,0,0,  0,0,0,0,  0,0,0,1,
+			       1,1,1,1,   1,1,1,0,  0,0,0,0,  0,1,0,0 };
 
 static void miro_pinnacle_gpio(struct bttv *btv)
 {
@@ -3072,7 +3072,7 @@ static void __devinit osprey_eeprom(stru
 /* ----------------------------------------------------------------------- */
 /* AVermedia specific stuff, from  bktr_card.c                             */
 
-int tuner_0_table[] = {
+static int tuner_0_table[] = {
         TUNER_PHILIPS_NTSC,  TUNER_PHILIPS_PAL /* PAL-BG*/,
         TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL /* PAL-I*/,
         TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL,
@@ -3087,7 +3087,7 @@ int tuner_0_fm_table[] = {
         PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
 #endif
 
-int tuner_1_table[] = {
+static int tuner_1_table[] = {
         TUNER_TEMIC_NTSC,  TUNER_TEMIC_PAL,
 	TUNER_TEMIC_PAL,   TUNER_TEMIC_PAL,
 	TUNER_TEMIC_PAL,   TUNER_TEMIC_PAL,
@@ -3281,7 +3281,7 @@ static void __devinit init_PXC200(struct
  * Brutally hacked by Dan Sheridan <dan.sheridan@contact.org.uk> djs52 8/3/00
  */
 
-void bus_low(struct bttv *btv, int bit)
+static void bus_low(struct bttv *btv, int bit)
 {
 	if (btv->mbox_ior) {
 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
@@ -3298,7 +3298,7 @@ void bus_low(struct bttv *btv, int bit)
 	}
 }
 
-void bus_high(struct bttv *btv, int bit)
+static void bus_high(struct bttv *btv, int bit)
 {
 	if (btv->mbox_ior) {
 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
@@ -3315,7 +3315,7 @@ void bus_high(struct bttv *btv, int bit)
 	}
 }
 
-int bus_in(struct bttv *btv, int bit)
+static int bus_in(struct bttv *btv, int bit)
 {
 	if (btv->mbox_ior) {
 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
diff -puN drivers/media/video/bttv-driver.c~drivers-media-video-the-easy-cleanups drivers/media/video/bttv-driver.c
--- 25/drivers/media/video/bttv-driver.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/bttv-driver.c	Fri Nov 19 15:23:53 2004
@@ -619,7 +619,7 @@ static const struct v4l2_queryctrl bttv_
 	}
 
 };
-const int BTTV_CTLS = ARRAY_SIZE(bttv_ctls);
+static const int BTTV_CTLS = ARRAY_SIZE(bttv_ctls);
 
 /* ----------------------------------------------------------------------- */
 /* resource management                                                     */
@@ -755,7 +755,7 @@ static void set_pll(struct bttv *btv)
 }
 
 /* used to switch between the bt848's analog/digital video capture modes */
-void bt848A_set_timing(struct bttv *btv)
+static void bt848A_set_timing(struct bttv *btv)
 {
 	int i, len;
 	int table_idx = bttv_tvnorms[btv->tvnorm].sram;
@@ -3030,7 +3030,7 @@ static struct video_device bttv_video_te
 	.minor    = -1,
 };
 
-struct video_device bttv_vbi_template =
+static struct video_device bttv_vbi_template =
 {
 	.name     = "bt848/878 vbi",
 	.type     = VID_TYPE_TUNER|VID_TYPE_TELETEXT,
diff -puN drivers/media/video/bttv-i2c.c~drivers-media-video-the-easy-cleanups drivers/media/video/bttv-i2c.c
--- 25/drivers/media/video/bttv-i2c.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/bttv-i2c.c	Fri Nov 19 15:23:53 2004
@@ -244,7 +244,7 @@ bttv_i2c_readbytes(struct bttv *btv, con
        	return retval;
 }
 
-int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
+static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num)
 {
 	struct bttv *btv = i2c_get_adapdata(i2c_adap);
 	int retval = 0;
diff -puN drivers/media/video/bw-qcam.c~drivers-media-video-the-easy-cleanups drivers/media/video/bw-qcam.c
--- 25/drivers/media/video/bw-qcam.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/bw-qcam.c	Fri Nov 19 15:23:53 2004
@@ -441,7 +441,7 @@ static int qc_setscanmode(struct qcam_de
 /* Reset the QuickCam and program for brightness, contrast,
  * white-balance, and resolution. */
 
-void qc_set(struct qcam_device *q)
+static void qc_set(struct qcam_device *q)
 {
 	int val;
 	int val2;
@@ -591,7 +591,7 @@ static inline int qc_readbytes(struct qc
  * n=2^(bit depth)-1.  Ask me for more details if you don't understand
  * this. */
 
-long qc_capture(struct qcam_device * q, char __user *buf, unsigned long len)
+static long qc_capture(struct qcam_device * q, char __user *buf, unsigned long len)
 {
 	int i, j, k, yield;
 	int bytes;
@@ -891,7 +891,7 @@ static struct video_device qcam_template
 static struct qcam_device *qcams[MAX_CAMS];
 static unsigned int num_cams = 0;
 
-int init_bwqcam(struct parport *port)
+static int init_bwqcam(struct parport *port)
 {
 	struct qcam_device *qcam;
 
@@ -934,7 +934,7 @@ int init_bwqcam(struct parport *port)
 	return 0;
 }
 
-void close_bwqcam(struct qcam_device *qcam)
+static void close_bwqcam(struct qcam_device *qcam)
 {
 	video_unregister_device(&qcam->vdev);
 	parport_unregister_device(qcam->pdev);
diff -puN drivers/media/video/c-qcam.c~drivers-media-video-the-easy-cleanups drivers/media/video/c-qcam.c
--- 25/drivers/media/video/c-qcam.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/c-qcam.c	Fri Nov 19 15:23:53 2004
@@ -741,7 +741,7 @@ static struct qcam_device *qcam_init(str
 static struct qcam_device *qcams[MAX_CAMS];
 static unsigned int num_cams = 0;
 
-int init_cqcam(struct parport *port)
+static int init_cqcam(struct parport *port)
 {
 	struct qcam_device *qcam;
 
@@ -798,7 +798,7 @@ int init_cqcam(struct parport *port)
 	return 0;
 }
 
-void close_cqcam(struct qcam_device *qcam)
+static void close_cqcam(struct qcam_device *qcam)
 {
 	video_unregister_device(&qcam->vdev);
 	parport_unregister_device(qcam->pdev);
diff -puN drivers/media/video/dpc7146.c~drivers-media-video-the-easy-cleanups drivers/media/video/dpc7146.c
--- 25/drivers/media/video/dpc7146.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/dpc7146.c	Fri Nov 19 15:23:53 2004
@@ -58,8 +58,7 @@ static int debug = 0;
 MODULE_PARM(debug,"i");
 MODULE_PARM_DESC(debug, "debug verbosity");
 
-/* global variables */
-int dpc_num = 0;
+static int dpc_num = 0;
 
 #define DPC_INPUTS	2
 static struct v4l2_input dpc_inputs[DPC_INPUTS] = {
@@ -379,7 +378,7 @@ static struct saa7146_extension extensio
 	.irq_func	= NULL,
 };	
 
-int __init dpc_init_module(void) 
+static int __init dpc_init_module(void)
 {
 	if( 0 != saa7146_register_extension(&extension)) {
 		DEB_S(("failed to register extension.\n"));
@@ -389,7 +388,7 @@ int __init dpc_init_module(void) 
 	return 0;
 }
 
-void __exit dpc_cleanup_module(void) 
+static void __exit dpc_cleanup_module(void)
 {
 	saa7146_unregister_extension(&extension);
 }
diff -puN drivers/media/video/hexium_orion.c~drivers-media-video-the-easy-cleanups drivers/media/video/hexium_orion.c
--- 25/drivers/media/video/hexium_orion.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/hexium_orion.c	Fri Nov 19 15:23:53 2004
@@ -499,7 +499,7 @@ static struct saa7146_extension extensio
 	.irq_func = NULL,
 };
 
-int __init hexium_init_module(void)
+static int __init hexium_init_module(void)
 {
 	if (0 != saa7146_register_extension(&extension)) {
 		DEB_S(("failed to register extension.\n"));
@@ -509,7 +509,7 @@ int __init hexium_init_module(void)
 	return 0;
 }
 
-void __exit hexium_cleanup_module(void)
+static void __exit hexium_cleanup_module(void)
 {
 	saa7146_unregister_extension(&extension);
 }
diff -puN drivers/media/video/mxb.c~drivers-media-video-the-easy-cleanups drivers/media/video/mxb.c
--- 25/drivers/media/video/mxb.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/mxb.c	Fri Nov 19 15:23:53 2004
@@ -1012,7 +1012,7 @@ static struct saa7146_extension extensio
 	.irq_func	= NULL,
 };	
 
-int __init mxb_init_module(void) 
+static int __init mxb_init_module(void)
 {
 	if( 0 != saa7146_register_extension(&extension)) {
 		DEB_S(("failed to register extension.\n"));
@@ -1022,7 +1022,7 @@ int __init mxb_init_module(void) 
 	return 0;
 }
 
-void __exit mxb_cleanup_module(void) 
+static void __exit mxb_cleanup_module(void)
 {
 	saa7146_unregister_extension(&extension);
 }
diff -puN drivers/media/video/mxb.h~drivers-media-video-the-easy-cleanups drivers/media/video/mxb.h
--- 25/drivers/media/video/mxb.h~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/mxb.h	Fri Nov 19 15:23:53 2004
@@ -12,7 +12,7 @@
 
 /* these are the available audio sources, which can switched
    to the line- and cd-output individually */
-struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
+static struct v4l2_audio mxb_audios[MXB_AUDIOS] = {
 	    {
 		.index	= 0,
 		.name	= "Tuner",
diff -puN drivers/media/video/pms.c~drivers-media-video-the-easy-cleanups drivers/media/video/pms.c
--- 25/drivers/media/video/pms.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/pms.c	Fri Nov 19 15:23:53 2004
@@ -896,7 +896,7 @@ static struct video_device pms_template=
 	.fops           = &pms_fops,
 };
 
-struct pms_device pms_device;
+static struct pms_device pms_device;
 
 
 /*
diff -puN drivers/media/video/saa7134/saa7134-core.c~drivers-media-video-the-easy-cleanups drivers/media/video/saa7134/saa7134-core.c
--- 25/drivers/media/video/saa7134/saa7134-core.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/saa7134/saa7134-core.c	Fri Nov 19 15:23:53 2004
@@ -225,7 +225,7 @@ static void dump_statusregs(struct saa71
 /* ------------------------------------------------------------------ */
 
 /* nr of (saa7134-)pages for the given buffer size */
-int saa7134_buffer_pages(int size)
+static int saa7134_buffer_pages(int size)
 {
 	size  = PAGE_ALIGN(size);
 	size += PAGE_SIZE; /* for non-page-aligned buffers */
diff -puN drivers/media/video/saa7134/saa7134-video.c~drivers-media-video-the-easy-cleanups drivers/media/video/saa7134/saa7134-video.c
--- 25/drivers/media/video/saa7134/saa7134-video.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/saa7134/saa7134-video.c	Fri Nov 19 15:23:53 2004
@@ -1378,7 +1378,7 @@ video_mmap(struct file *file, struct vm_
 
 /* ------------------------------------------------------------------ */
 
-void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
+static void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
 {
 	struct saa7134_tvnorm *norm = dev->tvnorm;
 
@@ -1401,8 +1401,8 @@ void saa7134_vbi_fmt(struct saa7134_dev 
 #endif
 }
 
-int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
-		  struct v4l2_format *f)
+static int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+			 struct v4l2_format *f)
 {
 	switch (f->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
@@ -1427,8 +1427,8 @@ int saa7134_g_fmt(struct saa7134_dev *de
 	}
 }
 
-int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
-		    struct v4l2_format *f)
+static int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+			   struct v4l2_format *f)
 {
 	int err;
 
@@ -1492,8 +1492,8 @@ int saa7134_try_fmt(struct saa7134_dev *
 	}
 }
 
-int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
-		  struct v4l2_format *f)
+static int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
+			 struct v4l2_format *f)
 {
 	unsigned long flags;
 	int err;
diff -puN drivers/media/video/stradis.c~drivers-media-video-the-easy-cleanups drivers/media/video/stradis.c
--- 25/drivers/media/video/stradis.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/stradis.c	Fri Nov 19 15:23:53 2004
@@ -97,13 +97,6 @@ MODULE_LICENSE("GPL");
 #define debAudio	(NewCard ? nDebAudio : oDebAudio)
 #define debDMA		(NewCard ? nDebDMA : oDebDMA)
 
-#ifdef DEBUG
-int stradis_driver(void)	/* for the benefit of ksymoops */
-{
-	return 1;
-}
-#endif
-
 #ifdef USE_RESCUE_EEPROM_SDM275
 static unsigned char rescue_eeprom[64] = {
 0x00,0x01,0x04,0x13,0x26,0x0f,0x10,0x00,0x00,0x00,0x43,0x63,0x22,0x01,0x29,0x15,0x73,0x00,0x1f, 'd', 'e', 'c', 'x', 'l', 'd', 'v', 'a',0x02,0x00,0x01,0x00,0xcc,0xa4,0x63,0x09,0xe2,0x10,0x00,0x0a,0x00,0x02,0x02, 'd', 'e', 'c', 'x', 'l', 'a',0x00,0x00,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
diff -puN drivers/media/video/tuner-3036.c~drivers-media-video-the-easy-cleanups drivers/media/video/tuner-3036.c
--- 25/drivers/media/video/tuner-3036.c~drivers-media-video-the-easy-cleanups	Fri Nov 19 15:23:53 2004
+++ 25-akpm/drivers/media/video/tuner-3036.c	Fri Nov 19 15:23:53 2004
@@ -197,14 +197,14 @@ static struct i2c_client client_template
 	.name		= "SAB3036",
 };
 
-int __init
+static int __init
 tuner3036_init(void)
 {
 	i2c_add_driver(&i2c_driver_tuner);
 	return 0;
 }
 
-void __exit
+static void __exit
 tuner3036_exit(void)
 {
 	i2c_del_driver(&i2c_driver_tuner);
_
