diff options
author | Alex Chiang <achiang@hp.com> | 2009-09-10 14:34:09 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-14 11:46:58 -0400 |
commit | 7f53866932fd08add06ee2f93ead129949158490 (patch) | |
tree | f01520afe3708a3c79233fa67d50124f0dac6335 /drivers/pci/hotplug/acpi_pcihp.c | |
parent | 6edd7679db92376ca54f328d6b0f12291c2dab35 (diff) |
PCI Hotplug: convert acpi_pci_detect_ejectable() to take an acpi_handle
acpi_pci_detect_ejectable() goes through effort to convert its
struct pci_bus arg to an acpi_handle, but every time we use this
interface, we already have the handle available.
So let's just use the handle instead of converting back and forth.
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.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 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index eb159587d0bf..ec3c039b7ebd 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -500,18 +500,18 @@ check_hotplug(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
500 | 500 | ||
501 | /** | 501 | /** |
502 | * acpi_pci_detect_ejectable - check if the PCI bus has ejectable slots | 502 | * acpi_pci_detect_ejectable - check if the PCI bus has ejectable slots |
503 | * @pbus - PCI bus to scan | 503 | * @handle - handle of the PCI bus to scan |
504 | * | 504 | * |
505 | * Returns 1 if the PCI bus has ACPI based ejectable slots, 0 otherwise. | 505 | * Returns 1 if the PCI bus has ACPI based ejectable slots, 0 otherwise. |
506 | */ | 506 | */ |
507 | int acpi_pci_detect_ejectable(struct pci_bus *pbus) | 507 | int acpi_pci_detect_ejectable(acpi_handle handle) |
508 | { | 508 | { |
509 | acpi_handle handle; | ||
510 | int found = 0; | 509 | int found = 0; |
511 | 510 | ||
512 | if (!(handle = acpi_pci_get_bridge_handle(pbus))) | 511 | if (!handle) |
513 | return 0; | 512 | return found; |
514 | acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1, | 513 | |
514 | acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, 1, | ||
515 | check_hotplug, (void *)&found, NULL); | 515 | check_hotplug, (void *)&found, NULL); |
516 | return found; | 516 | return found; |
517 | } | 517 | } |