[PATCH 3/6] fdt: Add fdtdec functions to read byte array

Stephen Warren swarren at nvidia.com
Tue Dec 6 10:54:56 EST 2011


On 12/02/2011 07:57 PM, Simon Glass wrote:
> From: Anton Staff <robotboy at chromium.org>
> 
> Sometimes we don't need a full cell for each value. This provides
> a simple function to read a byte array, both with and without
> copying it.

> +const u8 *fdtdec_locate_byte_array(const void *blob, int node,
> +			     const char *prop_name, int count)
> +{
> +	const u8 *cell;
> +	int err;
> +
> +	cell = get_prop_len(blob, node, prop_name, count, &err);

Isn't that called get_prop_check_min_len() now?

> +	if (err)
> +		return NULL;
> +	return cell;
> +}

-- 
nvpublic


More information about the devicetree-discuss mailing list