Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1880821
  • 博文数量: 376
  • 博客积分: 2147
  • 博客等级: 大尉
  • 技术积分: 3642
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-06 10:47
文章分类

全部博文(376)

文章存档

2019年(3)

2017年(28)

2016年(15)

2015年(17)

2014年(182)

2013年(16)

2012年(115)

我的朋友

分类: LINUX

2013-01-23 17:56:46

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);
}
阅读(2259) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~