Remove the typedef and rename to struct spar_vbus_headerinfo. Fix CamelCase
member names:

structBytes => struct_bytes
deviceInfoStructBytes => device_info_struct_bytes
devInfoCount => dev_info_count
chpInfoByteOffset => chp_info_offset
busInfoByteOffset => bus_info_offset
devInfoByteOffset => dev_info_offset

Update all references to changed names.

Signed-off-by: Benjamin Romer <benjamin.ro...@unisys.com>
---
 .../common-spar/include/channels/vbuschannel.h       | 18 +++++++++---------
 drivers/staging/unisys/virtpci/virtpci.c             | 20 ++++++++++----------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h 
b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
index 873ba76..360fba6 100644
--- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
@@ -58,23 +58,23 @@ static const uuid_le spar_vbus_channel_protocol_uuid =
                                   actual_bytes))
 
 #pragma pack(push, 1)          /* both GCC and VC now allow this pragma */
-typedef struct _ULTRA_VBUS_HEADERINFO {
-       u32 structBytes;        /* size of this struct in bytes */
-       u32 deviceInfoStructBytes;      /* sizeof(ULTRA_VBUS_DEVICEINFO) */
-       u32 devInfoCount;       /* num of items in DevInfo member */
+struct spar_vbus_headerinfo {
+       u32 struct_bytes;       /* size of this struct in bytes */
+       u32 device_info_struct_bytes;   /* sizeof(ULTRA_VBUS_DEVICEINFO) */
+       u32 dev_info_count;     /* num of items in DevInfo member */
        /* (this is the allocated size) */
-       u32 chpInfoByteOffset;  /* byte offset from beginning of this struct */
+       u32 chp_info_offset;    /* byte offset from beginning of this struct */
        /* to the ChpInfo struct (below) */
-       u32 busInfoByteOffset;  /* byte offset from beginning of this struct */
+       u32 bus_info_offset;    /* byte offset from beginning of this struct */
        /* to the BusInfo struct (below) */
-       u32 devInfoByteOffset;  /* byte offset from beginning of this struct */
+       u32 dev_info_offset;    /* byte offset from beginning of this struct */
        /* to the DevInfo array (below) */
        u8 reserved[104];
-} ULTRA_VBUS_HEADERINFO;
+};
 
 struct ultra_vbus_channel_protocol {
        struct channel_header ChannelHeader;    /* initialized by server */
-       ULTRA_VBUS_HEADERINFO HdrInfo;  /* initialized by server */
+       struct spar_vbus_headerinfo HdrInfo;    /* initialized by server */
        /* the remainder of this channel is filled in by the client */
        struct ultra_vbus_deviceinfo ChpInfo;
        /* describes client chipset device and driver */
diff --git a/drivers/staging/unisys/virtpci/virtpci.c 
b/drivers/staging/unisys/virtpci/virtpci.c
index ee1beb5..36174628 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -195,9 +195,9 @@ 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.chpInfoByteOffset;
-       if (chan->HdrInfo.chpInfoByteOffset == 0) {
-               LOGERR("vbus channel not used, because chpInfoByteOffset == 0");
+       off = sizeof(struct channel_header) + chan->HdrInfo.chp_info_offset;
+       if (chan->HdrInfo.chp_info_offset == 0) {
+               LOGERR("vbus channel not used, because chp_info_offset == 0");
                return -1;
        }
        memcpy(((u8 *) (chan)) + off, info, sizeof(*info));
@@ -214,9 +214,9 @@ 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.busInfoByteOffset;
-       if (chan->HdrInfo.busInfoByteOffset == 0) {
-               LOGERR("vbus channel not used, because busInfoByteOffset == 0");
+       off = sizeof(struct channel_header) + chan->HdrInfo.bus_info_offset;
+       if (chan->HdrInfo.bus_info_offset == 0) {
+               LOGERR("vbus channel not used, because bus_info_offset == 0");
                return -1;
        }
        memcpy(((u8 *) (chan)) + off, info, sizeof(*info));
@@ -238,10 +238,10 @@ write_vbus_devInfo(struct ultra_vbus_channel_protocol 
*chan,
        }
        off =
            (sizeof(struct channel_header) +
-            chan->HdrInfo.devInfoByteOffset) +
-           (chan->HdrInfo.deviceInfoStructBytes * devix);
-       if (chan->HdrInfo.devInfoByteOffset == 0) {
-               LOGERR("vbus channel not used, because devInfoByteOffset == 0");
+            chan->HdrInfo.dev_info_offset) +
+           (chan->HdrInfo.device_info_struct_bytes * devix);
+       if (chan->HdrInfo.dev_info_offset == 0) {
+               LOGERR("vbus channel not used, because dev_info_offset == 0");
                return -1;
        }
        memcpy(((u8 *) (chan)) + off, info, sizeof(*info));
-- 
1.9.1

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to