diff options
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_hpc.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/pci/hotplug/ibmphp_hpc.c b/drivers/pci/hotplug/ibmphp_hpc.c index 035425adb24e..a6b458e4ab46 100644 --- a/drivers/pci/hotplug/ibmphp_hpc.c +++ b/drivers/pci/hotplug/ibmphp_hpc.c | |||
@@ -537,7 +537,6 @@ int ibmphp_hpc_readslot(struct slot *pslot, u8 cmd, u8 *pstatus) | |||
537 | { | 537 | { |
538 | void __iomem *wpg_bbar = NULL; | 538 | void __iomem *wpg_bbar = NULL; |
539 | struct controller *ctlr_ptr; | 539 | struct controller *ctlr_ptr; |
540 | struct list_head *pslotlist; | ||
541 | u8 index, status; | 540 | u8 index, status; |
542 | int rc = 0; | 541 | int rc = 0; |
543 | int busindex; | 542 | int busindex; |
@@ -628,8 +627,8 @@ int ibmphp_hpc_readslot(struct slot *pslot, u8 cmd, u8 *pstatus) | |||
628 | 627 | ||
629 | // Not used | 628 | // Not used |
630 | case READ_ALLSLOT: | 629 | case READ_ALLSLOT: |
631 | list_for_each(pslotlist, &ibmphp_slot_head) { | 630 | list_for_each_entry(pslot, &ibmphp_slot_head, |
632 | pslot = list_entry(pslotlist, struct slot, ibm_slot_list); | 631 | ibm_slot_list) { |
633 | index = pslot->ctlr_index; | 632 | index = pslot->ctlr_index; |
634 | rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, | 633 | rc = hpc_wait_ctlr_notworking(HPC_CTLR_WORKING_TOUT, ctlr_ptr, |
635 | wpg_bbar, &status); | 634 | wpg_bbar, &status); |
@@ -820,7 +819,6 @@ static int poll_hpc(void *data) | |||
820 | { | 819 | { |
821 | struct slot myslot; | 820 | struct slot myslot; |
822 | struct slot *pslot = NULL; | 821 | struct slot *pslot = NULL; |
823 | struct list_head *pslotlist; | ||
824 | int rc; | 822 | int rc; |
825 | int poll_state = POLL_LATCH_REGISTER; | 823 | int poll_state = POLL_LATCH_REGISTER; |
826 | u8 oldlatchlow = 0x00; | 824 | u8 oldlatchlow = 0x00; |
@@ -838,10 +836,10 @@ static int poll_hpc(void *data) | |||
838 | case POLL_LATCH_REGISTER: | 836 | case POLL_LATCH_REGISTER: |
839 | oldlatchlow = curlatchlow; | 837 | oldlatchlow = curlatchlow; |
840 | ctrl_count = 0x00; | 838 | ctrl_count = 0x00; |
841 | list_for_each(pslotlist, &ibmphp_slot_head) { | 839 | list_for_each_entry(pslot, &ibmphp_slot_head, |
840 | ibm_slot_list) { | ||
842 | if (ctrl_count >= ibmphp_get_total_controllers()) | 841 | if (ctrl_count >= ibmphp_get_total_controllers()) |
843 | break; | 842 | break; |
844 | pslot = list_entry(pslotlist, struct slot, ibm_slot_list); | ||
845 | if (pslot->ctrl->ctlr_relative_id == ctrl_count) { | 843 | if (pslot->ctrl->ctlr_relative_id == ctrl_count) { |
846 | ctrl_count++; | 844 | ctrl_count++; |
847 | if (READ_SLOT_LATCH(pslot->ctrl)) { | 845 | if (READ_SLOT_LATCH(pslot->ctrl)) { |
@@ -859,8 +857,8 @@ static int poll_hpc(void *data) | |||
859 | poll_state = POLL_SLEEP; | 857 | poll_state = POLL_SLEEP; |
860 | break; | 858 | break; |
861 | case POLL_SLOTS: | 859 | case POLL_SLOTS: |
862 | list_for_each(pslotlist, &ibmphp_slot_head) { | 860 | list_for_each_entry(pslot, &ibmphp_slot_head, |
863 | pslot = list_entry(pslotlist, struct slot, ibm_slot_list); | 861 | ibm_slot_list) { |
864 | // make a copy of the old status | 862 | // make a copy of the old status |
865 | memcpy((void *) &myslot, (void *) pslot, | 863 | memcpy((void *) &myslot, (void *) pslot, |
866 | sizeof(struct slot)); | 864 | sizeof(struct slot)); |
@@ -870,10 +868,10 @@ static int poll_hpc(void *data) | |||
870 | process_changeinstatus(pslot, &myslot); | 868 | process_changeinstatus(pslot, &myslot); |
871 | } | 869 | } |
872 | ctrl_count = 0x00; | 870 | ctrl_count = 0x00; |
873 | list_for_each(pslotlist, &ibmphp_slot_head) { | 871 | list_for_each_entry(pslot, &ibmphp_slot_head, |
872 | ibm_slot_list) { | ||
874 | if (ctrl_count >= ibmphp_get_total_controllers()) | 873 | if (ctrl_count >= ibmphp_get_total_controllers()) |
875 | break; | 874 | break; |
876 | pslot = list_entry(pslotlist, struct slot, ibm_slot_list); | ||
877 | if (pslot->ctrl->ctlr_relative_id == ctrl_count) { | 875 | if (pslot->ctrl->ctlr_relative_id == ctrl_count) { |
878 | ctrl_count++; | 876 | ctrl_count++; |
879 | if (READ_SLOT_LATCH(pslot->ctrl)) | 877 | if (READ_SLOT_LATCH(pslot->ctrl)) |