Commit 5651a59c authored by Gerd Knorr's avatar Gerd Knorr Committed by Linus Torvalds

[PATCH] drivers/media/video: the easy cleanups

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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarGerd Knorr <kraxel@bytesex.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a347d60f
......@@ -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},
};
......
......@@ -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,9 +2327,9 @@ static void flyvideo_gpio(struct bttv *btv)
//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,
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 };
int miro_fmtuner[] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1,
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(struct bttv *btv)
/* ----------------------------------------------------------------------- */
/* 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 bttv *btv)
* 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,
......
......@@ -619,7 +619,7 @@ static const struct v4l2_queryctrl bttv_ctls[] = {
}
};
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_template =
.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,
......
......@@ -244,7 +244,7 @@ bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
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;
......
......@@ -441,7 +441,7 @@ static int qc_setscanmode(struct qcam_device *q)
/* 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 qcam_device *q, char buffer[])
* 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);
......
......@@ -741,7 +741,7 @@ static struct qcam_device *qcam_init(struct parport *port)
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);
......
......@@ -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 extension = {
.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);
}
......
......@@ -499,7 +499,7 @@ static struct saa7146_extension extension = {
.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);
}
......
......@@ -1012,7 +1012,7 @@ static struct saa7146_extension extension = {
.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);
}
......
......@@ -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",
......
......@@ -896,7 +896,7 @@ static struct video_device pms_template=
.fops = &pms_fops,
};
struct pms_device pms_device;
static struct pms_device pms_device;
/*
......
......@@ -225,7 +225,7 @@ static void dump_statusregs(struct saa7134_dev *dev)
/* ------------------------------------------------------------------ */
/* 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 */
......
......@@ -1378,7 +1378,7 @@ video_mmap(struct file *file, struct vm_area_struct * vma)
/* ------------------------------------------------------------------ */
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,7 +1401,7 @@ void saa7134_vbi_fmt(struct saa7134_dev *dev, struct v4l2_format *f)
#endif
}
int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
static int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
struct v4l2_format *f)
{
switch (f->type) {
......@@ -1427,7 +1427,7 @@ int saa7134_g_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
}
}
int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
static int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
struct v4l2_format *f)
{
int err;
......@@ -1492,7 +1492,7 @@ int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
}
}
int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
static int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
struct v4l2_format *f)
{
unsigned long flags;
......
......@@ -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,
......
......@@ -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);
......
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