mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	ACPI / scan: Set the visited flag for all enumerated devices
Commit10c7e20b2f(ACPI / scan: fix enumeration (visited) flags for bus rescans) attempted to fix a problem with ACPI-based enumerateion of I2C/SPI devices, but it forgot to ensure that the visited flag will be set for all of the other enumerated devices, so fix that. Fixes:10c7e20b2f(ACPI / scan: fix enumeration (visited) flags for bus rescans) Link: https://bugzilla.kernel.org/show_bug.cgi?id=194885 Reported-and-tested-by: Kevin Locke <kevin@kevinlocke.name> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: 4.8+ <stable@vger.kernel.org> # 4.8+
This commit is contained in:
		
							parent
							
								
									39da7c509a
								
							
						
					
					
						commit
						f406270bf7
					
				
					 1 changed files with 12 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -1857,14 +1857,19 @@ static void acpi_bus_attach(struct acpi_device *device)
 | 
			
		|||
		return;
 | 
			
		||||
 | 
			
		||||
	device->flags.match_driver = true;
 | 
			
		||||
	if (!ret) {
 | 
			
		||||
	if (ret > 0) {
 | 
			
		||||
		acpi_device_set_enumerated(device);
 | 
			
		||||
		goto ok;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ret = device_attach(&device->dev);
 | 
			
		||||
	if (ret < 0)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
		if (!ret && device->pnp.type.platform_id)
 | 
			
		||||
	if (ret > 0 || !device->pnp.type.platform_id)
 | 
			
		||||
		acpi_device_set_enumerated(device);
 | 
			
		||||
	else
 | 
			
		||||
		acpi_default_enumeration(device);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 ok:
 | 
			
		||||
	list_for_each_entry(child, &device->children, node)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue