[PATCH 91/91] staging: unisys: refactor struct struct ultra_vbus_channel_protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 .../common-spar/include/channels/vbuschannel.h     | 22 +++++++++++-----------
 drivers/staging/unisys/virtpci/virtpci.c           | 20 ++++++++++----------
 2 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
index 360fba6..2c42ce1 100644
--- a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
+++ b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h
@@ -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 */
 };
 
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index 36174628..6fa8caf 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -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;
 	}
-- 
1.9.1

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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux