All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC
@ 2011-10-25  9:49 David Herrmann
  2011-10-25 10:09 ` [PATCH v2] " David Herrmann
  0 siblings, 1 reply; 3+ messages in thread
From: David Herrmann @ 2011-10-25  9:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: vkandukuri, sbalashanmugam, padovan, David Herrmann

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>
---
 drivers/bluetooth/ath3k.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index db7cb81..bcf9727 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -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;
-- 
1.7.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-31 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25  9:49 [PATCH] Bluetooth: ath3k: Use GFP_KERNEL instead of GFP_ATOMIC David Herrmann
2011-10-25 10:09 ` [PATCH v2] " David Herrmann
2011-10-31 19:38   ` Gustavo Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.