mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	irqchip/mbigen: move to use bus_get_dev_root()
Direct access to the struct bus_type dev_root pointer is going away soon so replace that with a call to bus_get_dev_root() instead, which is what it is there for. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230313182918.1312597-21-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
		
							parent
							
								
									3666062b87
								
							
						
					
					
						commit
						fea087fc29
					
				
					 1 changed files with 8 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -245,11 +245,14 @@ static int mbigen_of_create_domain(struct platform_device *pdev,
 | 
			
		|||
		if (!of_property_read_bool(np, "interrupt-controller"))
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		parent = platform_bus_type.dev_root;
 | 
			
		||||
		child = of_platform_device_create(np, NULL, parent);
 | 
			
		||||
		if (!child) {
 | 
			
		||||
			of_node_put(np);
 | 
			
		||||
			return -ENOMEM;
 | 
			
		||||
		parent = bus_get_dev_root(&platform_bus_type);
 | 
			
		||||
		if (parent) {
 | 
			
		||||
			child = of_platform_device_create(np, NULL, parent);
 | 
			
		||||
			put_device(parent);
 | 
			
		||||
			if (!child) {
 | 
			
		||||
				of_node_put(np);
 | 
			
		||||
				return -ENOMEM;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if (of_property_read_u32(child->dev.of_node, "num-pins",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue