libfdt: Abolish fdt_property_offset()

fdt_property_offset() is the only function in the library returning a
direct offset to a property, and no function takes such an offset
(they only take offsets to nodes, not properties).  Furthermore the
only client uses for this function I can think of involve immediately
translating the offset into a pointer, effectively duplicating the
internal function _fdt_getprop()

This function abolishes fdt_property_offset(), replacing it with
fdt_get_property(), a renamed and now externally visible version of
_fdt_getprop().
This commit is contained in:
David Gibson 2006-12-11 16:15:34 +11:00
parent 1a765f51a4
commit 94993f4fc4
10 changed files with 84 additions and 100 deletions

View file

@ -126,7 +126,7 @@ static struct fdt_property *_resize_property(struct fdt_header *fdt, int nodeoff
int oldlen;
int err;
prop = _fdt_getprop(fdt, nodeoffset, name, &oldlen);
prop = fdt_get_property(fdt, nodeoffset, name, &oldlen);
if ((err = fdt_ptr_error(prop)))
return PTR_ERROR(err);
@ -203,7 +203,7 @@ int fdt_delprop(struct fdt_header *fdt, int nodeoffset, const char *name)
RW_OFFSET_CHECK_HEADER(fdt);
prop = _fdt_getprop(fdt, nodeoffset, name, &len);
prop = fdt_get_property(fdt, nodeoffset, name, &len);
if ((err = fdt_ptr_error(prop)))
return err;