aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/scan.c22
-rw-r--r--include/acpi/acpi_bus.h2
2 files changed, 0 insertions, 24 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 3d44c705a3a2..f8a0d0f7d197 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1385,29 +1385,11 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
1385 if (!rmdevice) 1385 if (!rmdevice)
1386 return 0; 1386 return 0;
1387 1387
1388 /*
1389 * unbind _ADR-Based Devices when hot removal
1390 */
1391 if (dev->flags.bus_address) {
1392 if ((dev->parent) && (dev->parent->ops.unbind))
1393 dev->parent->ops.unbind(dev);
1394 }
1395 acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); 1388 acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT);
1396 1389
1397 return 0; 1390 return 0;
1398} 1391}
1399 1392
1400/*
1401 * acpi_hot_add_bind - Bind _ADR-based devices on hot-add.
1402 * @device: ACPI device node to bind.
1403 */
1404static void acpi_hot_add_bind(struct acpi_device *device)
1405{
1406 if (device->flags.bus_address
1407 && device->parent && device->parent->ops.bind)
1408 device->parent->ops.bind(device);
1409}
1410
1411static int acpi_add_single_object(struct acpi_device **child, 1393static int acpi_add_single_object(struct acpi_device **child,
1412 acpi_handle handle, int type, 1394 acpi_handle handle, int type,
1413 unsigned long long sta, bool match_driver) 1395 unsigned long long sta, bool match_driver)
@@ -1479,9 +1461,6 @@ static int acpi_add_single_object(struct acpi_device **child,
1479 device->flags.match_driver = match_driver; 1461 device->flags.match_driver = match_driver;
1480 result = acpi_device_register(device); 1462 result = acpi_device_register(device);
1481 1463
1482 if (device->flags.match_driver)
1483 acpi_hot_add_bind(device);
1484
1485end: 1464end:
1486 if (!result) { 1465 if (!result) {
1487 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); 1466 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
@@ -1584,7 +1563,6 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl_not_used,
1584 return AE_CTRL_DEPTH; 1563 return AE_CTRL_DEPTH;
1585 1564
1586 device->flags.match_driver = true; 1565 device->flags.match_driver = true;
1587 acpi_hot_add_bind(device);
1588 1566
1589 out: 1567 out:
1590 if (!*return_value) 1568 if (!*return_value)
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 70647313a9bc..6e9a73e05916 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -99,8 +99,6 @@ struct acpi_device_ops {
99 acpi_op_add add; 99 acpi_op_add add;
100 acpi_op_remove remove; 100 acpi_op_remove remove;
101 acpi_op_start start; 101 acpi_op_start start;
102 acpi_op_bind bind;
103 acpi_op_unbind unbind;
104 acpi_op_notify notify; 102 acpi_op_notify notify;
105}; 103};
106 104