]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 25 Oct 2011 10:09:52 +0000 (12:09 +0200)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 31 Oct 2011 19:47:19 +0000 (17:47 -0200)
We are allowed to sleep here so no need to use GFP_ATOMIC. The caller
(ath3k_probe) calls request_firmware() which definitely sleeps. Hence, we should
avoid using GFP_ATOMIC.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
drivers/bluetooth/ath3k.c

index db7cb8111fbe58a89f21ee6ccea50467356bd38a..106beb194f3c8d438e105dab8d12aaecb8716103 100644 (file)
@@ -105,7 +105,7 @@ static int ath3k_load_firmware(struct usb_device *udev,
 
        pipe = usb_sndctrlpipe(udev, 0);
 
-       send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
+       send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
        if (!send_buf) {
                BT_ERR("Can't allocate memory chunk for firmware");
                return -ENOMEM;
@@ -176,7 +176,7 @@ static int ath3k_load_fwfile(struct usb_device *udev,
 
        count = firmware->size;
 
-       send_buf = kmalloc(BULK_SIZE, GFP_ATOMIC);
+       send_buf = kmalloc(BULK_SIZE, GFP_KERNEL);
        if (!send_buf) {
                BT_ERR("Can't allocate memory chunk for firmware");
                return -ENOMEM;