Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350829
b: refs/heads/master
c: 47525cd
h: refs/heads/master
i:
  350827: e0e0c4a
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jan 3, 2013
1 parent f6d963c commit 15960d3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4002bf384cc567a843a7d16c95db54a7d77b16c6
refs/heads/master: 47525cda88f5cc4dbe24de1cc05617c08e2d7c4a
32 changes: 11 additions & 21 deletions trunk/drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ ACPI_MODULE_NAME("pci_root");
#define ACPI_PCI_ROOT_DEVICE_NAME "PCI Root Bridge"
static int acpi_pci_root_add(struct acpi_device *device);
static int acpi_pci_root_remove(struct acpi_device *device, int type);
static int acpi_pci_root_start(struct acpi_device *device);

#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \
| OSC_ACTIVE_STATE_PWR_SUPPORT \
Expand All @@ -67,7 +66,6 @@ static struct acpi_driver acpi_pci_root_driver = {
.ops = {
.add = acpi_pci_root_add,
.remove = acpi_pci_root_remove,
.start = acpi_pci_root_start,
},
};

Expand Down Expand Up @@ -453,6 +451,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
struct acpi_pci_root *root;
acpi_handle handle;
struct acpi_device *child;
struct acpi_pci_driver *driver;
u32 flags, base_flags;
bool is_osc_granted = false;

Expand Down Expand Up @@ -632,24 +631,6 @@ static int acpi_pci_root_add(struct acpi_device *device)
if (device->wakeup.flags.run_wake)
device_set_run_wake(root->bus->bridge, true);

return 0;

out_del_root:
mutex_lock(&acpi_pci_root_lock);
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);

acpi_pci_irq_del_prt(root->segment, root->secondary.start);
end:
kfree(root);
return result;
}

static int acpi_pci_root_start(struct acpi_device *device)
{
struct acpi_pci_root *root = acpi_driver_data(device);
struct acpi_pci_driver *driver;

if (system_state != SYSTEM_BOOTING)
pci_assign_unassigned_bus_resources(root->bus);

Expand All @@ -664,8 +645,17 @@ static int acpi_pci_root_start(struct acpi_device *device)
pci_enable_bridges(root->bus);

pci_bus_add_devices(root->bus);

return 0;

out_del_root:
mutex_lock(&acpi_pci_root_lock);
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);

acpi_pci_irq_del_prt(root->segment, root->secondary.start);
end:
kfree(root);
return result;
}

static int acpi_pci_root_remove(struct acpi_device *device, int type)
Expand Down

0 comments on commit 15960d3

Please sign in to comment.