Skip to content

Commit ce15d87

Browse files
jiangliubjorn-helgaas
authored andcommitted
PCI: acpiphp: Replace local macros with standard ACPI macros
Replace local defined macros (ACPI_STA_xxx) with standard ACPI macros (ACPI_STA_DEVICE_xxx). Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Yinghai Lu <yinghai@kernel.org> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Toshi Kani <toshi.kani@hp.com>
1 parent 3a0e40b commit ce15d87

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

‎drivers/pci/hotplug/acpiphp.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ struct acpiphp_attention_info
146146
#define ACPI_PCI_HOST_HID "PNP0A03"
147147

148148
/* ACPI _STA method value (ignore bit 4; battery present) */
149-
#define ACPI_STA_PRESENT (0x00000001)
150-
#define ACPI_STA_ENABLED (0x00000002)
151-
#define ACPI_STA_SHOW_IN_UI (0x00000004)
152-
#define ACPI_STA_FUNCTIONING (0x00000008)
153149
#define ACPI_STA_ALL (0x0000000f)
154150

155151
/* bridge flags */

‎drivers/pci/hotplug/acpiphp_glue.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ static int add_bridge(struct acpi_pci_root *root)
487487
dbg("%s: _STA evaluation failure\n", __func__);
488488
return 0;
489489
}
490-
if ((tmp & ACPI_STA_FUNCTIONING) == 0)
490+
if ((tmp & ACPI_STA_DEVICE_FUNCTIONING) == 0)
491491
/* don't register this object */
492492
return 0;
493493
}
@@ -1389,7 +1389,7 @@ u8 acpiphp_get_latch_status(struct acpiphp_slot *slot)
13891389

13901390
sta = get_slot_status(slot);
13911391

1392-
return (sta & ACPI_STA_SHOW_IN_UI) ? 0 : 1;
1392+
return (sta & ACPI_STA_DEVICE_UI) ? 0 : 1;
13931393
}
13941394

13951395

0 commit comments

Comments
 (0)