diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-09-14 18:35:15 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-14 20:38:26 -0400 |
commit | 6a29172ba90e49c046245610caff9848307bfd6a (patch) | |
tree | 41911e0b90cb6bec026f9eb2d4cc5e0f914afa75 /drivers/pci/hotplug/acpi_pcihp.c | |
parent | fca6825ad7382ae9df8ecda9068ac13ee9e343f4 (diff) |
PCI hotplug: clean up acpi_get_hp_params_from_firmware() interface
This patch makes acpi_get_hp_params_from_firmware() take a
pci_dev rather than a pci_bus and makes it return a standard
int errno rather than acpi_status.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/hotplug/acpi_pcihp.c')
-rw-r--r-- | drivers/pci/hotplug/acpi_pcihp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index ec3c039b7ebd..14d2d8a01f68 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -324,18 +324,18 @@ static acpi_status acpi_run_oshp(acpi_handle handle) | |||
324 | 324 | ||
325 | /* acpi_get_hp_params_from_firmware | 325 | /* acpi_get_hp_params_from_firmware |
326 | * | 326 | * |
327 | * @bus - the pci_bus of the bus on which the device is newly added | 327 | * @dev - the pci_dev for which we want parameters |
328 | * @hpp - allocated by the caller | 328 | * @hpp - allocated by the caller |
329 | */ | 329 | */ |
330 | acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, | 330 | int acpi_get_hp_params_from_firmware(struct pci_dev *dev, |
331 | struct hotplug_params *hpp) | 331 | struct hotplug_params *hpp) |
332 | { | 332 | { |
333 | acpi_status status = AE_NOT_FOUND; | 333 | acpi_status status; |
334 | acpi_handle handle, phandle; | 334 | acpi_handle handle, phandle; |
335 | struct pci_bus *pbus; | 335 | struct pci_bus *pbus; |
336 | 336 | ||
337 | handle = NULL; | 337 | handle = NULL; |
338 | for (pbus = bus; pbus; pbus = pbus->parent) { | 338 | for (pbus = dev->bus; pbus; pbus = pbus->parent) { |
339 | handle = acpi_pci_get_bridge_handle(pbus); | 339 | handle = acpi_pci_get_bridge_handle(pbus); |
340 | if (handle) | 340 | if (handle) |
341 | break; | 341 | break; |
@@ -350,10 +350,10 @@ acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, | |||
350 | while (handle) { | 350 | while (handle) { |
351 | status = acpi_run_hpx(handle, hpp); | 351 | status = acpi_run_hpx(handle, hpp); |
352 | if (ACPI_SUCCESS(status)) | 352 | if (ACPI_SUCCESS(status)) |
353 | break; | 353 | return 0; |
354 | status = acpi_run_hpp(handle, hpp); | 354 | status = acpi_run_hpp(handle, hpp); |
355 | if (ACPI_SUCCESS(status)) | 355 | if (ACPI_SUCCESS(status)) |
356 | break; | 356 | return 0; |
357 | if (acpi_is_root_bridge(handle)) | 357 | if (acpi_is_root_bridge(handle)) |
358 | break; | 358 | break; |
359 | status = acpi_get_parent(handle, &phandle); | 359 | status = acpi_get_parent(handle, &phandle); |
@@ -361,7 +361,7 @@ acpi_status acpi_get_hp_params_from_firmware(struct pci_bus *bus, | |||
361 | break; | 361 | break; |
362 | handle = phandle; | 362 | handle = phandle; |
363 | } | 363 | } |
364 | return status; | 364 | return -ENODEV; |
365 | } | 365 | } |
366 | EXPORT_SYMBOL_GPL(acpi_get_hp_params_from_firmware); | 366 | EXPORT_SYMBOL_GPL(acpi_get_hp_params_from_firmware); |
367 | 367 | ||