All of the buffers which are allocated during fw-ohci's pci_probe can be
allocated with GFP_KERNEL.
Signed-off-by: Stefan Richter <[email protected]>
---
drivers/firewire/fw-ohci.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6.23-rc6/drivers/firewire/fw-ohci.c
===================================================================
--- linux-2.6.23-rc6.orig/drivers/firewire/fw-ohci.c
+++ linux-2.6.23-rc6/drivers/firewire/fw-ohci.c
@@ -242,14 +242,14 @@ ohci_update_phy_reg(struct fw_card *card
return 0;
}
-static int ar_context_add_page(struct ar_context *ctx)
+static int ar_context_add_page(struct ar_context *ctx, gfp_t gfp_mask)
{
struct device *dev = ctx->ohci->card.device;
struct ar_buffer *ab;
dma_addr_t ab_bus;
size_t offset;
- ab = (struct ar_buffer *) __get_free_page(GFP_ATOMIC);
+ ab = (struct ar_buffer *) __get_free_page(gfp_mask);
if (ab == NULL)
return -ENOMEM;
@@ -397,7 +397,7 @@ static void ar_context_tasklet(unsigned
buffer = handle_ar_packet(ctx, buffer);
free_page((unsigned long)buffer);
- ar_context_add_page(ctx);
+ ar_context_add_page(ctx, GFP_ATOMIC);
} else {
buffer = ctx->pointer;
ctx->pointer = end =
@@ -418,8 +418,8 @@ ar_context_init(struct ar_context *ctx,
ctx->last_buffer = &ab;
tasklet_init(&ctx->tasklet, ar_context_tasklet, (unsigned long)ctx);
- ar_context_add_page(ctx);
- ar_context_add_page(ctx);
+ ar_context_add_page(ctx, GFP_KERNEL);
+ ar_context_add_page(ctx, GFP_KERNEL);
ctx->current_buffer = ab.next;
ctx->pointer = ctx->current_buffer->data;
--
Stefan Richter
-=====-=-=== =-=- =----
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]