#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, \
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 */
};
}
/* 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;
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;
}
}
/* 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;
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;
}
* 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;
}
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;
}