staging: unisys: refactor struct struct ultra_vbus_channel_protocol
authorBenjamin Romer <benjamin.romer@unisys.com>
Thu, 23 Oct 2014 18:31:10 +0000 (14:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 02:33:15 +0000 (10:33 +0800)
Rename the struct to spar_vbus_channel_protocol. Fix CamelCase member names:

ChannelHeader => channel_header
HdrInfo => hdr_info
ChpInfo => chp_info
BusInfo => bus_info
DevInfo => dev_info

Update all references to use the changed names.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
drivers/staging/unisys/virtpci/virtpci.c

index 360fba67da157923170e955b50410113d58a1f62..2c42ce16e0cf2dbcf1dbe066cb65ebc34cd0fef1 100644 (file)
@@ -45,11 +45,11 @@ static const uuid_le spar_vbus_channel_protocol_uuid =
 
 #define SPAR_VBUS_CHANNEL_OK_CLIENT(ch)       \
        spar_check_channel_client(ch,                           \
-                                 spar_vbus_channel_protocol_uuid,      \
-                                 "vbus",                               \
-                                 sizeof(struct ultra_vbus_channel_protocol),\
-                                 SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID, \
-                                 SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE)
+                                  spar_vbus_channel_protocol_uuid,     \
+                                  "vbus",                              \
+                                  sizeof(struct spar_vbus_channel_protocol),\
+                                  SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID, \
+                                  SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE)
 
 #define SPAR_VBUS_CHANNEL_OK_SERVER(actual_bytes)    \
        (spar_check_channel_server(spar_vbus_channel_protocol_uuid,     \
@@ -72,15 +72,15 @@ struct spar_vbus_headerinfo {
        u8 reserved[104];
 };
 
-struct ultra_vbus_channel_protocol {
-       struct channel_header ChannelHeader;    /* initialized by server */
-       struct spar_vbus_headerinfo HdrInfo;    /* initialized by server */
+struct spar_vbus_channel_protocol {
+       struct channel_header channel_header;   /* initialized by server */
+       struct spar_vbus_headerinfo hdr_info;   /* initialized by server */
        /* the remainder of this channel is filled in by the client */
-       struct ultra_vbus_deviceinfo ChpInfo;
+       struct ultra_vbus_deviceinfo chp_info;
        /* describes client chipset device and driver */
-       struct ultra_vbus_deviceinfo BusInfo;
+       struct ultra_vbus_deviceinfo bus_info;
        /* describes client bus device and driver */
-       struct ultra_vbus_deviceinfo DevInfo[0];
+       struct ultra_vbus_deviceinfo dev_info[0];
        /* describes client device and driver for each device on the bus */
 };
 
index 36174628af414e3e91c3aff3a793baf08dcefa76..6fa8caf5381e79fd9e95d3c341ab9994e3e1bce4 100644 (file)
@@ -186,7 +186,7 @@ int WAIT_FOR_IO_CHANNEL(struct spar_io_channel_protocol __iomem  *chanptr)
 }
 
 /* Write the contents of <info> to the ULTRA_VBUS_CHANNEL_PROTOCOL.ChpInfo. */
-static int write_vbus_chpInfo(struct ultra_vbus_channel_protocol *chan,
+static int write_vbus_chpInfo(struct spar_vbus_channel_protocol *chan,
                              struct ultra_vbus_deviceinfo *info)
 {
        int off;
@@ -195,8 +195,8 @@ static int write_vbus_chpInfo(struct ultra_vbus_channel_protocol *chan,
                LOGERR("vbus channel not present");
                return -1;
        }
-       off = sizeof(struct channel_header) + chan->HdrInfo.chp_info_offset;
-       if (chan->HdrInfo.chp_info_offset == 0) {
+       off = sizeof(struct channel_header) + chan->hdr_info.chp_info_offset;
+       if (chan->hdr_info.chp_info_offset == 0) {
                LOGERR("vbus channel not used, because chp_info_offset == 0");
                return -1;
        }
@@ -205,7 +205,7 @@ static int write_vbus_chpInfo(struct ultra_vbus_channel_protocol *chan,
 }
 
 /* Write the contents of <info> to the ULTRA_VBUS_CHANNEL_PROTOCOL.BusInfo. */
-static int write_vbus_busInfo(struct ultra_vbus_channel_protocol *chan,
+static int write_vbus_busInfo(struct spar_vbus_channel_protocol *chan,
                              struct ultra_vbus_deviceinfo *info)
 {
        int off;
@@ -214,8 +214,8 @@ static int write_vbus_busInfo(struct ultra_vbus_channel_protocol *chan,
                LOGERR("vbus channel not present");
                return -1;
        }
-       off = sizeof(struct channel_header) + chan->HdrInfo.bus_info_offset;
-       if (chan->HdrInfo.bus_info_offset == 0) {
+       off = sizeof(struct channel_header) + chan->hdr_info.bus_info_offset;
+       if (chan->hdr_info.bus_info_offset == 0) {
                LOGERR("vbus channel not used, because bus_info_offset == 0");
                return -1;
        }
@@ -227,7 +227,7 @@ static int write_vbus_busInfo(struct ultra_vbus_channel_protocol *chan,
  * ULTRA_VBUS_CHANNEL_PROTOCOL.DevInfo[<devix>].
  */
 static int
-write_vbus_devInfo(struct ultra_vbus_channel_protocol *chan,
+write_vbus_devInfo(struct spar_vbus_channel_protocol *chan,
                   struct ultra_vbus_deviceinfo *info, int devix)
 {
        int off;
@@ -238,9 +238,9 @@ write_vbus_devInfo(struct ultra_vbus_channel_protocol *chan,
        }
        off =
            (sizeof(struct channel_header) +
-            chan->HdrInfo.dev_info_offset) +
-           (chan->HdrInfo.device_info_struct_bytes * devix);
-       if (chan->HdrInfo.dev_info_offset == 0) {
+            chan->hdr_info.dev_info_offset) +
+           (chan->hdr_info.device_info_struct_bytes * devix);
+       if (chan->hdr_info.dev_info_offset == 0) {
                LOGERR("vbus channel not used, because dev_info_offset == 0");
                return -1;
        }