aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_root.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/pci_root.c')
-rw-r--r--drivers/acpi/pci_root.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 8f10442119f0..0984a1ee24ed 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -58,7 +58,7 @@ static struct acpi_driver acpi_pci_root_driver = {
58 58
59struct acpi_pci_root { 59struct acpi_pci_root {
60 struct list_head node; 60 struct list_head node;
61 acpi_handle handle; 61 struct acpi_device * device;
62 struct acpi_pci_id id; 62 struct acpi_pci_id id;
63 struct pci_bus *bus; 63 struct pci_bus *bus;
64}; 64};
@@ -83,7 +83,7 @@ int acpi_pci_register_driver(struct acpi_pci_driver *driver)
83 list_for_each(entry, &acpi_pci_roots) { 83 list_for_each(entry, &acpi_pci_roots) {
84 struct acpi_pci_root *root; 84 struct acpi_pci_root *root;
85 root = list_entry(entry, struct acpi_pci_root, node); 85 root = list_entry(entry, struct acpi_pci_root, node);
86 driver->add(root->handle); 86 driver->add(root->device->handle);
87 n++; 87 n++;
88 } 88 }
89 89
@@ -110,7 +110,7 @@ void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
110 list_for_each(entry, &acpi_pci_roots) { 110 list_for_each(entry, &acpi_pci_roots) {
111 struct acpi_pci_root *root; 111 struct acpi_pci_root *root;
112 root = list_entry(entry, struct acpi_pci_root, node); 112 root = list_entry(entry, struct acpi_pci_root, node);
113 driver->remove(root->handle); 113 driver->remove(root->device->handle);
114 } 114 }
115} 115}
116 116
@@ -170,7 +170,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
170 memset(root, 0, sizeof(struct acpi_pci_root)); 170 memset(root, 0, sizeof(struct acpi_pci_root));
171 INIT_LIST_HEAD(&root->node); 171 INIT_LIST_HEAD(&root->node);
172 172
173 root->handle = device->handle; 173 root->device = device;
174 strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME); 174 strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME);
175 strcpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS); 175 strcpy(acpi_device_class(device), ACPI_PCI_ROOT_CLASS);
176 acpi_driver_data(device) = root; 176 acpi_driver_data(device) = root;
@@ -185,7 +185,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
185 * ------- 185 * -------
186 * Obtained via _SEG, if exists, otherwise assumed to be zero (0). 186 * Obtained via _SEG, if exists, otherwise assumed to be zero (0).
187 */ 187 */
188 status = acpi_evaluate_integer(root->handle, METHOD_NAME__SEG, NULL, 188 status = acpi_evaluate_integer(device->handle, METHOD_NAME__SEG, NULL,
189 &value); 189 &value);
190 switch (status) { 190 switch (status) {
191 case AE_OK: 191 case AE_OK:
@@ -207,7 +207,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
207 * --- 207 * ---
208 * Obtained via _BBN, if exists, otherwise assumed to be zero (0). 208 * Obtained via _BBN, if exists, otherwise assumed to be zero (0).
209 */ 209 */
210 status = acpi_evaluate_integer(root->handle, METHOD_NAME__BBN, NULL, 210 status = acpi_evaluate_integer(device->handle, METHOD_NAME__BBN, NULL,
211 &value); 211 &value);
212 switch (status) { 212 switch (status) {
213 case AE_OK: 213 case AE_OK:
@@ -234,7 +234,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
234 "Wrong _BBN value, reboot" 234 "Wrong _BBN value, reboot"
235 " and use option 'pci=noacpi'\n"); 235 " and use option 'pci=noacpi'\n");
236 236
237 status = try_get_root_bridge_busnr(root->handle, &bus); 237 status = try_get_root_bridge_busnr(device->handle, &bus);
238 if (ACPI_FAILURE(status)) 238 if (ACPI_FAILURE(status))
239 break; 239 break;
240 if (bus != root->id.bus) { 240 if (bus != root->id.bus) {
@@ -294,9 +294,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
294 * ----------------- 294 * -----------------
295 * Evaluate and parse _PRT, if exists. 295 * Evaluate and parse _PRT, if exists.
296 */ 296 */
297 status = acpi_get_handle(root->handle, METHOD_NAME__PRT, &handle); 297 status = acpi_get_handle(device->handle, METHOD_NAME__PRT, &handle);
298 if (ACPI_SUCCESS(status)) 298 if (ACPI_SUCCESS(status))
299 result = acpi_pci_irq_add_prt(root->handle, root->id.segment, 299 result = acpi_pci_irq_add_prt(device->handle, root->id.segment,
300 root->id.bus); 300 root->id.bus);
301 301
302 end: 302 end:
@@ -315,7 +315,7 @@ static int acpi_pci_root_start(struct acpi_device *device)
315 315
316 316
317 list_for_each_entry(root, &acpi_pci_roots, node) { 317 list_for_each_entry(root, &acpi_pci_roots, node) {
318 if (root->handle == device->handle) { 318 if (root->device == device) {
319 pci_bus_add_devices(root->bus); 319 pci_bus_add_devices(root->bus);
320 return 0; 320 return 0;
321 } 321 }