Skip to content

Commit

Permalink
ACPI: acpi_pci_link_set() can allocate with either GFP_ATOMIC or GFP_…
Browse files Browse the repository at this point in the history
…KERNEL

acpi_pci_link_set() allocates both with interrupts on
and with interrupts off (resume-time), so check interrupts
and decide on GFP_ATOMIC or GFP_KERNEL at run-time.

Signed-off-by: Jiri Kosina <jikos@jikos.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Jiri Kosina authored and Len Brown committed Oct 14, 2006
1 parent 786f18c commit 168a328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/pci_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
if (!link || !irq)
return -EINVAL;

resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
resource = kmalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL);
if (!resource)
return -ENOMEM;

Expand Down

0 comments on commit 168a328

Please sign in to comment.