Skip to content

Commit 9314a82

Browse files
Nam Caogregkh
authored andcommitted
staging: sm750fb: fix naming style
Fix CamelCase names defined in ddk750_dvi.c and ddk750_dvi.h, as reported by checkpatch.pl. Remove name suffixes such as pfn_ and g_. Signed-off-by: Nam Cao <cvn249@gmail.com> Link: https://lore.kernel.org/r/20220316224940.70107-1-cvn249@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 362e54e commit 9314a82

File tree

2 files changed

+66
-66
lines changed

2 files changed

+66
-66
lines changed

drivers/staging/sm750fb/ddk750_dvi.c

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,50 +11,50 @@
1111
* function API. Please set the function pointer to NULL whenever the function
1212
* is not supported.
1313
*/
14-
static struct dvi_ctrl_device g_dcftSupportedDviController[] = {
14+
static struct dvi_ctrl_device dcft_supported_dvi_controller[] = {
1515
#ifdef DVI_CTRL_SII164
1616
{
17-
.pfnInit = sii164InitChip,
18-
.pfnGetVendorId = sii164GetVendorID,
19-
.pfnGetDeviceId = sii164GetDeviceID,
17+
.init = sii164InitChip,
18+
.get_vendor_id = sii164GetVendorID,
19+
.get_device_id = sii164GetDeviceID,
2020
#ifdef SII164_FULL_FUNCTIONS
21-
.pfnResetChip = sii164ResetChip,
22-
.pfnGetChipString = sii164GetChipString,
23-
.pfnSetPower = sii164SetPower,
24-
.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
25-
.pfnIsConnected = sii164IsConnected,
26-
.pfnCheckInterrupt = sii164CheckInterrupt,
27-
.pfnClearInterrupt = sii164ClearInterrupt,
21+
.reset_chip = sii164ResetChip,
22+
.get_chip_string = sii164GetChipString,
23+
.set_power = sii164SetPower,
24+
.enable_hot_plug_detection = sii164EnableHotPlugDetection,
25+
.is_connected = sii164IsConnected,
26+
.check_interrupt = sii164CheckInterrupt,
27+
.clear_interrupt = sii164ClearInterrupt,
2828
#endif
2929
},
3030
#endif
3131
};
3232

33-
int dviInit(unsigned char edge_select,
34-
unsigned char bus_select,
35-
unsigned char dual_edge_clk_select,
36-
unsigned char hsync_enable,
37-
unsigned char vsync_enable,
38-
unsigned char deskew_enable,
39-
unsigned char deskew_setting,
40-
unsigned char continuous_sync_enable,
41-
unsigned char pll_filter_enable,
42-
unsigned char pll_filter_value)
33+
int dvi_init(unsigned char edge_select,
34+
unsigned char bus_select,
35+
unsigned char dual_edge_clk_select,
36+
unsigned char hsync_enable,
37+
unsigned char vsync_enable,
38+
unsigned char deskew_enable,
39+
unsigned char deskew_setting,
40+
unsigned char continuous_sync_enable,
41+
unsigned char pll_filter_enable,
42+
unsigned char pll_filter_value)
4343
{
44-
struct dvi_ctrl_device *pCurrentDviCtrl;
44+
struct dvi_ctrl_device *current_dvi_ctrl;
4545

46-
pCurrentDviCtrl = g_dcftSupportedDviController;
47-
if (pCurrentDviCtrl->pfnInit) {
48-
return pCurrentDviCtrl->pfnInit(edge_select,
49-
bus_select,
50-
dual_edge_clk_select,
51-
hsync_enable,
52-
vsync_enable,
53-
deskew_enable,
54-
deskew_setting,
55-
continuous_sync_enable,
56-
pll_filter_enable,
57-
pll_filter_value);
46+
current_dvi_ctrl = dcft_supported_dvi_controller;
47+
if (current_dvi_ctrl->init) {
48+
return current_dvi_ctrl->init(edge_select,
49+
bus_select,
50+
dual_edge_clk_select,
51+
hsync_enable,
52+
vsync_enable,
53+
deskew_enable,
54+
deskew_setting,
55+
continuous_sync_enable,
56+
pll_filter_enable,
57+
pll_filter_value);
5858
}
5959
return -1; /* error */
6060
}

drivers/staging/sm750fb/ddk750_dvi.h

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,54 @@
44

55
/* dvi chip stuffs structros */
66

7-
typedef long (*PFN_DVICTRL_INIT)(unsigned char edgeSelect,
8-
unsigned char busSelect,
9-
unsigned char dualEdgeClkSelect,
10-
unsigned char hsyncEnable,
11-
unsigned char vsyncEnable,
12-
unsigned char deskewEnable,
13-
unsigned char deskewSetting,
14-
unsigned char continuousSyncEnable,
15-
unsigned char pllFilterEnable,
16-
unsigned char pllFilterValue);
7+
typedef long (*PFN_DVICTRL_INIT)(unsigned char edge_select,
8+
unsigned char bus_select,
9+
unsigned char dual_edge_clk_select,
10+
unsigned char hsync_enable,
11+
unsigned char vsync_enable,
12+
unsigned char deskew_enable,
13+
unsigned char deskew_setting,
14+
unsigned char continuous_sync_enable,
15+
unsigned char pll_filter_enable,
16+
unsigned char pll_filter_value);
1717

1818
typedef void (*PFN_DVICTRL_RESETCHIP)(void);
1919
typedef char* (*PFN_DVICTRL_GETCHIPSTRING)(void);
2020
typedef unsigned short (*PFN_DVICTRL_GETVENDORID)(void);
2121
typedef unsigned short (*PFN_DVICTRL_GETDEVICEID)(void);
22-
typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char powerUp);
23-
typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enableHotPlug);
22+
typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char power_up);
23+
typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enable_hot_plug);
2424
typedef unsigned char (*PFN_DVICTRL_ISCONNECTED)(void);
2525
typedef unsigned char (*PFN_DVICTRL_CHECKINTERRUPT)(void);
2626
typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);
2727

