Adhere to Linux kernel coding style. Reported by checkpatch: Avoid CamelCase: Rename variables and functions in ddk750_sii164.c which cause styleproblem. Signed-off-by: Dalvin-Ehinoma Noah Aiguobas <pharcodra@xxxxxxxxx> --- drivers/staging/sm750fb/ddk750_sii164.c | 104 ++++++++++++------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c index 3da1796cd7aa..4b8f9e617a91 100644 --- a/drivers/staging/sm750fb/ddk750_sii164.c +++ b/drivers/staging/sm750fb/ddk750_sii164.c @@ -12,11 +12,11 @@ #define USE_HW_I2C #ifdef USE_HW_I2C - #define i2cWriteReg sm750_hw_i2c_write_reg - #define i2cReadReg sm750_hw_i2c_read_reg + #define i2c_write_reg sm750_hw_i2c_write_reg + #define i2c_read_reg sm750_hw_i2c_read_reg #else - #define i2cWriteReg sm750_sw_i2c_write_reg - #define i2cReadReg sm750_sw_i2c_read_reg + #define i2c_write_reg sm750_sw_i2c_write_reg + #define i2c_read_reg sm750_sw_i2c_read_reg #endif /* SII164 Vendor and Device ID */ @@ -25,7 +25,7 @@ #ifdef SII164_FULL_FUNCTIONS /* Name of the DVI Controller chip */ -static char *gDviCtrlChipName = "Silicon Image SiI 164"; +static char *g_dvi_ctrl_chip_name = "Silicon Image SiI 164"; #endif /* @@ -37,14 +37,14 @@ static char *gDviCtrlChipName = "Silicon Image SiI 164"; */ unsigned short sii164_get_vendor_id(void) { - unsigned short vendorID; + unsigned short vendor_ID; - vendorID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS, + vendor_ID = ((unsigned short)i2c_read_reg(SII164_I2C_ADDRESS, SII164_VENDOR_ID_HIGH) << 8) | - (unsigned short)i2cReadReg(SII164_I2C_ADDRESS, + (unsigned short)i2c_read_reg(SII164_I2C_ADDRESS, SII164_VENDOR_ID_LOW); - return vendorID; + return vendor_ID; } /* @@ -56,14 +56,14 @@ unsigned short sii164_get_vendor_id(void) */ unsigned short sii164GetDeviceID(void) { - unsigned short deviceID; + unsigned short device_ID; - deviceID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS, + device_ID = ((unsigned short)i2c_read_reg(SII164_I2C_ADDRESS, SII164_DEVICE_ID_HIGH) << 8) | - (unsigned short)i2cReadReg(SII164_I2C_ADDRESS, + (unsigned short)i2c_read_reg(SII164_I2C_ADDRESS, SII164_DEVICE_ID_LOW); - return deviceID; + return device_ID; } /* @@ -176,7 +176,7 @@ long sii164InitChip(unsigned char edge_select, else config |= SII164_CONFIGURATION_VSYNC_AS_IS; - i2cWriteReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); /* * De-skew enabled with default 111b value. @@ -214,7 +214,7 @@ long sii164InitChip(unsigned char edge_select, config |= SII164_DESKEW_8_STEP; break; } - i2cWriteReg(SII164_I2C_ADDRESS, SII164_DESKEW, config); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_DESKEW, config); /* Enable/Disable Continuous Sync. */ if (continuous_sync_enable == 0) @@ -231,12 +231,12 @@ long sii164InitChip(unsigned char edge_select, /* Set the PLL Filter value */ config |= ((pll_filter_value & 0x07) << 1); - i2cWriteReg(SII164_I2C_ADDRESS, SII164_PLL, config); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_PLL, config); /* Recover from Power Down and enable output. */ - config = i2cReadReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION); + config = i2c_read_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION); config |= SII164_CONFIGURATION_POWER_NORMAL; - i2cWriteReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); return 0; } @@ -269,7 +269,7 @@ void sii164ResetChip(void) */ char *sii164GetChipString(void) { - return gDviCtrlChipName; + return g_dvi_ctrl_chip_name; } /* @@ -279,53 +279,53 @@ char *sii164GetChipString(void) * Input: * powerUp - Flag to set the power down or up */ -void sii164SetPower(unsigned char powerUp) +void sii164SetPower(unsigned char power_up) { unsigned char config; - config = i2cReadReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION); - if (powerUp == 1) { + config = i2c_read_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION); + if (power_up == 1) { /* Power up the chip */ config &= ~SII164_CONFIGURATION_POWER_MASK; config |= SII164_CONFIGURATION_POWER_NORMAL; - i2cWriteReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); } else { /* Power down the chip */ config &= ~SII164_CONFIGURATION_POWER_MASK; config |= SII164_CONFIGURATION_POWER_DOWN; - i2cWriteReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config); } } /* - * sii164SelectHotPlugDetectionMode + * sii164_select_hot_plug_detection_mode * This function selects the mode of the hot plug detection. */ static -void sii164SelectHotPlugDetectionMode(enum sii164_hot_plug_mode hotPlugMode) +void sii164_select_hot_plug_detection_mode(enum sii164_hot_plug_mode hot_plug_mode) { - unsigned char detectReg; + unsigned char detect_reg; - detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & + detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) & ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG; - switch (hotPlugMode) { + switch (hot_plug_mode) { case SII164_HOTPLUG_DISABLE: - detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH; + detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH; break; case SII164_HOTPLUG_USE_MDI: - detectReg &= ~SII164_DETECT_INTERRUPT_MASK; - detectReg |= SII164_DETECT_INTERRUPT_BY_HTPLG_PIN; - detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_MDI; + detect_reg &= ~SII164_DETECT_INTERRUPT_MASK; + detect_reg |= SII164_DETECT_INTERRUPT_BY_HTPLG_PIN; + detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_MDI; break; case SII164_HOTPLUG_USE_RSEN: - detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_RSEN; + detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_RSEN; break; case SII164_HOTPLUG_USE_HTPLG: - detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HTPLG; + detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HTPLG; break; } - i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_DETECT, detect_reg); } /* @@ -334,19 +334,19 @@ void sii164SelectHotPlugDetectionMode(enum sii164_hot_plug_mode hotPlugMode) * * enableHotPlug - Enable (=1) / disable (=0) Hot Plug detection */ -void sii164EnableHotPlugDetection(unsigned char enableHotPlug) +void sii164EnableHotPlugDetection(unsigned char enable_hot_plug) { - unsigned char detectReg; + unsigned char detect_reg; - detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); + detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT); /* Depending on each DVI controller, need to enable the hot plug based * on each individual chip design. */ - if (enableHotPlug != 0) - sii164SelectHotPlugDetectionMode(SII164_HOTPLUG_USE_MDI); + if (enable_hot_plug != 0) + sii164_select_hot_plug_detection_mode(SII164_HOTPLUG_USE_MDI); else - sii164SelectHotPlugDetectionMode(SII164_HOTPLUG_DISABLE); + sii164_select_hot_plug_detection_mode(SII164_HOTPLUG_DISABLE); } /* @@ -359,11 +359,11 @@ void sii164EnableHotPlugDetection(unsigned char enableHotPlug) */ unsigned char sii164IsConnected(void) { - unsigned char hotPlugValue; + unsigned char hot_plug_value; - hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & + hot_plug_value = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_HOT_PLUG_STATUS_MASK; - if (hotPlugValue == SII164_DETECT_HOT_PLUG_STATUS_ON) + if (hot_plug_value == SII164_DETECT_HOT_PLUG_STATUS_ON) return 1; else return 0; @@ -379,11 +379,11 @@ unsigned char sii164IsConnected(void) */ unsigned char sii164CheckInterrupt(void) { - unsigned char detectReg; + unsigned char detect_reg; - detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & + detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_MONITOR_STATE_MASK; - if (detectReg == SII164_DETECT_MONITOR_STATE_CHANGE) + if (detect_reg == SII164_DETECT_MONITOR_STATE_CHANGE) return 1; else return 0; @@ -395,12 +395,12 @@ unsigned char sii164CheckInterrupt(void) */ void sii164ClearInterrupt(void) { - unsigned char detectReg; + unsigned char detect_reg; /* Clear the MDI interrupt */ - detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); - i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, - detectReg | SII164_DETECT_MONITOR_STATE_CLEAR); + detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_DETECT, + detect_reg | SII164_DETECT_MONITOR_STATE_CLEAR); } #endif -- 2.25.1