Lines Matching full:tree

79  * Widget tree sysfs
81 * This is a tree showing the attributes of each widget. It appears like
322 struct hdac_widget_tree *tree = codec->widgets; in widget_tree_free() local
325 if (!tree) in widget_tree_free()
327 free_widget_node(tree->afg, &widget_afg_group); in widget_tree_free()
328 if (tree->nodes) { in widget_tree_free()
329 for (p = tree->nodes; *p; p++) in widget_tree_free()
331 kfree(tree->nodes); in widget_tree_free()
333 kobject_put(tree->root); in widget_tree_free()
334 kfree(tree); in widget_tree_free()
365 struct hdac_widget_tree *tree; in widget_tree_create() local
369 tree = codec->widgets = kzalloc(sizeof(*tree), GFP_KERNEL); in widget_tree_create()
370 if (!tree) in widget_tree_create()
373 tree->root = kobject_create_and_add("widgets", &codec->dev.kobj); in widget_tree_create()
374 if (!tree->root) in widget_tree_create()
377 tree->nodes = kcalloc(codec->num_nodes + 1, sizeof(*tree->nodes), in widget_tree_create()
379 if (!tree->nodes) in widget_tree_create()
383 err = add_widget_node(tree->root, nid, &widget_node_group, in widget_tree_create()
384 &tree->nodes[i]); in widget_tree_create()
390 err = add_widget_node(tree->root, codec->afg, in widget_tree_create()
391 &widget_afg_group, &tree->afg); in widget_tree_create()
396 kobject_uevent(tree->root, KOBJ_CHANGE); in widget_tree_create()
427 struct hdac_widget_tree *tree; in hda_widget_sysfs_reinit() local
435 tree = kmemdup(codec->widgets, sizeof(*tree), GFP_KERNEL); in hda_widget_sysfs_reinit()
436 if (!tree) in hda_widget_sysfs_reinit()
439 tree->nodes = kcalloc(num_nodes + 1, sizeof(*tree->nodes), GFP_KERNEL); in hda_widget_sysfs_reinit()
440 if (!tree->nodes) { in hda_widget_sysfs_reinit()
441 kfree(tree); in hda_widget_sysfs_reinit()
455 add_widget_node(tree->root, nid, &widget_node_group, in hda_widget_sysfs_reinit()
456 &tree->nodes[i]); in hda_widget_sysfs_reinit()
458 tree->nodes[i] = in hda_widget_sysfs_reinit()
462 /* replace with the new tree */ in hda_widget_sysfs_reinit()
465 codec->widgets = tree; in hda_widget_sysfs_reinit()
467 kobject_uevent(tree->root, KOBJ_CHANGE); in hda_widget_sysfs_reinit()