kernel/drivers/fpga/fpga-region.c
/**
 * child_regions_with_firmware
 * @overlay: device node of the overlay
 *
 * If the overlay adds child FPGA regions, they are not allowed to have
 * firmware-name property.
 *
 * Return 0 for OK or -EINVAL if child FPGA region adds firmware-name.
 */
child_regions_with_firmware
@overlay: device node of the overlay

If the overlay adds child FPGA regions, they are not allowed to have
firmware-name property.

Return 0 for OK or -EINVAL if child FPGA region adds firmware-name.
child_regions_with_firmware @overlay : device node of the overlay If the overlay adds child FPGA regions they are not allowed to have firmware - name property . Return 0 for OK or - EINVAL if child FPGA region adds firmware - name .
static int child_regions_with_firmware(struct device_node *overlay)
{
	struct device_node *child_region;
	const char *child_firmware_name;
	int ret = 0;
	of_node_get(overlay);
	child_region = of_find_matching_node(overlay, fpga_region_of_match);
	while (child_region) {
		if (!of_property_read_string(child_region, "firmware-name",
					     &child_firmware_name)) {
			ret = -EINVAL;
			break;
		}
		child_region = of_find_matching_node(child_region,
						     fpga_region_of_match);
	}
	of_node_put(child_region);
	if (ret)
		pr_err("firmware-name not allowed in child FPGA region: %pOF",
		       child_region);
	return ret;
}
static int child_regions_with_firmware ( struct device_node * overlay ) { struct device_node * child_region ; const char * child_firmware_name ; int ret = 0 ; of_node_get ( overlay ) ; child_region = of_find_matching_node ( overlay , fpga_region_of_match ) ; while ( child_region ) { if ( ! of_property_read_string ( child_region , " " , & child_firmware_name ) ) { ret = - EINVAL ; break ; } child_region = of_find_matching_node ( child_region , fpga_region_of_match ) ; } of_node_put ( child_region ) ; if ( ret ) pr_err ( " " , child_region ) ; return ret ; }
child_regions_with_firmware
 @overlay: device node of the overlay
child_regions_with_firmware @overlay : device node of the overlay