mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
rk: only allow root access /proc/clocks and /sys/dvfs
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user