aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 2d2539ba7303..f2b9b7686f28 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -481,7 +481,6 @@ static int hpc_query_power_fault(struct slot * slot)
481 u16 slot_status; 481 u16 slot_status;
482 u8 pwr_fault; 482 u8 pwr_fault;
483 int retval = 0; 483 int retval = 0;
484 u8 status;
485 484
486 DBG_ENTER_ROUTINE 485 DBG_ENTER_ROUTINE
487 486
@@ -493,15 +492,13 @@ static int hpc_query_power_fault(struct slot * slot)
493 retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(slot->ctrl->cap_base), slot_status); 492 retval = hp_register_read_word(php_ctlr->pci_dev, SLOT_STATUS(slot->ctrl->cap_base), slot_status);
494 493
495 if (retval) { 494 if (retval) {
496 err("%s : hp_register_read_word SLOT_STATUS failed\n", __FUNCTION__); 495 err("%s : Cannot check for power fault\n", __FUNCTION__);
497 return retval; 496 return retval;
498 } 497 }
499 pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1); 498 pwr_fault = (u8)((slot_status & PWR_FAULT_DETECTED) >> 1);
500 status = (pwr_fault != 1) ? 1 : 0;
501 499
502 DBG_LEAVE_ROUTINE 500 DBG_LEAVE_ROUTINE
503 /* Note: Logic 0 => fault */ 501 return pwr_fault;
504 return status;
505} 502}
506 503
507static int hpc_set_attention_status(struct slot *slot, u8 value) 504static int hpc_set_attention_status(struct slot *slot, u8 value)