aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-01-26 19:35:58 -0500
committerBjorn Helgaas <bhelgaas@google.com>2013-01-26 19:35:58 -0500
commit939de1d69c5fb0da0cfe05a1a7c981421cf876f7 (patch)
tree3ca1c6457e1c1ae4c11adab60e94d666841983aa /drivers/acpi/osl.c
parentfb455792d91469fe556b68f1baa9ff5493432be8 (diff)
parent4f535093cf8f6da8cfda7c36c2c1ecd2e9586ee4 (diff)
Merge branch 'pci/yinghai-root-bus-hotplug' into next
* pci/yinghai-root-bus-hotplug: PCI: Put pci_dev in device tree as early as possible PCI: Skip attaching driver in device_add() PCI: acpiphp: Keep driver loaded even if no slots found PCI/ACPI: Print info if host bridge notify handler installation fails PCI: acpiphp: Move host bridge hotplug to pci_root.c PCI/ACPI: acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work() PCI: Make device create/destroy logic symmetric PCI: Fix reference count leak in pci_dev_present() PCI: Set pci_dev dev_node early so IOAPIC irq_descs are allocated locally PCI: Add root bus children dev's res to fail list PCI: acpiphp: Add is_hotplug_bridge detection Conflicts: drivers/pci/pci.h
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 3ff267861541..59ec5f52e849 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -84,8 +84,7 @@ static acpi_osd_handler acpi_irq_handler;
84static void *acpi_irq_context; 84static void *acpi_irq_context;
85static struct workqueue_struct *kacpid_wq; 85static struct workqueue_struct *kacpid_wq;
86static struct workqueue_struct *kacpi_notify_wq; 86static struct workqueue_struct *kacpi_notify_wq;
87struct workqueue_struct *kacpi_hotplug_wq; 87static struct workqueue_struct *kacpi_hotplug_wq;
88EXPORT_SYMBOL(kacpi_hotplug_wq);
89 88
90/* 89/*
91 * This list of permanent mappings is for memory that may be accessed from 90 * This list of permanent mappings is for memory that may be accessed from
@@ -1778,3 +1777,24 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
1778{ 1777{
1779 __acpi_os_prepare_sleep = func; 1778 __acpi_os_prepare_sleep = func;
1780} 1779}
1780
1781void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context,
1782 void (*func)(struct work_struct *work))
1783{
1784 struct acpi_hp_work *hp_work;
1785 int ret;
1786
1787 hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
1788 if (!hp_work)
1789 return;
1790
1791 hp_work->handle = handle;
1792 hp_work->type = type;
1793 hp_work->context = context;
1794
1795 INIT_WORK(&hp_work->work, func);
1796 ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
1797 if (!ret)
1798 kfree(hp_work);
1799}
1800EXPORT_SYMBOL_GPL(alloc_acpi_hp_work);