From 3b5bd6cca5b5d26cea73bfa2f078498a7f64957e Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Tue, 5 May 2015 18:36:58 -0400 Subject: [PATCH] staging: unisys: Eliminate visor_memregion_read() Signed-off-by: Jes Sorensen Signed-off-by: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorchannel.c | 11 +++++------ drivers/staging/unisys/visorutil/memregion.h | 2 -- 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 @@ -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) -- 2.30.2