]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: unisys: memregion: Eliminate visor_memregion_destroy()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Tue, 5 May 2015 22:36:50 +0000 (18:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 13:27:28 +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 f278739514f72b76f3df26e5e5a88981eb3d6d88..42fabeafc01ea3e099e791ebc9261f9082366991 100644 (file)
@@ -124,7 +124,11 @@ visorchannel_destroy(struct visorchannel *channel)
 {
        if (!channel)
                return;
-       visor_memregion_destroy(&channel->memregion);
+       if (channel->memregion.mapped) {
+               iounmap(channel->memregion.mapped);
+               release_mem_region(channel->memregion.physaddr,
+                                  channel->memregion.nbytes);
+       }
        kfree(channel);
 }
 EXPORT_SYMBOL_GPL(visorchannel_destroy);
index cb3dbc50cd8ee42c52d02d431b3a37ef9df2929a..60d0dc9f07bcc6058ed2c64f4fe9f08c66b5ecf9 100644 (file)
@@ -34,7 +34,6 @@ 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 visor_memregion_destroy(struct memregion *memregion);
 HOSTADDRESS visor_memregion_get_physaddr(struct memregion *memregion);
 ulong visor_memregion_get_nbytes(struct memregion *memregion);
 void memregion_dump(struct memregion *memregion, char *s,
index 0c7bed010c84238a6ce640cf7f55a8b80cee5ec0..79ef4c5c686b54c7f02e900a449be8fb71287490 100644 (file)
@@ -115,12 +115,3 @@ visor_memregion_write(struct memregion *memregion, ulong offset, void *src,
        return 0;
 }
 EXPORT_SYMBOL_GPL(visor_memregion_write);
-
-void
-visor_memregion_destroy(struct memregion *memregion)
-{
-       if (!memregion)
-               return;
-       unmapit(memregion);
-}
-EXPORT_SYMBOL_GPL(visor_memregion_destroy);