rk: only allow root access /proc/clocks and /sys/dvfs

This commit is contained in:
黄涛
2013-04-22 17:46:56 +08:00
parent bde565f96a
commit a41d6442f1
2 changed files with 5 additions and 5 deletions

View File

@@ -754,7 +754,7 @@ static const struct file_operations proc_clk_fops = {
static int __init clk_proc_init(void)
{
proc_create("clocks", 0, NULL, &proc_clk_fops);
proc_create("clocks", S_IFREG | S_IRUSR | S_IRGRP, NULL, &proc_clk_fops);
return 0;
}

View File

@@ -1494,10 +1494,10 @@ struct dvfs_attribute {
static struct dvfs_attribute dvfs_attrs[] = {
/* node_name permision show_func store_func */
#ifdef CONFIG_RK_CLOCK_PROC
__ATTR(dvfs_tree, S_IRUGO | S_IWUSR, dvfs_tree_show, dvfs_tree_store),
__ATTR(avs_init, S_IRUGO | S_IWUSR, avs_init_show, avs_init_store),
//__ATTR(avs_dyn, S_IRUGO | S_IWUSR, avs_dyn_show, avs_dyn_store),
__ATTR(avs_now, S_IRUGO | S_IWUSR, avs_now_show, avs_now_store),
__ATTR(dvfs_tree, S_IRUSR | S_IRGRP | S_IWUSR, dvfs_tree_show, dvfs_tree_store),
__ATTR(avs_init, S_IRUSR | S_IRGRP | S_IWUSR, avs_init_show, avs_init_store),
// __ATTR(avs_dyn, S_IRUSR | S_IRGRP | S_IWUSR, avs_dyn_show, avs_dyn_store),
__ATTR(avs_now, S_IRUSR | S_IRGRP | S_IWUSR, avs_now_show, avs_now_store),
#endif
};