Change names of macros, according to coding style. Patch upholds compileability. Co-developed-by: Daniel Bauer <daniel.j.bauer@xxxxxx> Signed-off-by: Daniel Bauer <daniel.j.bauer@xxxxxx> Signed-off-by: Sven Leykauf <sven_leykauf1@xxxxxx> --- drivers/staging/sm750fb/ddk750_sii164.c | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c index e70d2048cd62..f36b9e012cd9 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 */ @@ -39,9 +39,9 @@ unsigned short sii164_get_vendor_id(void) { unsigned short vendor_id; - vendor_id = ((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 vendor_id; @@ -58,9 +58,9 @@ unsigned short sii164_get_device_id(void) { unsigned short device_id; - device_id = ((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 device_id; @@ -176,7 +176,7 @@ long sii164_init_chip(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 sii164_init_chip(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 sii164_init_chip(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; } @@ -283,17 +283,17 @@ void sii164_set_power(unsigned char power_up) { unsigned char config; - config = i2cReadReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION); + 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); } } @@ -306,7 +306,7 @@ void sii164_select_hot_plug_detection_mode(enum sii164_hot_plug_mode hot_plug_mo { unsigned char detect_reg; - detect_reg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & + detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) & ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG; switch (hot_plug_mode) { case SII164_HOTPLUG_DISABLE: @@ -325,7 +325,7 @@ void sii164_select_hot_plug_detection_mode(enum sii164_hot_plug_mode hot_plug_mo break; } - i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detect_reg); + i2c_write_reg(SII164_I2C_ADDRESS, SII164_DETECT, detect_reg); } /* @@ -338,7 +338,7 @@ void sii164_enable_hot_plug_detection(unsigned char enable_hot_plug) { unsigned char detect_reg; - detect_reg = 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. @@ -361,7 +361,7 @@ unsigned char sii164_is_connected(void) { unsigned char hot_plug_value; - hot_plug_value = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & + hot_plug_value = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_HOT_PLUG_STATUS_MASK; if (hot_plug_value == SII164_DETECT_HOT_PLUG_STATUS_ON) return 1; @@ -381,7 +381,7 @@ unsigned char sii164_check_interrupt(void) { unsigned char detect_reg; - detect_reg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) & + detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) & SII164_DETECT_MONITOR_STATE_MASK; if (detect_reg == SII164_DETECT_MONITOR_STATE_CHANGE) return 1; @@ -398,9 +398,9 @@ void sii164_clear_interrupt(void) unsigned char detect_reg; /* Clear the MDI interrupt */ - detect_reg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); - i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, - detect_reg | 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.20.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel