Don't allow everybody to change voltage settings.
Signed-off-by: Vasiliy Kulikov <[email protected]>
---
Cannot compile the driver, so it is not tested at all.
arch/arm/mach-omap2/smartreflex.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index c37e823..95ac336 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -900,7 +900,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
return PTR_ERR(dbg_dir);
}
- (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir,
+ (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir,
(void *)sr_info, &pm_sr_fops);
(void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir,
&sr_info->err_weight);
@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
strcpy(name, "volt_");
sprintf(volt_name, "%d", volt_data[i].volt_nominal);
strcat(name, volt_name);
- (void) debugfs_create_x32(name, S_IRUGO | S_IWUGO, nvalue_dir,
+ (void) debugfs_create_x32(name, S_IRUGO | S_IWUSR, nvalue_dir,
&(sr_info->nvalue_table[i].nvalue));
}
--
1.7.0.4
* Vasiliy Kulikov <[email protected]> [110204 04:22]:
> Don't allow everybody to change voltage settings.
>
> Signed-off-by: Vasiliy Kulikov <[email protected]>
> ---
> Cannot compile the driver, so it is not tested at all.
And this one.
Tony
Vasiliy Kulikov <[email protected]> writes:
> Don't allow everybody to change voltage settings.
>
> Signed-off-by: Vasiliy Kulikov <[email protected]>
> ---
> Cannot compile the driver, so it is not tested at all.
Acked-by: Kevin Hilman <[email protected]>
> arch/arm/mach-omap2/smartreflex.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
> index c37e823..95ac336 100644
> --- a/arch/arm/mach-omap2/smartreflex.c
> +++ b/arch/arm/mach-omap2/smartreflex.c
> @@ -900,7 +900,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
> return PTR_ERR(dbg_dir);
> }
>
> - (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir,
> + (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, dbg_dir,
> (void *)sr_info, &pm_sr_fops);
> (void) debugfs_create_x32("errweight", S_IRUGO, dbg_dir,
> &sr_info->err_weight);
> @@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
> strcpy(name, "volt_");
> sprintf(volt_name, "%d", volt_data[i].volt_nominal);
> strcat(name, volt_name);
> - (void) debugfs_create_x32(name, S_IRUGO | S_IWUGO, nvalue_dir,
> + (void) debugfs_create_x32(name, S_IRUGO | S_IWUSR, nvalue_dir,
> &(sr_info->nvalue_table[i].nvalue));
> }
On Sat, Feb 5, 2011 at 04:24, Kevin Hilman <[email protected]> wrote:
> Vasiliy Kulikov <[email protected]> writes:
>
>> Don't allow everybody to change voltage settings.
>>
>> Signed-off-by: Vasiliy Kulikov <[email protected]>
>> ---
>> ?Cannot compile the driver, so it is not tested at all.
>
> Acked-by: Kevin Hilman <[email protected]>
Also fixes the checkpatch warning:
scripts/checkpatch.pl -f arch/arm/mach-omap2/smartreflex.c
WARNING: Exporting world writable files is usually an error. Consider
more restrictive permissions.
#903: FILE: arm/mach-omap2/smartreflex.c:903:
+ (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUGO, dbg_dir,
total: 0 errors, 1 warnings, 1028 lines checked
Acked-by: Nishanth Menon <[email protected]>
Regards,
Nishanth Menon