aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2010-09-15 01:22:46 -0400
committerLen Brown <len.brown@intel.com>2010-10-01 01:47:54 -0400
commit95abccb576c44bc593e05fa1245d0ad26ce6107b (patch)
treec8dcc23dd1720cffbf3553a9ce2e57937eae3cd0 /drivers/acpi/osl.c
parent6087658d7d576b8aeed8f9188cd9917db29aa0dd (diff)
ACPICA: Obsolete the acpi_os_derive_pci_id OSL interface
This function is not OS-dependent and has been replaced by acpi_hw_derive_pci_id, which is now in the ACPICA core code. Local implementations of acpi_os_derive_pci_id are no longer necessary and are removed. ACPICA BZ 857. http://www.acpica.org/bugzilla/show_bug.cgi?id=857 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 6652c4929391..90a8e86e86f5 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -622,74 +622,6 @@ acpi_os_write_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
622 return (result ? AE_ERROR : AE_OK); 622 return (result ? AE_ERROR : AE_OK);
623} 623}
624 624
625/* TODO: Change code to take advantage of driver model more */
626static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
627 acpi_handle chandle, /* current node */
628 struct acpi_pci_id **id,
629 int *is_bridge, u8 * bus_number)
630{
631 acpi_handle handle;
632 struct acpi_pci_id *pci_id = *id;
633 acpi_status status;
634 unsigned long long temp;
635 acpi_object_type type;
636
637 acpi_get_parent(chandle, &handle);
638 if (handle != rhandle) {
639 acpi_os_derive_pci_id_2(rhandle, handle, &pci_id, is_bridge,
640 bus_number);
641
642 status = acpi_get_type(handle, &type);
643 if ((ACPI_FAILURE(status)) || (type != ACPI_TYPE_DEVICE))
644 return;
645
646 status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
647 &temp);
648 if (ACPI_SUCCESS(status)) {
649 u64 val;
650 pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp));
651 pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp));
652
653 if (*is_bridge)
654 pci_id->bus = *bus_number;
655
656 /* any nicer way to get bus number of bridge ? */
657 status =
658 acpi_os_read_pci_configuration(pci_id, 0x0e, &val,
659 8);
660 if (ACPI_SUCCESS(status)
661 && ((val & 0x7f) == 1 || (val & 0x7f) == 2)) {
662 status =
663 acpi_os_read_pci_configuration(pci_id, 0x18,
664 &val, 8);
665 if (!ACPI_SUCCESS(status)) {
666 /* Certainly broken... FIX ME */
667 return;
668 }
669 *is_bridge = 1;
670 pci_id->bus = val;
671 status =
672 acpi_os_read_pci_configuration(pci_id, 0x19,
673 &val, 8);
674 if (ACPI_SUCCESS(status)) {
675 *bus_number = val;
676 }
677 } else
678 *is_bridge = 0;
679 }
680 }
681}
682
683void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
684 acpi_handle chandle, /* current node */
685 struct acpi_pci_id **id)
686{
687 int is_bridge = 1;
688 u8 bus_number = (*id)->bus;
689
690 acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
691}
692
693static void acpi_os_execute_deferred(struct work_struct *work) 625static void acpi_os_execute_deferred(struct work_struct *work)
694{ 626{
695 struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work); 627 struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);