/* Root bridges will not have hotplug context. */
if (context) {
/* Release the reference taken by acpiphp_enumerate_slots(). */
- put_bridge(context->func.slot->bridge);
+ put_bridge(context->func.parent);
context->bridge = NULL;
acpiphp_put_context(context);
}
static void post_dock_fixups(acpi_handle not_used, u32 event, void *data)
{
struct acpiphp_context *context = data;
- struct pci_bus *bus = context->func.slot->bridge->pci_bus;
+ struct pci_bus *bus = context->func.slot->bus;
u32 buses;
if (!bus->self)
{
struct acpiphp_context *context = data;
- get_bridge(context->func.slot->bridge);
+ get_bridge(context->func.parent);
}
static void acpiphp_dock_release(void *data)
{
struct acpiphp_context *context = data;
- put_bridge(context->func.slot->bridge);
+ put_bridge(context->func.parent);
}
/* callback routine to register each ACPI PCI slot object */
}
newfunc = &context->func;
newfunc->function = function;
+ newfunc->parent = bridge;
mutex_unlock(&acpiphp_context_lock);
if (acpi_has_method(handle, "_EJ0"))
goto err;
}
- slot->bridge = bridge;
+ slot->bus = bridge->pci_bus;
slot->device = device;
INIT_LIST_HEAD(&slot->funcs);
mutex_init(&slot->crit_sect);
static int __ref enable_device(struct acpiphp_slot *slot)
{
struct pci_dev *dev;
- struct pci_bus *bus = slot->bridge->pci_bus;
+ struct pci_bus *bus = slot->bus;
struct acpiphp_func *func;
int num, max, pass;
LIST_HEAD(add_list);
/* return first device in slot, acquiring a reference on it */
static struct pci_dev *dev_in_slot(struct acpiphp_slot *slot)
{
- struct pci_bus *bus = slot->bridge->pci_bus;
+ struct pci_bus *bus = slot->bus;
struct pci_dev *dev;
struct pci_dev *ret = NULL;
} else {
u32 dvid;
- pci_bus_read_config_dword(slot->bridge->pci_bus,
+ pci_bus_read_config_dword(slot->bus,
PCI_DEVFN(slot->device,
func->function),
PCI_VENDOR_ID, &dvid);
if (bridge)
acpiphp_check_bridge(bridge);
else
- acpiphp_check_bridge(func->slot->bridge);
+ acpiphp_check_bridge(func->parent);
break;
acpi_scan_lock_release();
kfree(hp_work); /* allocated in handle_hotplug_event() */
- put_bridge(context->func.slot->bridge);
+ put_bridge(context->func.parent);
}
/**
mutex_lock(&acpiphp_context_lock);
context = acpiphp_get_context(handle);
if (context) {
- get_bridge(context->func.slot->bridge);
+ get_bridge(context->func.parent);
acpiphp_put_context(context);
}
mutex_unlock(&acpiphp_context_lock);
bridge->context = context;
context->bridge = bridge;
/* Get a reference to the parent bridge. */
- get_bridge(context->func.slot->bridge);
+ get_bridge(context->func.parent);
mutex_unlock(&acpiphp_context_lock);
}