diff options
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 83e8e4412de5..0b9d0db1590a 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -45,11 +45,11 @@ | |||
45 | 45 | ||
46 | #include <linux/kernel.h> | 46 | #include <linux/kernel.h> |
47 | #include <linux/pci.h> | 47 | #include <linux/pci.h> |
48 | #include <linux/pci_hotplug.h> | ||
48 | #include <linux/smp_lock.h> | 49 | #include <linux/smp_lock.h> |
49 | #include <linux/mutex.h> | 50 | #include <linux/mutex.h> |
50 | 51 | ||
51 | #include "../pci.h" | 52 | #include "../pci.h" |
52 | #include "pci_hotplug.h" | ||
53 | #include "acpiphp.h" | 53 | #include "acpiphp.h" |
54 | 54 | ||
55 | static LIST_HEAD(bridge_list); | 55 | static LIST_HEAD(bridge_list); |
@@ -1693,14 +1693,10 @@ void __exit acpiphp_glue_exit(void) | |||
1693 | */ | 1693 | */ |
1694 | int __init acpiphp_get_num_slots(void) | 1694 | int __init acpiphp_get_num_slots(void) |
1695 | { | 1695 | { |
1696 | struct list_head *node; | ||
1697 | struct acpiphp_bridge *bridge; | 1696 | struct acpiphp_bridge *bridge; |
1698 | int num_slots; | 1697 | int num_slots = 0; |
1699 | |||
1700 | num_slots = 0; | ||
1701 | 1698 | ||
1702 | list_for_each (node, &bridge_list) { | 1699 | list_for_each_entry (bridge, &bridge_list, list) { |
1703 | bridge = (struct acpiphp_bridge *)node; | ||
1704 | dbg("Bus %04x:%02x has %d slot%s\n", | 1700 | dbg("Bus %04x:%02x has %d slot%s\n", |
1705 | pci_domain_nr(bridge->pci_bus), | 1701 | pci_domain_nr(bridge->pci_bus), |
1706 | bridge->pci_bus->number, bridge->nr_slots, | 1702 | bridge->pci_bus->number, bridge->nr_slots, |
@@ -1807,8 +1803,8 @@ u8 acpiphp_get_power_status(struct acpiphp_slot *slot) | |||
1807 | 1803 | ||
1808 | 1804 | ||
1809 | /* | 1805 | /* |
1810 | * latch closed: 1 | 1806 | * latch open: 1 |
1811 | * latch open: 0 | 1807 | * latch closed: 0 |
1812 | */ | 1808 | */ |
1813 | u8 acpiphp_get_latch_status(struct acpiphp_slot *slot) | 1809 | u8 acpiphp_get_latch_status(struct acpiphp_slot *slot) |
1814 | { | 1810 | { |
@@ -1816,7 +1812,7 @@ u8 acpiphp_get_latch_status(struct acpiphp_slot *slot) | |||
1816 | 1812 | ||
1817 | sta = get_slot_status(slot); | 1813 | sta = get_slot_status(slot); |
1818 | 1814 | ||
1819 | return (sta & ACPI_STA_SHOW_IN_UI) ? 1 : 0; | 1815 | return (sta & ACPI_STA_SHOW_IN_UI) ? 0 : 1; |
1820 | } | 1816 | } |
1821 | 1817 | ||
1822 | 1818 | ||