summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2015-05-05 18:36:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 15:27:28 +0200
commit0dbb3fb66b9e9c81866e89961fa418d6ae135ea6 (patch)
treef5365f1548cecdc8c008aa3f244eca5ed0bec05d /drivers/staging
parentaefebaa5bc6a22674adda07e001c5c8204ee608f (diff)
staging: unisys: memregion: Eliminate visor_memregion_destroy()
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')
-rw-r--r--drivers/staging/unisys/visorbus/visorchannel.c6
-rw-r--r--drivers/staging/unisys/visorutil/memregion.h1
-rw-r--r--drivers/staging/unisys/visorutil/memregion_direct.c9
3 files changed, 5 insertions, 11 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index f278739514f7..42fabeafc01e 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -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);
diff --git a/drivers/staging/unisys/visorutil/memregion.h b/drivers/staging/unisys/visorutil/memregion.h
index cb3dbc50cd8e..60d0dc9f07bc 100644
--- a/drivers/staging/unisys/visorutil/memregion.h
+++ b/drivers/staging/unisys/visorutil/memregion.h
@@ -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,
diff --git a/drivers/staging/unisys/visorutil/memregion_direct.c b/drivers/staging/unisys/visorutil/memregion_direct.c
index 0c7bed010c84..79ef4c5c686b 100644
--- a/drivers/staging/unisys/visorutil/memregion_direct.c
+++ b/drivers/staging/unisys/visorutil/memregion_direct.c
@@ -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);