static void _handle_hotplug_event_bridge(struct work_struct *work)
{
+ struct acpiphp_context *context;
struct acpiphp_bridge *bridge;
char objname[64];
struct acpi_buffer buffer = { .length = sizeof(objname),
hp_work = container_of(work, struct acpi_hp_work, work);
handle = hp_work->handle;
type = hp_work->type;
- bridge = (struct acpiphp_bridge *)hp_work->context;
+ context = hp_work->context;
+ bridge = context->bridge;
acpi_scan_lock_acquire();
static void _handle_hotplug_event_func(struct work_struct *work)
{
+ struct acpiphp_context *context;
struct acpi_hp_work *hp_work;
- struct acpiphp_func *func;
hp_work = container_of(work, struct acpi_hp_work, work);
- func = hp_work->context;
+ context = hp_work->context;
acpi_scan_lock_acquire();
- hotplug_event_func(hp_work->handle, hp_work->type, func);
+ hotplug_event_func(hp_work->handle, hp_work->type, context->func);
acpi_scan_lock_release();
kfree(hp_work); /* allocated in handle_hotplug_event_func */
- put_bridge(func->slot->bridge);
+ put_bridge(context->func->slot->bridge);
}
/**
if (context) {
if (context->bridge) {
get_bridge(context->bridge);
- data = context->bridge;
work_func = _handle_hotplug_event_bridge;
} else if (context->func) {
get_bridge(context->func->slot->bridge);
- data = context->func;
work_func = _handle_hotplug_event_func;
}
acpiphp_put_context(context);
* don't deadlock on hotplug actions.
*/
if (work_func)
- alloc_acpi_hp_work(handle, type, data, work_func);
+ alloc_acpi_hp_work(handle, type, context, work_func);
}
/*