> +static void hisi_lpc_acpi_remove(struct device *hostdev)
> +{
> + struct acpi_device *adev = ACPI_COMPANION(hostdev);
> + struct acpi_device *child;
> +
> + device_for_each_child(hostdev, NULL, hisi_lpc_acpi_remove_subdev);
> +
> + list_for_each_entry(child, &adev->children, node)
> + acpi_device_clear_enumerated(child);There are only two other non-ACPI core callers of
acpi_device_clear_enumerated() (i2c and spi). That always makes me
wonder if we're getting too deep in ACPI internals.
> +}
> +
> /*
> * hisi_lpc_acpi_probe - probe children for ACPI FW
> * @hostdev: LPC host device pointer
> @@ -555,8 +566,7 @@ static int hisi_lpc_acpi_probe(struct device *hostdev)
> return 0;
>
> fail:
> - device_for_each_child(hostdev, NULL,
> - hisi_lpc_acpi_remove_subdev);
> + hisi_lpc_acpi_remove(hostdev);
> return ret;