From: Benjamin Romer Date: Thu, 23 Oct 2014 18:31:10 +0000 (-0400) Subject: staging: unisys: refactor struct struct ultra_vbus_channel_protocol X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a02fd66ec80d25ff9c792e96bdc895e4b8e0935b;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h b/drivers/staging/unisys/common-spar/include/channels/vbuschannel.h index 360fba67da15..2c42ce16e0cf 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 36174628af41..6fa8caf5381e 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 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 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[]. */ 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; }