Commit 3b5bd6cc authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: unisys: Eliminate visor_memregion_read()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d622e84
...@@ -307,9 +307,9 @@ sig_read_header(struct visorchannel *channel, u32 queue, ...@@ -307,9 +307,9 @@ sig_read_header(struct visorchannel *channel, u32 queue,
return FALSE; return FALSE;
/* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */ /* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */
err = visor_memregion_read(&channel->memregion, err = visorchannel_read(channel,
SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
sig_hdr, sizeof(struct signal_queue_header)); sig_hdr, sizeof(struct signal_queue_header));
if (err) if (err)
return FALSE; return FALSE;
...@@ -324,9 +324,8 @@ sig_read_data(struct visorchannel *channel, u32 queue, ...@@ -324,9 +324,8 @@ sig_read_data(struct visorchannel *channel, u32 queue,
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue, int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
sig_hdr, slot); sig_hdr, slot);
err = visor_memregion_read(&channel->memregion, err = visorchannel_read(channel, signal_data_offset,
signal_data_offset, data, sig_hdr->signal_size);
data, sig_hdr->signal_size);
if (err) if (err)
return FALSE; return FALSE;
......
...@@ -29,8 +29,6 @@ struct memregion { ...@@ -29,8 +29,6 @@ struct memregion {
void __iomem *mapped; void __iomem *mapped;
}; };
int visor_memregion_read(struct memregion *memregion,
ulong offset, void *dest, ulong nbytes);
int visor_memregion_write(struct memregion *memregion, int visor_memregion_write(struct memregion *memregion,
ulong offset, void *src, ulong nbytes); ulong offset, void *src, ulong nbytes);
void memregion_dump(struct memregion *memregion, char *s, void memregion_dump(struct memregion *memregion, char *s,
......
...@@ -25,18 +25,6 @@ ...@@ -25,18 +25,6 @@
#define MYDRVNAME "memregion" #define MYDRVNAME "memregion"
int
visor_memregion_read(struct memregion *memregion, ulong offset, void *dest,
ulong nbytes)
{
if (offset + nbytes > memregion->nbytes)
return -EIO;
memcpy_fromio(dest, memregion->mapped + offset, nbytes);
return 0;
}
EXPORT_SYMBOL_GPL(visor_memregion_read);
int int
visor_memregion_write(struct memregion *memregion, ulong offset, void *src, visor_memregion_write(struct memregion *memregion, ulong offset, void *src,
ulong nbytes) ulong nbytes)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment