staging: unisys: refactor struct struct ultra_vbus_channel_protocol

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>
This commit is contained in:
Benjamin Romer 2014-10-23 14:31:10 -04:00 committed by Greg Kroah-Hartman
parent 1cb3b9de23
commit a02fd66ec8
2 changed files with 21 additions and 21 deletions

View File

@ -45,11 +45,11 @@ static const uuid_le spar_vbus_channel_protocol_uuid =
#define SPAR_VBUS_CHANNEL_OK_CLIENT(ch) \ #define SPAR_VBUS_CHANNEL_OK_CLIENT(ch) \
spar_check_channel_client(ch, \ spar_check_channel_client(ch, \
spar_vbus_channel_protocol_uuid, \ spar_vbus_channel_protocol_uuid, \
"vbus", \ "vbus", \
sizeof(struct ultra_vbus_channel_protocol),\ sizeof(struct spar_vbus_channel_protocol),\
SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID, \ SPAR_VBUS_CHANNEL_PROTOCOL_VERSIONID, \
SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE) SPAR_VBUS_CHANNEL_PROTOCOL_SIGNATURE)
#define SPAR_VBUS_CHANNEL_OK_SERVER(actual_bytes) \ #define SPAR_VBUS_CHANNEL_OK_SERVER(actual_bytes) \
(spar_check_channel_server(spar_vbus_channel_protocol_uuid, \ (spar_check_channel_server(spar_vbus_channel_protocol_uuid, \
@ -72,15 +72,15 @@ struct spar_vbus_headerinfo {
u8 reserved[104]; u8 reserved[104];
}; };
struct ultra_vbus_channel_protocol { struct spar_vbus_channel_protocol {
struct channel_header ChannelHeader; /* initialized by server */ struct channel_header channel_header; /* initialized by server */
struct spar_vbus_headerinfo HdrInfo; /* initialized by server */ struct spar_vbus_headerinfo hdr_info; /* initialized by server */
/* the remainder of this channel is filled in by the client */ /* 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 */ /* describes client chipset device and driver */
struct ultra_vbus_deviceinfo BusInfo; struct ultra_vbus_deviceinfo bus_info;
/* describes client bus device and driver */ /* 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 */ /* describes client device and driver for each device on the bus */
}; };

View 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. */ /* 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) struct ultra_vbus_deviceinfo *info)
{ {
int off; int off;
@ -195,8 +195,8 @@ static int write_vbus_chpInfo(struct ultra_vbus_channel_protocol *chan,
LOGERR("vbus channel not present"); LOGERR("vbus channel not present");
return -1; return -1;
} }
off = sizeof(struct channel_header) + chan->HdrInfo.chp_info_offset; off = sizeof(struct channel_header) + chan->hdr_info.chp_info_offset;
if (chan->HdrInfo.chp_info_offset == 0) { if (chan->hdr_info.chp_info_offset == 0) {
LOGERR("vbus channel not used, because chp_info_offset == 0"); LOGERR("vbus channel not used, because chp_info_offset == 0");
return -1; 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. */ /* 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) struct ultra_vbus_deviceinfo *info)
{ {
int off; int off;
@ -214,8 +214,8 @@ static int write_vbus_busInfo(struct ultra_vbus_channel_protocol *chan,
LOGERR("vbus channel not present"); LOGERR("vbus channel not present");
return -1; return -1;
} }
off = sizeof(struct channel_header) + chan->HdrInfo.bus_info_offset; off = sizeof(struct channel_header) + chan->hdr_info.bus_info_offset;
if (chan->HdrInfo.bus_info_offset == 0) { if (chan->hdr_info.bus_info_offset == 0) {
LOGERR("vbus channel not used, because bus_info_offset == 0"); LOGERR("vbus channel not used, because bus_info_offset == 0");
return -1; return -1;
} }
@ -227,7 +227,7 @@ static int write_vbus_busInfo(struct ultra_vbus_channel_protocol *chan,
* ULTRA_VBUS_CHANNEL_PROTOCOL.DevInfo[<devix>]. * ULTRA_VBUS_CHANNEL_PROTOCOL.DevInfo[<devix>].
*/ */
static int 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) struct ultra_vbus_deviceinfo *info, int devix)
{ {
int off; int off;
@ -238,9 +238,9 @@ write_vbus_devInfo(struct ultra_vbus_channel_protocol *chan,
} }
off = off =
(sizeof(struct channel_header) + (sizeof(struct channel_header) +
chan->HdrInfo.dev_info_offset) + chan->hdr_info.dev_info_offset) +
(chan->HdrInfo.device_info_struct_bytes * devix); (chan->hdr_info.device_info_struct_bytes * devix);
if (chan->HdrInfo.dev_info_offset == 0) { if (chan->hdr_info.dev_info_offset == 0) {
LOGERR("vbus channel not used, because dev_info_offset == 0"); LOGERR("vbus channel not used, because dev_info_offset == 0");
return -1; return -1;
} }