Skip to content

Commit c4d1983

Browse files
committed
ACPI: glue: Drop cleanup callback from struct acpi_bus_type
Since PCI was the only user of the ->cleanup callback in struct acpi_bus_type and it is not using struct acpi_bus_type any more, drop that callback from there and update acpi_device_notify_remove() accordingly. Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Ferry Toth <[email protected]>
1 parent 4795448 commit c4d1983

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

drivers/acpi/glue.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,16 +337,10 @@ void acpi_device_notify_remove(struct device *dev)
337337
if (!adev)
338338
return;
339339

340-
if (dev_is_pci(dev)) {
340+
if (dev_is_pci(dev))
341341
pci_acpi_cleanup(dev, adev);
342-
} else {
343-
struct acpi_bus_type *type = acpi_get_bus_type(dev);
344-
345-
if (type && type->cleanup)
346-
type->cleanup(dev);
347-
else if (adev->handler && adev->handler->unbind)
348-
adev->handler->unbind(dev);
349-
}
342+
else if (adev->handler && adev->handler->unbind)
343+
adev->handler->unbind(dev);
350344

351345
acpi_unbind_one(dev);
352346
}

include/acpi/acpi_bus.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,6 @@ struct acpi_bus_type {
570570
bool (*match)(struct device *dev);
571571
struct acpi_device * (*find_companion)(struct device *);
572572
void (*setup)(struct device *);
573-
void (*cleanup)(struct device *);
574573
};
575574
int register_acpi_bus_type(struct acpi_bus_type *);
576575
int unregister_acpi_bus_type(struct acpi_bus_type *);

0 commit comments

Comments
 (0)