mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-03 21:48:15 +00:00 
			
		
		
		
	dm: blk: add a device-probe hook for scanning disk partitions
Now that all the block device drivers have enable a probe hook, we will call part_create_block_devices() to enumerate all the partitions and create associated udevices when a block device is detected. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
		
							parent
							
								
									43855fdb2c
								
							
						
					
					
						commit
						bf76031d19
					
				@ -741,6 +741,10 @@ static int blk_post_probe(struct udevice *dev)
 | 
				
			|||||||
		struct blk_desc *desc = dev_get_uclass_plat(dev);
 | 
							struct blk_desc *desc = dev_get_uclass_plat(dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		part_init(desc);
 | 
							part_init(desc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (desc->part_type != PART_TYPE_UNKNOWN &&
 | 
				
			||||||
 | 
							    part_create_block_devices(dev))
 | 
				
			||||||
 | 
								debug("*** creating partitions failed\n");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return 0;
 | 
						return 0;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user