Bluetooth: hci-uart-bcsp: Use GFP_ATOMIC in open()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 7 Jan 2012 14:19:39 +0000 (15:19 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 13 Feb 2012 15:01:22 +0000 (17:01 +0200)
The uart_proto open() callback is not called in atomic context so we can safely
sleep here. The caller hci_uart_set_proto() in hci_ldisc.c is an ioctl-handler
and therefore can sleep.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/hci_bcsp.c

index 9c5b2dc38e29455884618b4dfb5c8256d5fa5496..8bf0c3e774e8ae9aafe3ff9df5d3f8c3f5dc1869 100644 (file)
@@ -692,7 +692,7 @@ static int bcsp_open(struct hci_uart *hu)
 
        BT_DBG("hu %p", hu);
 
-       bcsp = kzalloc(sizeof(*bcsp), GFP_ATOMIC);
+       bcsp = kzalloc(sizeof(*bcsp), GFP_KERNEL);
        if (!bcsp)
                return -ENOMEM;