mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
switch procfs to umode_t use
both proc_dir_entry ->mode and populating functions Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
587a1f1659
commit
d161a13f97
13 changed files with 31 additions and 32 deletions
|
|
@ -2325,16 +2325,15 @@ static struct sg_proc_leaf sg_proc_leaf_arr[] = {
|
|||
static int
|
||||
sg_proc_init(void)
|
||||
{
|
||||
int k, mask;
|
||||
int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
|
||||
struct sg_proc_leaf * leaf;
|
||||
int k;
|
||||
|
||||
sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
|
||||
if (!sg_proc_sgp)
|
||||
return 1;
|
||||
for (k = 0; k < num_leaves; ++k) {
|
||||
leaf = &sg_proc_leaf_arr[k];
|
||||
mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
|
||||
struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k];
|
||||
umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
|
||||
proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops);
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue