diff options
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_ebda.c')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_ebda.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c index d9b197d5c6b4..664b5d1efb8f 100644 --- a/drivers/pci/hotplug/ibmphp_ebda.c +++ b/drivers/pci/hotplug/ibmphp_ebda.c | |||
@@ -1117,25 +1117,21 @@ int ibmphp_get_bus_index (u8 num) | |||
1117 | 1117 | ||
1118 | void ibmphp_free_bus_info_queue (void) | 1118 | void ibmphp_free_bus_info_queue (void) |
1119 | { | 1119 | { |
1120 | struct bus_info *bus_info; | 1120 | struct bus_info *bus_info, *next; |
1121 | struct list_head *list; | ||
1122 | struct list_head *next; | ||
1123 | 1121 | ||
1124 | list_for_each_safe (list, next, &bus_info_head ) { | 1122 | list_for_each_entry_safe(bus_info, next, &bus_info_head, |
1125 | bus_info = list_entry (list, struct bus_info, bus_info_list); | 1123 | bus_info_list) { |
1126 | kfree (bus_info); | 1124 | kfree (bus_info); |
1127 | } | 1125 | } |
1128 | } | 1126 | } |
1129 | 1127 | ||
1130 | void ibmphp_free_ebda_hpc_queue (void) | 1128 | void ibmphp_free_ebda_hpc_queue (void) |
1131 | { | 1129 | { |
1132 | struct controller *controller = NULL; | 1130 | struct controller *controller = NULL, *next; |
1133 | struct list_head *list; | ||
1134 | struct list_head *next; | ||
1135 | int pci_flag = 0; | 1131 | int pci_flag = 0; |
1136 | 1132 | ||
1137 | list_for_each_safe (list, next, &ebda_hpc_head) { | 1133 | list_for_each_entry_safe(controller, next, &ebda_hpc_head, |
1138 | controller = list_entry (list, struct controller, ebda_hpc_list); | 1134 | ebda_hpc_list) { |
1139 | if (controller->ctlr_type == 0) | 1135 | if (controller->ctlr_type == 0) |
1140 | release_region (controller->u.isa_ctlr.io_start, (controller->u.isa_ctlr.io_end - controller->u.isa_ctlr.io_start + 1)); | 1136 | release_region (controller->u.isa_ctlr.io_start, (controller->u.isa_ctlr.io_end - controller->u.isa_ctlr.io_start + 1)); |
1141 | else if ((controller->ctlr_type == 1) && (!pci_flag)) { | 1137 | else if ((controller->ctlr_type == 1) && (!pci_flag)) { |
@@ -1148,12 +1144,10 @@ void ibmphp_free_ebda_hpc_queue (void) | |||
1148 | 1144 | ||
1149 | void ibmphp_free_ebda_pci_rsrc_queue (void) | 1145 | void ibmphp_free_ebda_pci_rsrc_queue (void) |
1150 | { | 1146 | { |
1151 | struct ebda_pci_rsrc *resource; | 1147 | struct ebda_pci_rsrc *resource, *next; |
1152 | struct list_head *list; | ||
1153 | struct list_head *next; | ||
1154 | 1148 | ||
1155 | list_for_each_safe (list, next, &ibmphp_ebda_pci_rsrc_head) { | 1149 | list_for_each_entry_safe(resource, next, &ibmphp_ebda_pci_rsrc_head, |
1156 | resource = list_entry (list, struct ebda_pci_rsrc, ebda_pci_rsrc_list); | 1150 | ebda_pci_rsrc_list) { |
1157 | kfree (resource); | 1151 | kfree (resource); |
1158 | resource = NULL; | 1152 | resource = NULL; |
1159 | } | 1153 | } |