summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
diff options
context:
space:
mode:
authorBenjamin Romer2014-10-23 20:29:55 +0200
committerGreg Kroah-Hartman2014-10-27 03:33:08 +0100
commit9fd1b95aab5f4e72e8516e0a8b6dcb7dd6217d09 (patch)
treea0cd5500c8fb910583cf44a25bb1d640a98a8ea5 /drivers/staging/unisys/visorchannel/visorchannel_funcs.c
parentstaging: unisys: fix spacing in ULTRA_CHANNELCLI_STRING (diff)
downloadkernel-qcow2-linux-9fd1b95aab5f4e72e8516e0a8b6dcb7dd6217d09.tar.gz
kernel-qcow2-linux-9fd1b95aab5f4e72e8516e0a8b6dcb7dd6217d09.tar.xz
kernel-qcow2-linux-9fd1b95aab5f4e72e8516e0a8b6dcb7dd6217d09.zip
staging: unisys: remove typedef for CHANNEL_HEADER
Switch everywhere that CHANNEL_HEADER, pCHANNEL_HEADER, or ULTRA_CHANNEL_PROTOCOL was used, to struct channel_header. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorchannel/visorchannel_funcs.c')
-rw-r--r--drivers/staging/unisys/visorchannel/visorchannel_funcs.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
index 01a44c553500..d2fc89a0bbd2 100644
--- a/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
+++ b/drivers/staging/unisys/visorchannel/visorchannel_funcs.c
@@ -30,7 +30,7 @@
struct VISORCHANNEL_Tag {
MEMREGION *memregion; /* from visor_memregion_create() */
- CHANNEL_HEADER chan_hdr;
+ struct channel_header chan_hdr;
uuid_le guid;
ulong size;
BOOL needs_lock;
@@ -70,19 +70,19 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,
/* prepare chan_hdr (abstraction to read/write channel memory) */
if (parent == NULL)
p->memregion =
- visor_memregion_create(physaddr, sizeof(CHANNEL_HEADER));
+ visor_memregion_create(physaddr,
+ sizeof(struct channel_header));
else
p->memregion =
visor_memregion_create_overlapped(parent->memregion,
- off,
- sizeof(CHANNEL_HEADER));
+ off, sizeof(struct channel_header));
if (p->memregion == NULL) {
ERRDRV("visor_memregion_create failed failed: (status=0)\n");
rc = NULL;
goto Away;
}
if (visor_memregion_read(p->memregion, 0, &p->chan_hdr,
- sizeof(CHANNEL_HEADER)) < 0) {
+ sizeof(struct channel_header)) < 0) {
ERRDRV("visor_memregion_read failed: (status=0)\n");
rc = NULL;
goto Away;
@@ -225,8 +225,11 @@ visorchannel_read(VISORCHANNEL *channel, ulong offset,
{
int rc = visor_memregion_read(channel->memregion, offset,
local, nbytes);
- if ((rc >= 0) && (offset == 0) && (nbytes >= sizeof(CHANNEL_HEADER)))
- memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER));
+ if ((rc >= 0) && (offset == 0) &&
+ (nbytes >= sizeof(struct channel_header))) {
+ memcpy(&channel->chan_hdr, local,
+ sizeof(struct channel_header));
+ }
return rc;
}
EXPORT_SYMBOL_GPL(visorchannel_read);
@@ -235,8 +238,9 @@ int
visorchannel_write(VISORCHANNEL *channel, ulong offset,
void *local, ulong nbytes)
{
- if (offset == 0 && nbytes >= sizeof(CHANNEL_HEADER))
- memcpy(&channel->chan_hdr, local, sizeof(CHANNEL_HEADER));
+ if (offset == 0 && nbytes >= sizeof(struct channel_header))
+ memcpy(&channel->chan_hdr, local,
+ sizeof(struct channel_header));
return visor_memregion_write(channel->memregion, offset, local, nbytes);
}
EXPORT_SYMBOL_GPL(visorchannel_write);
@@ -316,7 +320,7 @@ sig_read_header(VISORCHANNEL *channel, u32 queue,
{
BOOL rc = FALSE;
- if (channel->chan_hdr.oChannelSpace < sizeof(CHANNEL_HEADER)) {
+ if (channel->chan_hdr.oChannelSpace < sizeof(struct channel_header)) {
ERRDRV("oChannelSpace too small: (status=%d)\n", rc);
goto Away;
}
@@ -559,8 +563,8 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
HOSTADDRESS addr = 0;
ulong nbytes = 0, nbytes_region = 0;
MEMREGION *memregion = NULL;
- CHANNEL_HEADER hdr;
- CHANNEL_HEADER *phdr = &hdr;
+ struct channel_header hdr;
+ struct channel_header *phdr = &hdr;
int i = 0;
int errcode = 0;
@@ -576,7 +580,7 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,
addr = visor_memregion_get_physaddr(memregion);
nbytes_region = visor_memregion_get_nbytes(memregion);
errcode = visorchannel_read(channel, off,
- phdr, sizeof(CHANNEL_HEADER));
+ phdr, sizeof(struct channel_header));
if (errcode < 0) {
seq_printf(seq,
"Read of channel header failed with errcode=%d)\n",