acpiphp: fix latch status
authorMUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Wed, 25 Oct 2006 18:44:57 +0000 (11:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Oct 2006 18:20:32 +0000 (11:20 -0700)
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: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug/acpiphp_glue.c

index c44311ac2fd36ee1de1693e8fc7695acbd2e6101..16167b016266c0499cd4c9f26900b0f48ba5c76e 100644 (file)
@@ -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;
 }