diff options
author | Jiri Kosina <jikos@jikos.cz> | 2006-08-24 00:36:19 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-10-14 01:54:21 -0400 |
commit | 168a328f30e9d1a8bc6ff55c0501e0bdc08bee60 (patch) | |
tree | 16c6e686a55596bdf3110366f6a408407b682710 /drivers/acpi | |
parent | 786f18c666d7202a86a8aa42a98783b115fe8739 (diff) | |
download | blackbird-obmc-linux-168a328f30e9d1a8bc6ff55c0501e0bdc08bee60.tar.gz blackbird-obmc-linux-168a328f30e9d1a8bc6ff55c0501e0bdc08bee60.zip |
ACPI: acpi_pci_link_set() can allocate with either GFP_ATOMIC or GFP_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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/pci_link.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 7f3e7e77e794..d53bd9878ca2 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -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; |