summaryrefslogtreecommitdiff
path: root/drivers/staging/unisys/visorbus/visorchannel.c
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2015-05-05 18:37:10 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-08 15:27:32 +0200
commitdf94247a8987b1ab5be2330c7d07b51980592fe0 (patch)
tree09c885164932effc930994da6439aba8b6305f17 /drivers/staging/unisys/visorbus/visorchannel.c
parent1210f8e72b06e53975c5719db2a14f8bffdd4870 (diff)
staging: unisys: visorchannel: Make visorchannel_create take a gfp_t
This allows the caller to specify an appropriate GFP flag instead of hardcoding the lowest common denominator. 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/unisys/visorbus/visorchannel.c')
-rw-r--r--drivers/staging/unisys/visorbus/visorchannel.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchannel.c b/drivers/staging/unisys/visorbus/visorchannel.c
index 44ea43462803..2d3e4d6defea 100644
--- a/drivers/staging/unisys/visorbus/visorchannel.c
+++ b/drivers/staging/unisys/visorbus/visorchannel.c
@@ -50,14 +50,15 @@ struct visorchannel {
* but does NOT modify this data area.
*/
static struct visorchannel *
-visorchannel_create_guts(u64 physaddr, ulong channel_bytes,
- ulong off, uuid_le guid, bool needs_lock)
+visorchannel_create_guts(u64 physaddr, unsigned long channel_bytes,
+ gfp_t gfp, unsigned long off,
+ uuid_le guid, bool needs_lock)
{
struct visorchannel *channel;
int err;
size_t size = sizeof(struct channel_header);
- channel = kzalloc(sizeof(*channel), GFP_KERNEL|__GFP_NORETRY);
+ channel = kzalloc(sizeof(*channel), gfp);
if (!channel)
goto cleanup;
@@ -112,18 +113,19 @@ cleanup:
}
struct visorchannel *
-visorchannel_create(u64 physaddr, ulong channel_bytes, uuid_le guid)
+visorchannel_create(u64 physaddr, unsigned long channel_bytes,
+ gfp_t gfp, uuid_le guid)
{
- return visorchannel_create_guts(physaddr, channel_bytes, 0, guid,
+ return visorchannel_create_guts(physaddr, channel_bytes, gfp, 0, guid,
false);
}
EXPORT_SYMBOL_GPL(visorchannel_create);
struct visorchannel *
-visorchannel_create_with_lock(u64 physaddr, ulong channel_bytes,
- uuid_le guid)
+visorchannel_create_with_lock(u64 physaddr, unsigned long channel_bytes,
+ gfp_t gfp, uuid_le guid)
{
- return visorchannel_create_guts(physaddr, channel_bytes, 0, guid,
+ return visorchannel_create_guts(physaddr, channel_bytes, gfp, 0, guid,
true);
}
EXPORT_SYMBOL_GPL(visorchannel_create_with_lock);