Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[powerpc.git] / drivers / pci / hotplug / pciehp_hpc.c
index 2d2539b..2387e75 100644 (file)
@@ -31,6 +31,8 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/pci.h>
+#include <linux/interrupt.h>
+
 #include "../pci.h"
 #include "pciehp.h"
 
@@ -481,7 +483,6 @@ static int hpc_query_power_fault(struct slot * slot)
        u16 slot_status;
        u8 pwr_fault;
        int retval = 0;
-       u8 status;
 
        DBG_ENTER_ROUTINE 
 
@@ -493,15 +494,13 @@ static int hpc_query_power_fault(struct slot * slot)
        retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(slot->ctrl->cap_base), slot_status);
 
        if (retval) {
-               err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__);
+               err("%s : Cannot check for power fault\n", __FUNCTION__);
                return retval;
        }
        pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1);
-       status = (pwr_fault != 1) ? 1 : 0;
        
        DBG_LEAVE_ROUTINE
-       /* Note: Logic 0 => fault */
-       return status;
+       return pwr_fault;
 }
 
 static int hpc_set_attention_status(struct slot *slot, u8 value)
@@ -1421,7 +1420,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev)
                dbg("Bypassing BIOS check for pciehp use on %s\n",
                                pci_name(ctrl->pci_dev));
        } else {
-               rc = get_hp_hw_control_from_firmware(ctrl->pci_dev);
+               rc = pciehp_get_hp_hw_control_from_firmware(ctrl->pci_dev);
                if (rc)
                        goto abort_free_ctlr;
        }