aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys
diff options
context:
space:
mode:
authorHariprasad Kelam <hariprasad.kelam@gmail.com>2019-05-22 22:35:30 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-23 09:23:15 +0200
commit2a8af420e7a58485bc5052c16c3d51913163e0fc (patch)
treedf5900a59da4a3edf05b5b95ed616c903088de5f /drivers/staging/unisys
parentstaging: kpc2000: kpc_i2c: add static qual to local symbols in kpc_i2c.c (diff)
downloadlinux-dev-2a8af420e7a58485bc5052c16c3d51913163e0fc.tar.xz
linux-dev-2a8af420e7a58485bc5052c16c3d51913163e0fc.zip
staging: unisys: visornic: Replace GFP_ATOMIC with GFP_KERNEL
As per below information GFP_KERNEL FLAG This is a normal allocation and might block. This is the flag to use in process context code when it is safe to sleep. GFP_ATOMIC FLAG The allocation is high-priority and does not sleep. This is the flag to use in interrupt handlers, bottom halves and other situations where you cannot sleep And we can take advantage of GFP_KERNEL , as when system is in low memory chances of getting success is high compared to GFP_ATOMIC. As visornic_probe is in process context we can use GPF_KERNEL. Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r--drivers/staging/unisys/visornic/visornic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 1c1a470d2e50..9d4f1dab0968 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1861,12 +1861,12 @@ static int visornic_probe(struct visor_device *dev)
skb_queue_head_init(&devdata->xmitbufhead);
/* create a cmdrsp we can use to post and unpost rcv buffers */
- devdata->cmdrsp_rcv = kmalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
+ devdata->cmdrsp_rcv = kmalloc(SIZEOF_CMDRSP, GFP_KERNEL);
if (!devdata->cmdrsp_rcv) {
err = -ENOMEM;
goto cleanup_rcvbuf;
}
- devdata->xmit_cmdrsp = kmalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
+ devdata->xmit_cmdrsp = kmalloc(SIZEOF_CMDRSP, GFP_KERNEL);
if (!devdata->xmit_cmdrsp) {
err = -ENOMEM;
goto cleanup_cmdrsp_rcv;