mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-26 19:44:21 +08:00
drivers/regulator/virtual: avoid world-writable sysfs files.
In line with practice for module parameters, we're adding a build-time check that sysfs files aren't world-writable. Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
332e2b4f51
commit
71e06af26c
@ -266,11 +266,11 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr,
|
||||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(min_microvolts, 0666, show_min_uV, set_min_uV);
|
||||
static DEVICE_ATTR(max_microvolts, 0666, show_max_uV, set_max_uV);
|
||||
static DEVICE_ATTR(min_microamps, 0666, show_min_uA, set_min_uA);
|
||||
static DEVICE_ATTR(max_microamps, 0666, show_max_uA, set_max_uA);
|
||||
static DEVICE_ATTR(mode, 0666, show_mode, set_mode);
|
||||
static DEVICE_ATTR(min_microvolts, 0664, show_min_uV, set_min_uV);
|
||||
static DEVICE_ATTR(max_microvolts, 0664, show_max_uV, set_max_uV);
|
||||
static DEVICE_ATTR(min_microamps, 0664, show_min_uA, set_min_uA);
|
||||
static DEVICE_ATTR(max_microamps, 0664, show_max_uA, set_max_uA);
|
||||
static DEVICE_ATTR(mode, 0664, show_mode, set_mode);
|
||||
|
||||
static struct attribute *regulator_virtual_attributes[] = {
|
||||
&dev_attr_min_microvolts.attr,
|
||||
|
Loading…
Reference in New Issue
Block a user