Commit 35ae61a0 authored by MUNEDA Takahiro's avatar MUNEDA Takahiro Committed by Greg Kroah-Hartman

acpiphp: fix latch status

pci_hotplug.h says:

 * @latch_status: if the latch (if any) is open or closed (1/0)

However, acpiphp returns opposite value.
This patch fixes this issue.

I tested this patch on my ia64 machine that has some apciphp based
hotplug slots.
Signed-off-by: default avatarMUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e8039150
......@@ -1807,8 +1807,8 @@ u8 acpiphp_get_power_status(struct acpiphp_slot *slot)
/*
* latch closed: 1
* latch open: 0
* latch open: 1
* latch closed: 0
*/
u8 acpiphp_get_latch_status(struct acpiphp_slot *slot)
{
......@@ -1816,7 +1816,7 @@ u8 acpiphp_get_latch_status(struct acpiphp_slot *slot)
sta = get_slot_status(slot);
return (sta & ACPI_STA_SHOW_IN_UI) ? 1 : 0;
return (sta & ACPI_STA_SHOW_IN_UI) ? 0 : 1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment