staging: unisys: Eliminate visor_memregion_read()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 5 May 2015 22:36:58 +0000 (18:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 13:27:29 +0000 (15:27 +0200)
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>
drivers/staging/unisys/visorbus/visorchannel.c
drivers/staging/unisys/visorutil/memregion.h
drivers/staging/unisys/visorutil/memregion_direct.c

index 6d7ea8bf435d07dead922d807bfa59a39cb71662..549128d29892d42097d9c94e6e309ff9ccf80bc6 100644 (file)
@@ -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;
 
index 68939371f2ba0dd395a9ab7d5b8f4feee1f1a712..4122b48f67075c393ab7f684bd7e7d68ea212aa1 100644 (file)
@@ -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,
index 82fb263c6747032f813bfb016b3f8d00b25a9020..17b1033a88263749cc5ae6d500efcc2705a216ef 100644 (file)
 
 #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)