staging: sm750fb: Convert camel case to snake case
PATCH 1/1 staging: sm750fb: Convert camel case to snake case
Fix "Avoid CamelCase" checkpatch.pl checks for 106 camel case instances:
--- drivers/staging/sm750fb/ddk750_dvi.c | 32 ++--- drivers/staging/sm750fb/ddk750_dvi.h | 64 +++++----- drivers/staging/sm750fb/ddk750_mode.c | 88 +++++++------- drivers/staging/sm750fb/ddk750_mode.h | 2 +- drivers/staging/sm750fb/ddk750_power.h | 10 +- drivers/staging/sm750fb/ddk750_sii164.c | 152 ++++++++++++------------ drivers/staging/sm750fb/ddk750_sii164.h | 40 +++---- drivers/staging/sm750fb/sm750.c | 128 ++++++++++---------- drivers/staging/sm750fb/sm750.h | 54 ++++----- drivers/staging/sm750fb/sm750_accel.c | 148 +++++++++++------------ drivers/staging/sm750fb/sm750_accel.h | 42 +++---- drivers/staging/sm750fb/sm750_cursor.c | 14 +-- drivers/staging/sm750fb/sm750_cursor.h | 10 +- drivers/staging/sm750fb/sm750_hw.c | 54 ++++----- 14 files changed, 419 insertions(+), 419 deletions(-)
drivers/staging/sm750fb/ddk750_dvi.c +16 -16
@@ -11,26 +11,26 @@* function API. Please set the function pointer to NULL whenever the function * is not supported. */ -static struct dvi_ctrl_device g_dcftSupportedDviController[] = { +static struct dvi_ctrl_device g_dcft_supported_dvi_controller[] = { #ifdef DVI_CTRL_SII164 { - .pfnInit = sii164InitChip, - .pfnGetVendorId = sii164GetVendorID, - .pfnGetDeviceId = sii164GetDeviceID, + .pfn_init = sii164_init_chip, + .pfn_get_vendor_id = sii164_get_vendor_id, + .pfn_get_device_id = sii164_get_device_id, #ifdef SII164_FULL_FUNCTIONS - .pfnResetChip = sii164ResetChip, - .pfnGetChipString = sii164GetChipString, - .pfnSetPower = sii164SetPower, - .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection, - .pfnIsConnected = sii164IsConnected, - .pfnCheckInterrupt = sii164CheckInterrupt, - .pfnClearInterrupt = sii164ClearInterrupt, + .pfn_reset_chip = sii164_reset_chip, + .pfn_get_chip_string = sii164_get_chip_string, + .pfn_set_power = sii164_set_power, + .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection, + .pfn_is_connected = sii164_is_connected, + .pfn_check_interrupt = sii164_check_interrupt, + .pfn_clear_interrupt = sii164_clear_interrupt, #endif }, #endif }; -int dviInit(unsigned char edge_select, +int dvi_init(unsigned char edge_select, unsigned char bus_select, unsigned char dual_edge_clk_select, unsigned char hsync_enable,
@@ -41,11 +41,11 @@ int dviInit(unsigned char edge_select,unsigned char pll_filter_enable, unsigned char pll_filter_value) { - struct dvi_ctrl_device *pCurrentDviCtrl; + struct dvi_ctrl_device *p_current_dvi_ctrl; - pCurrentDviCtrl = g_dcftSupportedDviController; -if (pCurrentDviCtrl->pfnInit) { - return pCurrentDviCtrl->pfnInit(edge_select, + p_current_dvi_ctrl = g_dcft_supported_dvi_controller; +if (p_current_dvi_ctrl->pfn_init) { + return p_current_dvi_ctrl->pfn_init(edge_select, bus_select, dual_edge_clk_select, hsync_enable,
drivers/staging/sm750fb/ddk750_dvi.h +32 -32
86 lines not on this page · raw message
drivers/staging/sm750fb/ddk750_mode.c +44 -44
202 lines not on this page · raw message
drivers/staging/sm750fb/ddk750_mode.h +1 -1
@@ -33,5 +33,5 @@ struct mode_parameter { enum spolarity clock_phase_polarity; }; -int ddk750_setModeTiming (struct mode_parameter *parm,enum clock_type clock); +int ddk750_set_mode_timing (struct mode_parameter *parm,enum clock_type clock);#endif
drivers/staging/sm750fb/ddk750_power.h +5 -5
@@ -3,10 +3,10 @@#define DDK750_POWER_H__ enum dpms { - crtDPMS_ON =0x0 , - crtDPMS_STANDBY =0x1 , - crtDPMS_SUSPEND =0x2 , - crtDPMS_OFF =0x3 , + crt_dpms_on =0x0 , + crt_dpms_standby =0x1 , + crt_dpms_suspend =0x2 , + crt_dpms_off =0x3 , };#define set_DAC (off) { \
@@ -15,7 +15,7 @@ enum dpms { }void ddk750_set_dpms (enum dpms state); -void sm750_set_power_mode (unsigned int powerMode); +void sm750_set_power_mode (unsigned int power_mode);void sm750_set_current_gate (unsigned int gate);/*
drivers/staging/sm750fb/ddk750_sii164.c +76 -76
337 lines not on this page · raw message
drivers/staging/sm750fb/ddk750_sii164.h +20 -20
@@ -16,28 +16,28 @@ enum sii164_hot_plug_mode { };/* Silicon Image SiI164 chip prototype */ -long sii164InitChip (unsigned char edgeSelect, -unsigned char busSelect, -unsigned char dualEdgeClkSelect, -unsigned char hsyncEnable, -unsigned char vsyncEnable, -unsigned char deskewEnable, -unsigned char deskewSetting, -unsigned char continuousSyncEnable, -unsigned char pllFilterEnable, -unsigned char pllFilterValue); - -unsigned short sii164GetVendorID (void ); -unsigned short sii164GetDeviceID (void ); +long sii164_init_chip (unsigned char edge_select, +unsigned char bus_select, +unsigned char dual_edge_clk_select, +unsigned char hsync_enable, +unsigned char vsync_enable, +unsigned char deskew_enable, +unsigned char deskew_setting, +unsigned char continuous_sync_enable, +unsigned char pll_filter_enable, +unsigned char pll_filter_value); + +unsigned short sii164_get_vendor_id (void ); +unsigned short sii164_get_device_id (void );#ifdef SII164_FULL_FUNCTIONS -void sii164ResetChip (void ); -char *sii164GetChipString (void ); -void sii164SetPower (unsigned char powerUp); -void sii164EnableHotPlugDetection (unsigned char enableHotPlug); -unsigned char sii164IsConnected (void ); -unsigned char sii164CheckInterrupt (void ); -void sii164ClearInterrupt (void ); +void sii164_reset_chip (void ); +char *sii164_get_chip_string (void ); +void sii164_set_power (unsigned char power_up); +void sii164_enable_hot_plug_detection (unsigned char enable_hot_plug); +unsigned char sii164_is_connected (void ); +unsigned char sii164_check_interrupt (void ); +void sii164_clear_interrupt (void );#endif /* * below register definition is used for
drivers/staging/sm750fb/sm750.c +64 -64
343 lines not on this page · raw message
drivers/staging/sm750fb/sm750.h +27 -27
125 lines not on this page · raw message
drivers/staging/sm750fb/sm750_accel.c +74 -74
340 lines not on this page · raw message
drivers/staging/sm750fb/sm750_accel.h +21 -21
74 lines not on this page · raw message
drivers/staging/sm750fb/sm750_cursor.c +7 -7
@@ -58,13 +58,13 @@ void sm750_hw_cursor_disable(struct lynx_cursor *cursor)poke32 (HWC_ADDRESS ,0 ); } -void sm750_hw_cursor_setSize (struct lynx_cursor *cursor,int w,int h) +void sm750_hw_cursor_set_size (struct lynx_cursor *cursor,int w,int h) { cursor->w = w; cursor->h = h; } -void sm750_hw_cursor_setPos (struct lynx_cursor *cursor,int x,int y) +void sm750_hw_cursor_set_pos (struct lynx_cursor *cursor,int x,int y) {u32 reg;
@@ -73,7 +73,7 @@ void sm750_hw_cursor_setPos(struct lynx_cursor *cursor, int x, int y)poke32 (HWC_LOCATION , reg); } -void sm750_hw_cursor_setColor (struct lynx_cursor *cursor,u32 fg,u32 bg) +void sm750_hw_cursor_set_color (struct lynx_cursor *cursor,u32 fg,u32 bg) {u32 reg = (fg <<HWC_COLOR_12_2_RGB565_SHIFT ) &HWC_COLOR_12_2_RGB565_MASK ;
@@ -82,7 +82,7 @@ void sm750_hw_cursor_setColor(struct lynx_cursor *cursor, u32 fg, u32 bg)poke32 (HWC_COLOR_3 ,0xffe0 ); } -void sm750_hw_cursor_setData (struct lynx_cursor *cursor,u16 rop, +void sm750_hw_cursor_set_data (struct lynx_cursor *cursor,u16 rop,const u8 *pcol,const u8 *pmsk) {int i, j, count, pitch, offset;
@@ -97,7 +97,7 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h;/* in byte */ - offset = cursor->maxW *2 /8 ; + offset = cursor->max_w *2 /8 ; data =0 ; pstart = cursor->vstart;
@@ -132,7 +132,7 @@ void sm750_hw_cursor_setData(struct lynx_cursor *cursor, u16 rop, } } -void sm750_hw_cursor_setData2 (struct lynx_cursor *cursor,u16 rop, +void sm750_hw_cursor_set_data2 (struct lynx_cursor *cursor,u16 rop,const u8 *pcol,const u8 *pmsk) {int i, j, count, pitch, offset;
@@ -147,7 +147,7 @@ void sm750_hw_cursor_setData2(struct lynx_cursor *cursor, u16 rop, count = pitch * cursor->h;/* in byte */ - offset = cursor->maxW *2 /8 ; + offset = cursor->max_w *2 /8 ; data =0 ; pstart = cursor->vstart;
drivers/staging/sm750fb/sm750_cursor.h +5 -5
@@ -5,11 +5,11 @@/* hw_cursor_xxx works for voyager,718 and 750 */ void sm750_hw_cursor_enable (struct lynx_cursor *cursor);void sm750_hw_cursor_disable (struct lynx_cursor *cursor); -void sm750_hw_cursor_setSize (struct lynx_cursor *cursor,int w,int h); -void sm750_hw_cursor_setPos (struct lynx_cursor *cursor,int x,int y); -void sm750_hw_cursor_setColor (struct lynx_cursor *cursor,u32 fg,u32 bg); -void sm750_hw_cursor_setData (struct lynx_cursor *cursor,u16 rop, +void sm750_hw_cursor_set_size (struct lynx_cursor *cursor,int w,int h); +void sm750_hw_cursor_set_pos (struct lynx_cursor *cursor,int x,int y); +void sm750_hw_cursor_set_color (struct lynx_cursor *cursor,u32 fg,u32 bg); +void sm750_hw_cursor_set_data (struct lynx_cursor *cursor,u16 rop,const u8 *data,const u8 *mask); -void sm750_hw_cursor_setData2 (struct lynx_cursor *cursor,u16 rop, +void sm750_hw_cursor_set_data2 (struct lynx_cursor *cursor,u16 rop,const u8 *data,const u8 *mask);#endif
drivers/staging/sm750fb/sm750_hw.c +27 -27
181 lines not on this page · raw message
Signature · 1 line
2.30.2
Greg KH
maintainerdrivers/staging/sm750fb/ddk750_dvi.c int dviInit(unsigned char edge_select, · line 44
Quoted 2 lines · Pavle Rohalj
drivers/staging/sm750fb/ddk750_dvi.c +1
-1-struct dvi_ctrl_device *pCurrentDviCtrl; +struct dvi_ctrl_device *p_current_dvi_ctrl;
Does this change make sense? Why keep the "p_" here? We do not need or use, this type of variable naming in the kernel.
Also, please break this up into a patch series where you do one structure change at a time.
thanks,
greg k-h
Quoted 7 lines · Greg KH
drivers/staging/sm750fb/ddk750_dvi.c int dviInit(unsigned char edge_select, · line 44
Quoted 2 lines · Pavle Rohalj
drivers/staging/sm750fb/ddk750_dvi.c +1
-1-struct dvi_ctrl_device *pCurrentDviCtrl; +struct dvi_ctrl_device *p_current_dvi_ctrl;Does this change make sense? Why keep the "p_" here? We do not need or use, this type of variable naming in the kernel.
Quoted 6 lines
Also, please break this up into a patch series where you do one structure change at a time.
thanks,
greg k-h
Thank you for the input. Makes sense why we would not want to include type information in variable names. I will send a patchset with changes broken up into smaller chunks soon.
-Pavle