/** * pseries_of_derive_parent - basically like dirname(1) * @path: the full_name of a node to be added to the tree * * Returns the node which should be the parent of the node * described by path. E.g., for path = "/foo/bar", returns * the node with full_name = "/foo".
*/ struct device_node *pseries_of_derive_parent(constchar *path)
{ struct device_node *parent; char *parent_path = "/"; constchar *tail;
/* We do not want the trailing '/' character */
tail = kbasename(path) - 1;
/* reject if path is "/" */ if (!strcmp(path, "/")) return ERR_PTR(-EINVAL);
/* Get drc-name-suffix-start:encode-int */
p2 = of_prop_next_u32(*prop, p2, &data->drc_name_suffix_start); if (!p2) return -EINVAL;
/* Get number-sequential-elements:encode-int */
p2 = of_prop_next_u32(*prop, p2, &data->num_sequential_elems); if (!p2) return -EINVAL;
/* Get sequential-increment:encode-int */
p2 = of_prop_next_u32(*prop, p2, &data->sequential_inc); if (!p2) return -EINVAL;
/* Get drc-power-domain:encode-int */
p2 = of_prop_next_u32(*prop, p2, &data->drc_power_domain); if (!p2) return -EINVAL;
/* Should now know end of current entry */
(*curval) = (void *)(++p2);
data->last_drc_index = data->drc_index_start +
((data->num_sequential_elems - 1) * data->sequential_inc);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.