* attached to it, that physical device should be the parent of the
* platform device we are about to create.
*/
--- pdevinfo.parent = adev->parent ?
--- acpi_get_first_physical_node(adev->parent) : NULL;
+++ pdevinfo.parent = parent ? acpi_get_first_physical_node(parent) : NULL;
pdevinfo.name = dev_name(&adev->dev);
--- pdevinfo.id = -1;
+++ pdevinfo.id = PLATFORM_DEVID_NONE;
pdevinfo.res = resources;
pdevinfo.num_res = count;
pdevinfo.fwnode = acpi_fwnode_handle(adev);
return 0;
}
---static int acpi_dev_get_first_consumer_dev_cb(struct acpi_dep_data *dep, void *data)
+++static int acpi_dev_get_next_consumer_dev_cb(struct acpi_dep_data *dep, void *data)
{
--- struct acpi_device *adev;
+++ struct acpi_device **adev_p = data;
+++ struct acpi_device *adev = *adev_p;
+
-- adev = acpi_bus_get_acpi_device(dep->consumer);
+++ /*
+++ * If we're passed a 'previous' consumer device then we need to skip
+++ * any consumers until we meet the previous one, and then NULL @data
+++ * so the next one can be returned.
+++ */
+++ if (adev) {
+++ if (dep->consumer == adev->handle)
+++ *adev_p = NULL;
+++
+++ return 0;
+++ }
++
- adev = acpi_bus_get_acpi_device(dep->consumer);
+++ adev = acpi_get_acpi_dev(dep->consumer);
if (adev) {
*(struct acpi_device **)data = adev;
return 1;