Commit 35c3404e authored by Ulrich Kunitz's avatar Ulrich Kunitz Committed by Jeff Garzik

[PATCH] zd1211rw: changed GFP_NOFS to GFP_KERNEL

Michael Buesch commented that GFP_NOFS should not be used in a
network driver.
Signed-off-by: default avatarUlrich Kunitz <kune@deine-taler.de>
Signed-off-by: default avatarDaniel Drake <dsd@gentoo.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 375dd244
...@@ -114,7 +114,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr ...@@ -114,7 +114,7 @@ int zd_ioread32v_locked(struct zd_chip *chip, u32 *values, const zd_addr_t *addr
/* Allocate a single memory block for values and addresses. */ /* Allocate a single memory block for values and addresses. */
count16 = 2*count; count16 = 2*count;
a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)), a16 = (zd_addr_t *) kmalloc(count16 * (sizeof(zd_addr_t) + sizeof(u16)),
GFP_NOFS); GFP_KERNEL);
if (!a16) { if (!a16) {
dev_dbg_f(zd_chip_dev(chip), dev_dbg_f(zd_chip_dev(chip),
"error ENOMEM in allocation of a16\n"); "error ENOMEM in allocation of a16\n");
...@@ -163,7 +163,7 @@ int _zd_iowrite32v_locked(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs, ...@@ -163,7 +163,7 @@ int _zd_iowrite32v_locked(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs,
/* Allocate a single memory block for values and addresses. */ /* Allocate a single memory block for values and addresses. */
count16 = 2*count; count16 = 2*count;
ioreqs16 = kmalloc(count16 * sizeof(struct zd_ioreq16), GFP_NOFS); ioreqs16 = kmalloc(count16 * sizeof(struct zd_ioreq16), GFP_KERNEL);
if (!ioreqs16) { if (!ioreqs16) {
r = -ENOMEM; r = -ENOMEM;
dev_dbg_f(zd_chip_dev(chip), dev_dbg_f(zd_chip_dev(chip),
......
...@@ -413,7 +413,7 @@ int zd_usb_enable_int(struct zd_usb *usb) ...@@ -413,7 +413,7 @@ int zd_usb_enable_int(struct zd_usb *usb)
dev_dbg_f(zd_usb_dev(usb), "\n"); dev_dbg_f(zd_usb_dev(usb), "\n");
urb = usb_alloc_urb(0, GFP_NOFS); urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) { if (!urb) {
r = -ENOMEM; r = -ENOMEM;
goto out; goto out;
...@@ -431,7 +431,7 @@ int zd_usb_enable_int(struct zd_usb *usb) ...@@ -431,7 +431,7 @@ int zd_usb_enable_int(struct zd_usb *usb)
/* TODO: make it a DMA buffer */ /* TODO: make it a DMA buffer */
r = -ENOMEM; r = -ENOMEM;
transfer_buffer = kmalloc(USB_MAX_EP_INT_BUFFER, GFP_NOFS); transfer_buffer = kmalloc(USB_MAX_EP_INT_BUFFER, GFP_KERNEL);
if (!transfer_buffer) { if (!transfer_buffer) {
dev_dbg_f(zd_usb_dev(usb), dev_dbg_f(zd_usb_dev(usb),
"couldn't allocate transfer_buffer\n"); "couldn't allocate transfer_buffer\n");
...@@ -445,7 +445,7 @@ int zd_usb_enable_int(struct zd_usb *usb) ...@@ -445,7 +445,7 @@ int zd_usb_enable_int(struct zd_usb *usb)
intr->interval); intr->interval);
dev_dbg_f(zd_usb_dev(usb), "submit urb %p\n", intr->urb); dev_dbg_f(zd_usb_dev(usb), "submit urb %p\n", intr->urb);
r = usb_submit_urb(urb, GFP_NOFS); r = usb_submit_urb(urb, GFP_KERNEL);
if (r) { if (r) {
dev_dbg_f(zd_usb_dev(usb), dev_dbg_f(zd_usb_dev(usb),
"Couldn't submit urb. Error number %d\n", r); "Couldn't submit urb. Error number %d\n", r);
...@@ -594,10 +594,10 @@ static struct urb *alloc_urb(struct zd_usb *usb) ...@@ -594,10 +594,10 @@ static struct urb *alloc_urb(struct zd_usb *usb)
struct urb *urb; struct urb *urb;
void *buffer; void *buffer;
urb = usb_alloc_urb(0, GFP_NOFS); urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) if (!urb)
return NULL; return NULL;
buffer = usb_buffer_alloc(udev, USB_MAX_RX_SIZE, GFP_NOFS, buffer = usb_buffer_alloc(udev, USB_MAX_RX_SIZE, GFP_KERNEL,
&urb->transfer_dma); &urb->transfer_dma);
if (!buffer) { if (!buffer) {
usb_free_urb(urb); usb_free_urb(urb);
...@@ -630,7 +630,7 @@ int zd_usb_enable_rx(struct zd_usb *usb) ...@@ -630,7 +630,7 @@ int zd_usb_enable_rx(struct zd_usb *usb)
dev_dbg_f(zd_usb_dev(usb), "\n"); dev_dbg_f(zd_usb_dev(usb), "\n");
r = -ENOMEM; r = -ENOMEM;
urbs = kcalloc(URBS_COUNT, sizeof(struct urb *), GFP_NOFS); urbs = kcalloc(URBS_COUNT, sizeof(struct urb *), GFP_KERNEL);
if (!urbs) if (!urbs)
goto error; goto error;
for (i = 0; i < URBS_COUNT; i++) { for (i = 0; i < URBS_COUNT; i++) {
...@@ -651,7 +651,7 @@ int zd_usb_enable_rx(struct zd_usb *usb) ...@@ -651,7 +651,7 @@ int zd_usb_enable_rx(struct zd_usb *usb)
spin_unlock_irq(&rx->lock); spin_unlock_irq(&rx->lock);
for (i = 0; i < URBS_COUNT; i++) { for (i = 0; i < URBS_COUNT; i++) {
r = usb_submit_urb(urbs[i], GFP_NOFS); r = usb_submit_urb(urbs[i], GFP_KERNEL);
if (r) if (r)
goto error_submit; goto error_submit;
} }
...@@ -1157,7 +1157,7 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values, ...@@ -1157,7 +1157,7 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
} }
req_len = sizeof(struct usb_req_read_regs) + count * sizeof(__le16); req_len = sizeof(struct usb_req_read_regs) + count * sizeof(__le16);
req = kmalloc(req_len, GFP_NOFS); req = kmalloc(req_len, GFP_KERNEL);
if (!req) if (!req)
return -ENOMEM; return -ENOMEM;
req->id = cpu_to_le16(USB_REQ_READ_REGS); req->id = cpu_to_le16(USB_REQ_READ_REGS);
...@@ -1220,7 +1220,7 @@ int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs, ...@@ -1220,7 +1220,7 @@ int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
req_len = sizeof(struct usb_req_write_regs) + req_len = sizeof(struct usb_req_write_regs) +
count * sizeof(struct reg_data); count * sizeof(struct reg_data);
req = kmalloc(req_len, GFP_NOFS); req = kmalloc(req_len, GFP_KERNEL);
if (!req) if (!req)
return -ENOMEM; return -ENOMEM;
...@@ -1300,7 +1300,7 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits) ...@@ -1300,7 +1300,7 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
bit_value_template &= ~(RF_IF_LE|RF_CLK|RF_DATA); bit_value_template &= ~(RF_IF_LE|RF_CLK|RF_DATA);
req_len = sizeof(struct usb_req_rfwrite) + bits * sizeof(__le16); req_len = sizeof(struct usb_req_rfwrite) + bits * sizeof(__le16);
req = kmalloc(req_len, GFP_NOFS); req = kmalloc(req_len, GFP_KERNEL);
if (!req) if (!req)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment