if (!rmdevice)
return 0;
- /*
- * unbind _ADR-Based Devices when hot removal
- */
- if (dev->flags.bus_address) {
- if ((dev->parent) && (dev->parent->ops.unbind))
- dev->parent->ops.unbind(dev);
- }
acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT);
return 0;
}
-/*
- * acpi_hot_add_bind - Bind _ADR-based devices on hot-add.
- * @device: ACPI device node to bind.
- */
-static void acpi_hot_add_bind(struct acpi_device *device)
-{
- if (device->flags.bus_address
- && device->parent && device->parent->ops.bind)
- device->parent->ops.bind(device);
-}
-
static int acpi_add_single_object(struct acpi_device **child,
acpi_handle handle, int type,
unsigned long long sta, bool match_driver)
device->flags.match_driver = match_driver;
result = acpi_device_register(device);
- if (device->flags.match_driver)
- acpi_hot_add_bind(device);
-
end:
if (!result) {
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
return AE_CTRL_DEPTH;
device->flags.match_driver = true;
- acpi_hot_add_bind(device);
out:
if (!*return_value)