Skip to content

Commit

Permalink
video via: make local variables static
Browse files Browse the repository at this point in the history
Many local variables should be declared static.
Found by sparse, compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
  • Loading branch information
Stephen Hemminger authored and Florian Tobias Schandinat committed Mar 9, 2011
1 parent b65d604 commit 23e5abd
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 59 deletions.
2 changes: 1 addition & 1 deletion drivers/video/via/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ void viafb_unlock_crt(void)
viafb_write_reg_mask(CR47, VIACR, 0, BIT0);
}

void write_dac_reg(u8 index, u8 r, u8 g, u8 b)
static void write_dac_reg(u8 index, u8 r, u8 g, u8 b)
{
outb(index, LUT_INDEX_WRITE);
outb(r, LUT_DATA);
Expand Down
10 changes: 6 additions & 4 deletions drivers/video/via/lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@

/* CLE266 Software Power Sequence */
/* {Mask}, {Data}, {Delay} */
int PowerSequenceOn[3][3] = { {0x10, 0x08, 0x06}, {0x10, 0x08, 0x06},
{0x19, 0x1FE, 0x01} };
int PowerSequenceOff[3][3] = { {0x06, 0x08, 0x10}, {0x00, 0x00, 0x00},
{0xD2, 0x19, 0x01} };
static const int PowerSequenceOn[3][3] = {
{0x10, 0x08, 0x06}, {0x10, 0x08, 0x06}, {0x19, 0x1FE, 0x01}
};
static const int PowerSequenceOff[3][3] = {
{0x06, 0x08, 0x10}, {0x00, 0x00, 0x00}, {0xD2, 0x19, 0x01}
};

static struct _lcd_scaling_factor lcd_scaling_factor = {
/* LCD Horizontal Scaling Factor Register */
Expand Down
2 changes: 1 addition & 1 deletion drivers/video/via/via_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
#define VIAFB_NUM_I2C 5
static struct via_i2c_stuff via_i2c_par[VIAFB_NUM_I2C];
struct viafb_dev *i2c_vdev; /* Passed in from core */
static struct viafb_dev *i2c_vdev; /* Passed in from core */

static void via_i2c_setscl(void *data, int state)
{
Expand Down
6 changes: 3 additions & 3 deletions drivers/video/via/viafbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ static int viafb_second_size;
static int viafb_accel = 1;

/* Added for specifying active devices.*/
char *viafb_active_dev;
static char *viafb_active_dev;

/*Added for specify lcd output port*/
char *viafb_lcd_port = "";
char *viafb_dvi_port = "";
static char *viafb_lcd_port = "";
static char *viafb_dvi_port = "";

static void retrieve_device_setting(struct viafb_ioctl_setting
*setting_info);
Expand Down
Loading

0 comments on commit 23e5abd

Please sign in to comment.