]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: unisys: refactor ULTRA_VBUS_HEADERINFO
authorBenjamin Romer <benjamin.romer@unisys.com>
Thu, 23 Oct 2014 18:31:09 +0000 (14:31 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2014 02:33:15 +0000 (10:33 +0800)
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.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 873ba76253dd68016c0e85a21bbe2985d0661378..360fba67da157923170e955b50410113d58a1f62 100644 (file)
@@ -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 */
index ee1beb546635f7e3229dd779fe27c7e788f48498..36174628af414e3e91c3aff3a793baf08dcefa76 100644 (file)
@@ -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));