Skip to contentSkip to conversation

acpi/bus: Remove installing/removing notify handlers from probe/remove

PATCH Superseded Michal Wilczynski 1 participant 1 message Jun 1, 2023

Subsystems (6)

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 33/35 acpi/bus: Remove installing/removing notify handlers from probe/remove

Remove installing/removing .notify callback handlers, to prepare for notify callback removal.

Remove logic calling .remove callback, as .add should be expected to clean after itself in case of the failure, and event handler installation was moved to .add in all drivers already.

---
 drivers/acpi/bus.c | 17 -----------------
 1 file changed, 17 deletions(-)
drivers/acpi/bus.c +0 -17
index cf2c2bfe29a0..6436ac4d6322 100644
@@ -1089,20 +1089,6 @@ static int acpi_device_probe(struct device *dev)
 	pr_debug("Driver [%s] successfully bound to device [%s]\n",
 		 acpi_drv->name, acpi_dev->pnp.bus_id);
 
-	if (acpi_drv->ops.notify) {
-		ret = acpi_device_install_notify_handler(acpi_dev, acpi_drv);
-		if (ret) {
-			if (acpi_drv->ops.remove)
-				acpi_drv->ops.remove(acpi_dev);
-
-			acpi_dev->driver_data = NULL;
-			return ret;
-		}
-	}
-
-	pr_debug("Found driver [%s] for device [%s]\n", acpi_drv->name,
-		 acpi_dev->pnp.bus_id);
-
 	get_device(dev);
 	return 0;
 }
@@ -1112,9 +1098,6 @@ static void acpi_device_remove(struct device *dev)
 	struct acpi_device *acpi_dev = to_acpi_device(dev);
 	struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
 
-	if (acpi_drv->ops.notify)
-		acpi_device_remove_notify_handler(acpi_dev, acpi_drv);
-
 	if (acpi_drv->ops.remove)
 		acpi_drv->ops.remove(acpi_dev);
 
Signature · 1 line
2.40.1