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,7 +307,7 @@ sig_read_header(struct visorchannel *channel, u32 queue,
return FALSE;
/* 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_hdr, sizeof(struct signal_queue_header));
if (err)
......@@ -324,8 +324,7 @@ sig_read_data(struct visorchannel *channel, u32 queue,
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
sig_hdr, slot);
err = visor_memregion_read(&channel->memregion,
signal_data_offset,
err = visorchannel_read(channel, signal_data_offset,
data, sig_hdr->signal_size);
if (err)
return FALSE;
......
......@@ -29,8 +29,6 @@ struct memregion {
void __iomem *mapped;
};
int visor_memregion_read(struct memregion *memregion,
ulong offset, void *dest, ulong nbytes);
int visor_memregion_write(struct memregion *memregion,
ulong offset, void *src, ulong nbytes);
void memregion_dump(struct memregion *memregion, char *s,
......
......@@ -25,18 +25,6 @@
#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
visor_memregion_write(struct memregion *memregion, ulong offset, void *src,
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