diff options
Diffstat (limited to 'drivers/acpi/ioapic.c')
-rw-r--r-- | drivers/acpi/ioapic.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/acpi/ioapic.c b/drivers/acpi/ioapic.c index 6d7ce6e12aaa..1120dfd625b8 100644 --- a/drivers/acpi/ioapic.c +++ b/drivers/acpi/ioapic.c | |||
@@ -206,24 +206,34 @@ int acpi_ioapic_add(acpi_handle root_handle) | |||
206 | return ACPI_SUCCESS(status) && ACPI_SUCCESS(retval) ? 0 : -ENODEV; | 206 | return ACPI_SUCCESS(status) && ACPI_SUCCESS(retval) ? 0 : -ENODEV; |
207 | } | 207 | } |
208 | 208 | ||
209 | int acpi_ioapic_remove(struct acpi_pci_root *root) | 209 | void pci_ioapic_remove(struct acpi_pci_root *root) |
210 | { | 210 | { |
211 | int retval = 0; | ||
212 | struct acpi_pci_ioapic *ioapic, *tmp; | 211 | struct acpi_pci_ioapic *ioapic, *tmp; |
213 | 212 | ||
214 | mutex_lock(&ioapic_list_lock); | 213 | mutex_lock(&ioapic_list_lock); |
215 | list_for_each_entry_safe(ioapic, tmp, &ioapic_list, list) { | 214 | list_for_each_entry_safe(ioapic, tmp, &ioapic_list, list) { |
216 | if (root->device->handle != ioapic->root_handle) | 215 | if (root->device->handle != ioapic->root_handle) |
217 | continue; | 216 | continue; |
218 | |||
219 | if (acpi_unregister_ioapic(ioapic->handle, ioapic->gsi_base)) | ||
220 | retval = -EBUSY; | ||
221 | |||
222 | if (ioapic->pdev) { | 217 | if (ioapic->pdev) { |
223 | pci_release_region(ioapic->pdev, 0); | 218 | pci_release_region(ioapic->pdev, 0); |
224 | pci_disable_device(ioapic->pdev); | 219 | pci_disable_device(ioapic->pdev); |
225 | pci_dev_put(ioapic->pdev); | 220 | pci_dev_put(ioapic->pdev); |
226 | } | 221 | } |
222 | } | ||
223 | mutex_unlock(&ioapic_list_lock); | ||
224 | } | ||
225 | |||
226 | int acpi_ioapic_remove(struct acpi_pci_root *root) | ||
227 | { | ||
228 | int retval = 0; | ||
229 | struct acpi_pci_ioapic *ioapic, *tmp; | ||
230 | |||
231 | mutex_lock(&ioapic_list_lock); | ||
232 | list_for_each_entry_safe(ioapic, tmp, &ioapic_list, list) { | ||
233 | if (root->device->handle != ioapic->root_handle) | ||
234 | continue; | ||
235 | if (acpi_unregister_ioapic(ioapic->handle, ioapic->gsi_base)) | ||
236 | retval = -EBUSY; | ||
227 | if (ioapic->res.flags && ioapic->res.parent) | 237 | if (ioapic->res.flags && ioapic->res.parent) |
228 | release_resource(&ioapic->res); | 238 | release_resource(&ioapic->res); |
229 | list_del(&ioapic->list); | 239 | list_del(&ioapic->list); |