mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 18:35:42 +01:00 
			
		
		
		
	dm: fix an 'undefined' error in some macros
Due to a non-existing parameter name in macro's, use of those macro's will
cause a compiler error of "undefined reference".
Unfortunately, dm test doesn't fail because a wrong name ("&dev", hence it
is accidentally a valid name in the context of a caller site) is passed on.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: f262d4ca4b ("dm: core: Add a way to read platdata for all
	child devices")
Fixes: 903e83ee84 ("dm: core: Add a way to iterate through children,
	probing each")
Reviewed-by: Simon Glass <sjg@chromium.org>
			
			
This commit is contained in:
		
				
					committed by
					
						 Heinrich Schuchardt
						Heinrich Schuchardt
					
				
			
			
				
	
			
			
			
						parent
						
							19b241c61f
						
					
				
				
					commit
					3cfc042d43
				
			| @@ -959,8 +959,8 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev) | |||||||
|  * @parent: parent device to scan |  * @parent: parent device to scan | ||||||
|  */ |  */ | ||||||
| #define device_foreach_child_of_to_plat(pos, parent)	\ | #define device_foreach_child_of_to_plat(pos, parent)	\ | ||||||
| 	for (int _ret = device_first_child_ofdata_err(parent, &dev); !_ret; \ | 	for (int _ret = device_first_child_ofdata_err(parent, &pos); !_ret; \ | ||||||
| 	     _ret = device_next_child_ofdata_err(&dev)) | 	     _ret = device_next_child_ofdata_err(&pos)) | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * device_foreach_child_probe() - iterate through children, probing them |  * device_foreach_child_probe() - iterate through children, probing them | ||||||
| @@ -976,8 +976,8 @@ static inline bool device_is_on_pci_bus(const struct udevice *dev) | |||||||
|  * @parent: parent device to scan |  * @parent: parent device to scan | ||||||
|  */ |  */ | ||||||
| #define device_foreach_child_probe(pos, parent)	\ | #define device_foreach_child_probe(pos, parent)	\ | ||||||
| 	for (int _ret = device_first_child_err(parent, &dev); !_ret; \ | 	for (int _ret = device_first_child_err(parent, &pos); !_ret; \ | ||||||
| 	     _ret = device_next_child_err(&dev)) | 	     _ret = device_next_child_err(&pos)) | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * dm_scan_fdt_dev() - Bind child device in the device tree |  * dm_scan_fdt_dev() - Bind child device in the device tree | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user