zram: add set_max_streams knob
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / pci_root.c
index e427dc516c76d1d8d73b5a91c7d4f1f73b83cfbf..a02a91cd1de4d48fcd62c8cf4c71fa7f41249415 100644 (file)
@@ -63,6 +63,9 @@ static struct acpi_scan_handler pci_root_handler = {
        .ids = root_device_ids,
        .attach = acpi_pci_root_add,
        .detach = acpi_pci_root_remove,
+       .hotplug = {
+               .ignore = true,
+       },
 };
 
 /* Lock to protect both acpi_pci_roots lists */
@@ -614,9 +617,12 @@ static void handle_root_bridge_removal(struct acpi_device *device)
        ej_event->device = device;
        ej_event->event = ACPI_NOTIFY_EJECT_REQUEST;
 
+       get_device(&device->dev);
        status = acpi_os_hotplug_execute(acpi_bus_hot_remove_device, ej_event);
-       if (ACPI_FAILURE(status))
+       if (ACPI_FAILURE(status)) {
+               put_device(&device->dev);
                kfree(ej_event);
+       }
 }
 
 static void _handle_hotplug_event_root(struct work_struct *work)