Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350967
b: refs/heads/master
c: 00c43b9
h: refs/heads/master
i:
  350965: ce7103d
  350963: 41c4b10
  350959: a0a35c3
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jan 30, 2013
1 parent 3ffed72 commit b02cf81
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 25 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: ca589f9469641916f4f9bd6a820012a27102ef63
refs/heads/master: 00c43b9682507dc622c03172fde1032e2a216e9d
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

int init_acpi_device_notify(void);
int acpi_scan_init(void);
void acpi_pci_root_init(void);
int acpi_sysfs_init(void);
void acpi_csrt_init(void);

Expand Down Expand Up @@ -86,7 +87,6 @@ struct acpi_ec {

extern struct acpi_ec *first_ec;

int acpi_pci_root_init(void);
int acpi_ec_init(void);
int acpi_ec_ecdt_probe(void);
int acpi_boot_ec_enable(void);
Expand Down
38 changes: 15 additions & 23 deletions trunk/drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
ACPI_MODULE_NAME("pci_root");
#define ACPI_PCI_ROOT_CLASS "pci_bridge"
#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);
static int acpi_pci_root_add(struct acpi_device *device,
const struct acpi_device_id *not_used);
static void acpi_pci_root_remove(struct acpi_device *device);

#define ACPI_PCIE_REQ_SUPPORT (OSC_EXT_PCI_CONFIG_SUPPORT \
| OSC_ACTIVE_STATE_PWR_SUPPORT \
Expand All @@ -57,16 +58,11 @@ static const struct acpi_device_id root_device_ids[] = {
{"PNP0A03", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, root_device_ids);

static struct acpi_driver acpi_pci_root_driver = {
.name = "pci_root",
.class = ACPI_PCI_ROOT_CLASS,
static struct acpi_scan_handler pci_root_handler = {
.ids = root_device_ids,
.ops = {
.add = acpi_pci_root_add,
.remove = acpi_pci_root_remove,
},
.attach = acpi_pci_root_add,
.detach = acpi_pci_root_remove,
};

/* Lock to protect both acpi_pci_roots and acpi_pci_drivers lists */
Expand Down Expand Up @@ -428,7 +424,8 @@ acpi_status acpi_pci_osc_control_set(acpi_handle handle, u32 *mask, u32 req)
}
EXPORT_SYMBOL(acpi_pci_osc_control_set);

static int acpi_pci_root_add(struct acpi_device *device)
static int acpi_pci_root_add(struct acpi_device *device,
const struct acpi_device_id *not_used)
{
unsigned long long segment, bus;
acpi_status status;
Expand Down Expand Up @@ -614,7 +611,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
pci_enable_bridges(root->bus);

pci_bus_add_devices(root->bus);
return 0;
return 1;

out_del_root:
mutex_lock(&acpi_pci_root_lock);
Expand All @@ -627,7 +624,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
return result;
}

static int acpi_pci_root_remove(struct acpi_device *device)
static void acpi_pci_root_remove(struct acpi_device *device)
{
acpi_status status;
acpi_handle handle;
Expand Down Expand Up @@ -655,19 +652,14 @@ static int acpi_pci_root_remove(struct acpi_device *device)
list_del(&root->node);
mutex_unlock(&acpi_pci_root_lock);
kfree(root);
return 0;
}

int __init acpi_pci_root_init(void)
void __init acpi_pci_root_init(void)
{
acpi_hest_init();

if (acpi_pci_disabled)
return 0;

pci_acpi_crs_quirks();
if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0)
return -ENODEV;

return 0;
if (!acpi_pci_disabled) {
pci_acpi_crs_quirks();
acpi_scan_add_handler(&pci_root_handler);
}
}

0 comments on commit b02cf81

Please sign in to comment.