Revert "acpi: device: Walk up the tree to find identifier"
This reverts commit 8ccf59a947.
This wasn't meant to be submitted yet and seems to be causing issues,
just as Patrick warned me..
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Change-Id: I8c4b57ba92ef4e0535e4975485188114a1084f09
Reviewed-on: https://review.coreboot.org/26452
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
			
			
This commit is contained in:
		| @@ -55,9 +55,6 @@ static void acpi_device_fill_len(void *ptr) | |||||||
| /* Locate and return the ACPI name for this device */ | /* Locate and return the ACPI name for this device */ | ||||||
| const char *acpi_device_name(struct device *dev) | const char *acpi_device_name(struct device *dev) | ||||||
| { | { | ||||||
| 	struct device *pdev = dev; |  | ||||||
| 	const char *name; |  | ||||||
|  |  | ||||||
| 	if (!dev) | 	if (!dev) | ||||||
| 		return NULL; | 		return NULL; | ||||||
|  |  | ||||||
| @@ -65,16 +62,9 @@ const char *acpi_device_name(struct device *dev) | |||||||
| 	if (dev->ops->acpi_name) | 	if (dev->ops->acpi_name) | ||||||
| 		return dev->ops->acpi_name(dev); | 		return dev->ops->acpi_name(dev); | ||||||
|  |  | ||||||
| 	/* Walk up the tree to find if any parent can identify this device */ | 	/* Check parent device in case it has a global handler */ | ||||||
| 	while (pdev->bus) { | 	if (dev->bus && dev->bus->dev->ops->acpi_name) | ||||||
| 		if (pdev->path.type == DEVICE_PATH_ROOT) | 		return dev->bus->dev->ops->acpi_name(dev); | ||||||
| 			break; |  | ||||||
| 		if (pdev->bus->dev->ops && pdev->bus->dev->ops->acpi_name) |  | ||||||
| 			name = pdev->bus->dev->ops->acpi_name(dev); |  | ||||||
| 		if (name) |  | ||||||
| 			return name; |  | ||||||
| 		pdev = pdev->bus->dev; |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	return NULL; | 	return NULL; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user