Char: nozomi, use GFP_KERNEL for kfifo allocation
authorJiri Slaby <jslaby@suse.cz>
Wed, 20 Apr 2011 08:43:12 +0000 (10:43 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 25 Apr 2011 21:19:10 +0000 (14:19 -0700)
The allocation was moved to probe function in 9842c38e9176. And we can
sleep there. So allocate the 4*8192 bytes as GFP_KERNEL to mitigate
the allocation failure.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Tested-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/nozomi.c

index fd0a98524d513482807c30055b849726f953b590..acaecc173881b8cc478818b57b80e08b773e71a4 100644 (file)
@@ -1431,8 +1431,8 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
        }
 
        for (i = PORT_MDM; i < MAX_PORT; i++) {
-               if (kfifo_alloc(&dc->port[i].fifo_ul,
-                     FIFO_BUFFER_SIZE_UL, GFP_ATOMIC)) {
+               if (kfifo_alloc(&dc->port[i].fifo_ul, FIFO_BUFFER_SIZE_UL,
+                                       GFP_KERNEL)) {
                        dev_err(&pdev->dev,
                                        "Could not allocate kfifo buffer\n");
                        ret = -ENOMEM;