MCPcopy Create free account
hub / github.com/F-Stack/f-stack / of_init_path

Function of_init_path

dpdk/drivers/common/dpaax/dpaa_of.c:216–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216int
217of_init_path(const char *dt_path)
218{
219 int ret;
220
221 base_dir = dt_path;
222
223 /* This needs to be singleton initialization */
224 DPAAX_HWWARN(alive, "Double-init of device-tree driver!");
225
226 /* Prepare root node (the remaining fields are set in process_dir()) */
227 root_dir.node.node.name[0] = '\0';
228 root_dir.node.node.full_name[0] = '\0';
229 INIT_LIST_HEAD(&root_dir.node.list);
230 root_dir.parent = NULL;
231
232 /* Kick things off... */
233 ret = process_dir("", &root_dir);
234 if (ret) {
235 DPAAX_LOG(ERR, "Unable to parse device tree");
236 return ret;
237 }
238
239 /* Now make a flat, linear list of directories */
240 linear_dir(&root_dir);
241 alive = 1;
242 return 0;
243}
244
245static void
246destroy_dir(struct dt_dir *d)

Callers 1

of_initFunction · 0.85

Calls 3

INIT_LIST_HEADFunction · 0.85
process_dirFunction · 0.85
linear_dirFunction · 0.85

Tested by

no test coverage detected