[PATCH 081/141] staging: unisys: Eliminate visor_memregion_read()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>

Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 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 6d7ea8b..549128d 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 6893937..4122b48 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 82fb263..17b1033 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)
 {
-- 
2.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux