drivers/media/video/: make code static
PATCH 1/1 drivers/media/video/: make code static
This patch makes needlessly global code static.
drivers/media/video/bttv-cards.c | 6 +++--- drivers/media/video/cx25840/cx25840-core.c | 4 ++-- drivers/media/video/em28xx/em28xx-core.c | 6 +++--- drivers/media/video/em28xx/em28xx-video.c | 2 +- drivers/media/video/saa7127.c | 6 +++--- drivers/media/video/saa7134/saa7134-alsa.c | 9 +++++---- drivers/media/video/saa7134/saa7134-oss.c | 4 ++-- 7 files changed, 19 insertions(+), 18 deletions(-)
---
drivers/media/video/em28xx/em28xx-video.c renamed from drivers/media/video/em28xx/em28xx-video.c.old +1 -1
@@ -226,7 +226,7 @@* em28xx_config_i2c() * configure i2c attached devices */ -void em28xx_config_i2c (struct em28xx *dev) +static void em28xx_config_i2c (struct em28xx *dev) {struct v4l2_frequency f;struct video_decoder_init em28xx_vdi = {.data =NULL };
drivers/media/video/saa7134/saa7134-alsa.c renamed from drivers/media/video/saa7134/saa7134-alsa.c.old +5 -4
@@ -58,7 +58,7 @@module_param_array (index, int,NULL ,0444 );MODULE_PARM_DESC (index,"Index value for SAA7134 capture interface(s)." ); -int position; +static int position; #define dprintk(fmt, arg...) if (debug) \ printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ## arg)
@@ -140,7 +140,8 @@* */ -void saa7134_irq_alsa_done (struct saa7134_dev *dev,unsigned long status) +static void saa7134_irq_alsa_done (struct saa7134_dev *dev, +unsigned long status) {int next_blk, reg =0 ;
@@ -881,7 +882,7 @@* */ -int alsa_card_saa7134_create (struct saa7134_dev *dev,int devnum) +static int alsa_card_saa7134_create (struct saa7134_dev *dev,int devnum) {snd_card_t *card;
@@ -994,7 +995,7 @@* Module destructor */ -void saa7134_alsa_exit (void ) +static void saa7134_alsa_exit (void ) {int idx;
drivers/media/video/saa7134/saa7134-oss.c renamed from drivers/media/video/saa7134/saa7134-oss.c.old +2 -2
@@ -899,7 +899,7 @@spin_unlock (&dev->slock); } -int saa7134_dsp_create (struct saa7134_dev *dev) +static int saa7134_dsp_create (struct saa7134_dev *dev) {int err;
@@ -955,7 +955,7 @@ } -void saa7134_oss_exit (void ) +static void saa7134_oss_exit (void ) {struct saa7134_dev *dev =NULL ;struct list_head *list;
drivers/media/video/bttv-cards.c renamed from drivers/media/video/bttv-cards.c.old +3 -3
@@ -2904,7 +2904,7 @@*/ /* Some Modular Technology cards have an eeprom, but no subsystem ID */ -void identify_by_eeprom (struct bttv *btv,unsigned char eeprom_data[256 ]) +static void identify_by_eeprom (struct bttv *btv,unsigned char eeprom_data[256 ]) {int type =-1 ;
@@ -3879,7 +3879,7 @@* error. ERROR_CPLD_Check_Failed. */ /* ----------------------------------------------------------------------- */ -void +static void init_RTV24 (struct bttv *btv) {uint32_t dataRead =0 ;
@@ -4103,7 +4103,7 @@/* ----------------------------------------------------------------------- */ /* winview */ -void winview_audio (struct bttv *btv,struct video_audio *v,int set) +static void winview_audio (struct bttv *btv,struct video_audio *v,int set) {/* PT2254A programming Jon Tombs, [email protected] */ int bits_out, loops, vol, data;
drivers/media/video/cx25840/cx25840-core.c renamed from drivers/media/video/cx25840/cx25840-core.c.old +2 -2
@@ -714,7 +714,7 @@/* ----------------------------------------------------------------------- */ -struct i2c_driver i2c_driver_cx25840; +static struct i2c_driver i2c_driver_cx25840;static int cx25840_detect_client (struct i2c_adapter *adapter,int address,int kind)
@@ -807,7 +807,7 @@/* ----------------------------------------------------------------------- */ -struct i2c_driver i2c_driver_cx25840 = { +static struct i2c_driver i2c_driver_cx25840 = { .name ="cx25840" , .id =I2C_DRIVERID_CX25840 ,
drivers/media/video/em28xx/em28xx-core.c renamed from drivers/media/video/em28xx/em28xx-core.c.old +3 -3
@@ -32,7 +32,7 @@/* #define ENABLE_DEBUG_ISOC_FRAMES */ -unsigned int core_debug; +static unsigned int core_debug;module_param (core_debug,int,0644 );MODULE_PARM_DESC (core_debug,"enable debug messages [core]" );
@@ -41,7 +41,7 @@printk (KERN_INFO "%s %s :" fmt, \ dev->name, __FUNCTION__ , ##arg); } while (0) -unsigned int reg_debug; +static unsigned int reg_debug;module_param (reg_debug,int,0644 );MODULE_PARM_DESC (reg_debug,"enable debug messages [URB reg]" );
@@ -50,7 +50,7 @@printk (KERN_INFO "%s %s :" fmt, \ dev->name, __FUNCTION__ , ##arg); } while (0) -unsigned int isoc_debug; +static unsigned int isoc_debug;module_param (isoc_debug,int,0644 );MODULE_PARM_DESC (isoc_debug,"enable debug messages [isoc transfers]" );
drivers/media/video/saa7127.c renamed from drivers/media/video/saa7127.c.old +3 -3
@@ -223,7 +223,7 @@ };#define SAA7127_50HZ_DAC_CONTROL 0x02 -struct i2c_reg_value saa7127_init_config_50hz[] = { +static struct i2c_reg_value saa7127_init_config_50hz[] = { {SAA7127_REG_BURST_START ,0x21 },/* BURST_END is also used as a chip ID in saa7127_detect_client */ {SAA7127_REG_BURST_END ,0x1d },
@@ -696,7 +696,7 @@/* ----------------------------------------------------------------------- */ -struct i2c_driver i2c_driver_saa7127; +static struct i2c_driver i2c_driver_saa7127;/* ----------------------------------------------------------------------- */
@@ -818,7 +818,7 @@/* ----------------------------------------------------------------------- */ -struct i2c_driver i2c_driver_saa7127 = { +static struct i2c_driver i2c_driver_saa7127 = { .name ="saa7127" , .id =I2C_DRIVERID_SAA7127 , .flags =I2C_DF_NOTIFY ,
Adrian,
Em Dom, 2005-11-20 às 03:44 +0100, Adrian Bunk escreveu:
Quoted 13 lines
This patch makes needlessly global code static.
drivers/media/video/bttv-cards.c | 6 +++--- drivers/media/video/cx25840/cx25840-core.c | 4 ++-- drivers/media/video/em28xx/em28xx-core.c | 6 +++--- drivers/media/video/em28xx/em28xx-video.c | 2 +- drivers/media/video/saa7127.c | 6 +++--- drivers/media/video/saa7134/saa7134-alsa.c | 9 +++++---- drivers/media/video/saa7134/saa7134-oss.c | 4 ++-- 7 files changed, 19 insertions(+), 18 deletions(-)
Quoted 1 line
Signed-off-by Adrian Bunk <[email protected]>
Thanks for your patch.
drivers/media/video/saa7134/saa7134-alsa.c line 61
Quoted 8 lines
drivers/media/video/saa7134/saa7134-alsa.c renamed from drivers/media/video/saa7134/saa7134-alsa.c.old +1
-1@@ -58,7 +58,7 @@module_param_array (index, int,NULL ,0444 );MODULE_PARM_DESC (index,"Index value for SAA7134 capture interface(s)." ); -int position; +static int position;
This didn't applied at V4L tree. This flag was removed at the latest
version. We had already a patch including static on some I2C structs and other trivial fixes.
I'll added your patch with fixes on my tree and send to -mm in the next V4L patchsets, after the patch that removes position and fixes some stuff at saa7134-alsa.
Cheers,
Mauro.
Quoted 14 lines · Adrian Bunk
drivers/media/video/cx25840/cx25840-core.c | 4 ++--drivers/media/video/cx25840/cx25840-core.c renamed from drivers/media/video/cx25840/cx25840-core.c.old +1
-1@@ -714,7 +714,7 @@/* ----------------------------------------------------------------------- */ -struct i2c_driver i2c_driver_cx25840; +static struct i2c_driver i2c_driver_cx25840;static int cx25840_detect_client (struct i2c_adapter *adapter,int address,int kind)
drivers/media/video/cx25840/cx25840-core.c line 813
Quoted 8 lines
drivers/media/video/cx25840/cx25840-core.c renamed from drivers/media/video/cx25840/cx25840-core.c.old +1
-1@@ -807,7 +807,7 @@/* ----------------------------------------------------------------------- */ -struct i2c_driver i2c_driver_cx25840 = { +static struct i2c_driver i2c_driver_cx25840 = { .name ="cx25840" , .id =I2C_DRIVERID_CX25840 ,
Why does it exist twice? Once uninitalized, once intialized? Appearently I miss the point. I also dont find the place where ->command is called.
There are other problems with this driver. If VIDIOC_S_STD gets passed to cx25840_command, set_v4lstd will get a 64bit value as second arg. gcc for ppc generates calls to __ucmpdi2, from libgcc.
Only a few archs implement this function inside the kernel. Maybe this driver should become arm/fvr/h8300 only in 2.6.15?
Signature · 2 lines
short story of a lazy sysadmin: alias appserv=wotan