staging: sm750fb: fix naming style
authorNam Cao <cvn249@gmail.com>
Wed, 16 Mar 2022 22:49:41 +0000 (22:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Mar 2022 12:43:41 +0000 (13:43 +0100)
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>
drivers/staging/sm750fb/ddk750_dvi.c
drivers/staging/sm750fb/ddk750_dvi.h

index cd564ea..029d9ac 100644 (file)
  * 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 dcft_supported_dvi_controller[] = {
 #ifdef DVI_CTRL_SII164
        {
-               .pfnInit = sii164InitChip,
-               .pfnGetVendorId = sii164GetVendorID,
-               .pfnGetDeviceId = sii164GetDeviceID,
+               .init = sii164InitChip,
+               .get_vendor_id = sii164GetVendorID,
+               .get_device_id = sii164GetDeviceID,
 #ifdef SII164_FULL_FUNCTIONS
-               .pfnResetChip = sii164ResetChip,
-               .pfnGetChipString = sii164GetChipString,
-               .pfnSetPower = sii164SetPower,
-               .pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
-               .pfnIsConnected = sii164IsConnected,
-               .pfnCheckInterrupt = sii164CheckInterrupt,
-               .pfnClearInterrupt = sii164ClearInterrupt,
+               .reset_chip = sii164ResetChip,
+               .get_chip_string = sii164GetChipString,
+               .set_power = sii164SetPower,
+               .enable_hot_plug_detection = sii164EnableHotPlugDetection,
+               .is_connected = sii164IsConnected,
+               .check_interrupt = sii164CheckInterrupt,
+               .clear_interrupt = sii164ClearInterrupt,
 #endif
        },
 #endif
 };
 
-int dviInit(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)
+int dvi_init(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)
 {
-       struct dvi_ctrl_device *pCurrentDviCtrl;
+       struct dvi_ctrl_device *current_dvi_ctrl;
 
-       pCurrentDviCtrl = g_dcftSupportedDviController;
-       if (pCurrentDviCtrl->pfnInit) {
-               return pCurrentDviCtrl->pfnInit(edge_select,
-                                               bus_select,
-                                               dual_edge_clk_select,
-                                               hsync_enable,
-                                               vsync_enable,
-                                               deskew_enable,
-                                               deskew_setting,
-                                               continuous_sync_enable,
-                                               pll_filter_enable,
-                                               pll_filter_value);
+       current_dvi_ctrl = dcft_supported_dvi_controller;
+       if (current_dvi_ctrl->init) {
+               return current_dvi_ctrl->init(edge_select,
+                                             bus_select,
+                                             dual_edge_clk_select,
+                                             hsync_enable,
+                                             vsync_enable,
+                                             deskew_enable,
+                                             deskew_setting,
+                                             continuous_sync_enable,
+                                             pll_filter_enable,
+                                             pll_filter_value);
        }
        return -1; /* error */
 }
index 1c7a565..c2518b7 100644 (file)
@@ -4,54 +4,54 @@
 
 /* dvi chip stuffs structros */
 
-typedef long (*PFN_DVICTRL_INIT)(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);
+typedef long (*PFN_DVICTRL_INIT)(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);
 
 typedef void (*PFN_DVICTRL_RESETCHIP)(void);
 typedef char* (*PFN_DVICTRL_GETCHIPSTRING)(void);
 typedef unsigned short (*PFN_DVICTRL_GETVENDORID)(void);
 typedef unsigned short (*PFN_DVICTRL_GETDEVICEID)(void);
-typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char powerUp);
-typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enableHotPlug);
+typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char power_up);
+typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enable_hot_plug);
 typedef unsigned char (*PFN_DVICTRL_ISCONNECTED)(void);
 typedef unsigned char (*PFN_DVICTRL_CHECKINTERRUPT)(void);
 typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);
 
 /* Structure to hold all the function pointer to the DVI Controller. */
 struct dvi_ctrl_device {
-       PFN_DVICTRL_INIT                pfnInit;
-       PFN_DVICTRL_RESETCHIP           pfnResetChip;
-       PFN_DVICTRL_GETCHIPSTRING       pfnGetChipString;
-       PFN_DVICTRL_GETVENDORID         pfnGetVendorId;
-       PFN_DVICTRL_GETDEVICEID         pfnGetDeviceId;
-       PFN_DVICTRL_SETPOWER            pfnSetPower;
-       PFN_DVICTRL_HOTPLUGDETECTION    pfnEnableHotPlugDetection;
-       PFN_DVICTRL_ISCONNECTED         pfnIsConnected;
-       PFN_DVICTRL_CHECKINTERRUPT      pfnCheckInterrupt;
-       PFN_DVICTRL_CLEARINTERRUPT      pfnClearInterrupt;
+       PFN_DVICTRL_INIT                init;
+       PFN_DVICTRL_RESETCHIP           reset_chip;
+       PFN_DVICTRL_GETCHIPSTRING       get_chip_string;
+       PFN_DVICTRL_GETVENDORID         get_vendor_id;
+       PFN_DVICTRL_GETDEVICEID         get_device_id;
+       PFN_DVICTRL_SETPOWER            set_power;
+       PFN_DVICTRL_HOTPLUGDETECTION    enable_hot_plug_detection;
+       PFN_DVICTRL_ISCONNECTED         is_connected;
+       PFN_DVICTRL_CHECKINTERRUPT      check_interrupt;
+       PFN_DVICTRL_CLEARINTERRUPT      clear_interrupt;
 };
 
 #define DVI_CTRL_SII164
 
 /* dvi functions prototype */
-int dviInit(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);
+int dvi_init(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);
 
 #endif