2828
/* Structure to hold all the function pointer to the DVI Controller. */
2929
struct dvi_ctrl_device {
30-
PFN_DVICTRL_INIT pfnInit;
31-
PFN_DVICTRL_RESETCHIP pfnResetChip;
32-
PFN_DVICTRL_GETCHIPSTRING pfnGetChipString;
33-
PFN_DVICTRL_GETVENDORID pfnGetVendorId;
34-
PFN_DVICTRL_GETDEVICEID pfnGetDeviceId;
35-
PFN_DVICTRL_SETPOWER pfnSetPower;
36-
PFN_DVICTRL_HOTPLUGDETECTION pfnEnableHotPlugDetection;
37-
PFN_DVICTRL_ISCONNECTED pfnIsConnected;
38-
PFN_DVICTRL_CHECKINTERRUPT pfnCheckInterrupt;
39-
PFN_DVICTRL_CLEARINTERRUPT pfnClearInterrupt;
30+
PFN_DVICTRL_INIT init;
31+
PFN_DVICTRL_RESETCHIP reset_chip;
32+
PFN_DVICTRL_GETCHIPSTRING get_chip_string;
33+
PFN_DVICTRL_GETVENDORID get_vendor_id;
34+
PFN_DVICTRL_GETDEVICEID get_device_id;
35+
PFN_DVICTRL_SETPOWER set_power;
36+
PFN_DVICTRL_HOTPLUGDETECTION enable_hot_plug_detection;
37+
PFN_DVICTRL_ISCONNECTED is_connected;
38+
PFN_DVICTRL_CHECKINTERRUPT check_interrupt;
39+
PFN_DVICTRL_CLEARINTERRUPT clear_interrupt;
4040
};
4141

4242
#define DVI_CTRL_SII164
4343

4444
/* dvi functions prototype */
45-
int dviInit(unsigned char edgeSelect,
46-
unsigned char busSelect,
47-
unsigned char dualEdgeClkSelect,
48-
unsigned char hsyncEnable,
49-
unsigned char vsyncEnable,
50-
unsigned char deskewEnable,
51-
unsigned char deskewSetting,
52-
unsigned char continuousSyncEnable,
53-
unsigned char pllFilterEnable,
54-
unsigned char pllFilterValue);
45+
int dvi_init(unsigned char edge_select,
46+
unsigned char bus_select,
47+
unsigned char dual_edge_clk_select,
48+
unsigned char hsync_enable,
49+
unsigned char vsync_enable,
50+
unsigned char deskew_enable,
51+
unsigned char deskew_setting,
52+
unsigned char continuous_sync_enable,
53+
unsigned char pll_filter_enable,
54+
unsigned char pll_filter_value);
5555

5656
#endif
5757

0 commit comments

Comments
 (0)