diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2015-05-05 18:36:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-08 15:27:29 +0200 |
commit | 3b5bd6cca5b5d26cea73bfa2f078498a7f64957e (patch) | |
tree | 0da632a9391ef019fc59443c1bdb2d8ccfd33752 /drivers/staging/unisys | |
parent | 0d622e84f8063d4aab75a3d4e4de72efcb85dacb (diff) |
staging: unisys: Eliminate visor_memregion_read()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchannel.c | 11 | ||||
-rw-r--r-- | drivers/staging/unisys/visorutil/memregion.h | 2 | ||||
-rw-r--r-- | drivers/staging/unisys/visorutil/memregion_direct.c | 12 |
3 files changed, 5 insertions, 20 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c index 6d7ea8bf435d..549128d29892 100644 --- a/drivers/staging/unisys/visorbus/visorchannel.c +++ b/drivers/staging/unisys/visorbus/visorchannel.c @@ -307,9 +307,9 @@ 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, - SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), - sig_hdr, sizeof(struct signal_queue_header)); + err = visorchannel_read(channel, + SIG_QUEUE_OFFSET(&channel->chan_hdr, queue), + sig_hdr, sizeof(struct signal_queue_header)); if (err) return FALSE; @@ -324,9 +324,8 @@ 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, - data, sig_hdr->signal_size); + err = visorchannel_read(channel, signal_data_offset, + data, sig_hdr->signal_size); if (err) return FALSE; diff --git a/drivers/staging/unisys/visorutil/memregion.h b/drivers/staging/unisys/visorutil/memregion.h index 68939371f2ba..4122b48f6707 100644 --- a/drivers/staging/unisys/visorutil/memregion.h +++ b/drivers/staging/unisys/visorutil/memregion.h @@ -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, diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c index 82fb263c6747..17b1033a8826 100644 --- a/drivers/staging/unisys/visorutil/memregion_direct.c +++ b/drivers/staging/unisys/visorutil/memregion_direct.c @@ -26,18 +26,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) { |