aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-09-17 22:16:13 -0700
committerYinghai Lu <yinghai@kernel.org>2012-09-17 22:16:13 -0700
commit0990326afe611d6f633054126ed5cce7b102654d (patch)
treea69e5e7edc8894813dc79871f09fce7c6784bc26
parentee1d3952479ab5299e322fbddd6dabcdceac028b (diff)
downloadlinux-yinghai-0990326afe611d6f633054126ed5cce7b102654d.tar.gz
PCI, pci_root_hp: Use acpi_hp_work
Remove local copy: acpi_root_hp_work Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: linux-acpi@vger.kernel.org
-rw-r--r--drivers/acpi/pci_root_hp.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/drivers/acpi/pci_root_hp.c b/drivers/acpi/pci_root_hp.c
index 434ee35b0e6cec..e573298d045bdf 100644
--- a/drivers/acpi/pci_root_hp.c
+++ b/drivers/acpi/pci_root_hp.c
@@ -79,34 +79,6 @@ static void remove_acpi_root_bridge(struct acpi_root_bridge *bridge)
kfree(bridge);
}
-struct acpi_root_hp_work {
- struct work_struct work;
- acpi_handle handle;
- u32 type;
- void *context;
-};
-
-static void alloc_acpi_root_hp_work(acpi_handle handle, u32 type,
- void *context,
- void (*func)(struct work_struct *work))
-{
- struct acpi_root_hp_work *hp_work;
- int ret;
-
- hp_work = kmalloc(sizeof(*hp_work), GFP_KERNEL);
- if (!hp_work)
- return;
-
- hp_work->handle = handle;
- hp_work->type = type;
- hp_work->context = context;
-
- INIT_WORK(&hp_work->work, func);
- ret = queue_work(kacpi_hotplug_wq, &hp_work->work);
- if (!ret)
- kfree(hp_work);
-}
-
/* Program resources in newly inserted bridge */
static void acpi_root_configure_bridge(struct acpi_device *device)
{
@@ -210,11 +182,11 @@ static void _handle_hotplug_event_root(struct work_struct *work)
char objname[64];
struct acpi_buffer buffer = { .length = sizeof(objname),
.pointer = objname };
- struct acpi_root_hp_work *hp_work;
+ struct acpi_hp_work *hp_work;
acpi_handle handle;
u32 type;
- hp_work = container_of(work, struct acpi_root_hp_work, work);
+ hp_work = container_of(work, struct acpi_hp_work, work);
handle = hp_work->handle;
type = hp_work->type;
@@ -262,7 +234,7 @@ static void _handle_hotplug_event_root(struct work_struct *work)
static void handle_hotplug_event_root(acpi_handle handle, u32 type,
void *context)
{
- alloc_acpi_root_hp_work(handle, type, context,
+ alloc_acpi_hp_work(handle, type, context,
_handle_hotplug_event_root);
}