linux-2.6.28/fs/proc/proc_device.c
/*
* Called on initialization to set up the /proc/device-tree subtree
*/
void __init proc_device_tree_init(void)
{
struct device_node *root;
if ( !have_of )
return;
proc_device_tree = proc_mkdir("device-tree", NULL);
if (proc_device_tree == 0)
return;
root = of_find_node_by_path("/");
if (root == 0) {
printk(KERN_ERR "/proc/device-tree: can't find root\n");
return;
}
proc_device_tree_add_node(root, proc_device_tree);
of_node_put(root);
}
阅读(2305) | 评论(0) | 转发(0) |