mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ACPI / hotplug / PCI: Get rid of check_sub_bridges()
Now that acpiphp_check_bridge() always enumerates devices behind the bridge, there is no need to do that for each sub-bridge anymore like it is done in the current ACPI-based PCI hotplug (ACPIPHP) code. Given this we don't need check_sub_bridges() anymore, so drop that function completely. This also simplifies the ACPIPHP code a bit. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
		
							parent
							
								
									ff181e5a4f
								
							
						
					
					
						commit
						2d8b1d566a
					
				
					 1 changed files with 0 additions and 25 deletions
				
			
		| 
						 | 
					@ -788,25 +788,6 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus)
 | 
				
			||||||
 * ACPI event handlers
 | 
					 * ACPI event handlers
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static acpi_status
 | 
					 | 
				
			||||||
check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	struct acpiphp_bridge *bridge;
 | 
					 | 
				
			||||||
	char objname[64];
 | 
					 | 
				
			||||||
	struct acpi_buffer buffer = { .length = sizeof(objname),
 | 
					 | 
				
			||||||
				      .pointer = objname };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	bridge = acpiphp_handle_to_bridge(handle);
 | 
					 | 
				
			||||||
	if (bridge) {
 | 
					 | 
				
			||||||
		acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
 | 
					 | 
				
			||||||
		dbg("%s: re-enumerating slots under %s\n",
 | 
					 | 
				
			||||||
			__func__, objname);
 | 
					 | 
				
			||||||
		acpiphp_check_bridge(bridge);
 | 
					 | 
				
			||||||
		put_bridge(bridge);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return AE_OK ;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void acpiphp_check_host_bridge(acpi_handle handle)
 | 
					void acpiphp_check_host_bridge(acpi_handle handle)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct acpiphp_bridge *bridge;
 | 
						struct acpiphp_bridge *bridge;
 | 
				
			||||||
| 
						 | 
					@ -816,9 +797,6 @@ void acpiphp_check_host_bridge(acpi_handle handle)
 | 
				
			||||||
		acpiphp_check_bridge(bridge);
 | 
							acpiphp_check_bridge(bridge);
 | 
				
			||||||
		put_bridge(bridge);
 | 
							put_bridge(bridge);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
 | 
					 | 
				
			||||||
		ACPI_UINT32_MAX, check_sub_bridges, NULL, NULL, NULL);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void hotplug_event(acpi_handle handle, u32 type, void *data)
 | 
					static void hotplug_event(acpi_handle handle, u32 type, void *data)
 | 
				
			||||||
| 
						 | 
					@ -846,9 +824,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
 | 
				
			||||||
		dbg("%s: re-enumerating slots under %s\n", __func__, objname);
 | 
							dbg("%s: re-enumerating slots under %s\n", __func__, objname);
 | 
				
			||||||
		if (bridge) {
 | 
							if (bridge) {
 | 
				
			||||||
			acpiphp_check_bridge(bridge);
 | 
								acpiphp_check_bridge(bridge);
 | 
				
			||||||
			acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
 | 
					 | 
				
			||||||
					    ACPI_UINT32_MAX, check_sub_bridges,
 | 
					 | 
				
			||||||
					    NULL, NULL, NULL);
 | 
					 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			struct acpiphp_slot *slot = func->slot;
 | 
								struct acpiphp_slot *slot = func->slot;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue