diff options
author | Joe Perches <joe@perches.com> | 2018-03-24 01:54:37 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-03-27 11:01:13 +0300 |
commit | 2ef00c53049b6a8758d118188992da01d75f3628 (patch) | |
tree | f7eb61964d5504c7d5c8bc7f675fd1fe810eb7f9 /drivers/net/wireless/intel/iwlegacy/3945-mac.c | |
parent | 255dd5b79d5474dad3ecebe99be7818684921abd (diff) | |
download | linux-2ef00c53049b6a8758d118188992da01d75f3628.tar.xz |
wireless: Use octal not symbolic permissions
Prefer the direct use of octal for permissions.
Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace
and some typing.
Miscellanea:
o Whitespace neatening around these conversions.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/3945-mac.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/3945-mac.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index 4b53ebf00c7f..62a9794f952b 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c @@ -3122,7 +3122,7 @@ il3945_store_debug_level(struct device *d, struct device_attribute *attr, return strnlen(buf, count); } -static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, il3945_show_debug_level, +static DEVICE_ATTR(debug_level, 0644, il3945_show_debug_level, il3945_store_debug_level); #endif /* CONFIG_IWLEGACY_DEBUG */ @@ -3139,7 +3139,7 @@ il3945_show_temperature(struct device *d, struct device_attribute *attr, return sprintf(buf, "%d\n", il3945_hw_get_temperature(il)); } -static DEVICE_ATTR(temperature, S_IRUGO, il3945_show_temperature, NULL); +static DEVICE_ATTR(temperature, 0444, il3945_show_temperature, NULL); static ssize_t il3945_show_tx_power(struct device *d, struct device_attribute *attr, char *buf) @@ -3165,8 +3165,7 @@ il3945_store_tx_power(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(tx_power, S_IWUSR | S_IRUGO, il3945_show_tx_power, - il3945_store_tx_power); +static DEVICE_ATTR(tx_power, 0644, il3945_show_tx_power, il3945_store_tx_power); static ssize_t il3945_show_flags(struct device *d, struct device_attribute *attr, char *buf) @@ -3199,8 +3198,7 @@ il3945_store_flags(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(flags, S_IWUSR | S_IRUGO, il3945_show_flags, - il3945_store_flags); +static DEVICE_ATTR(flags, 0644, il3945_show_flags, il3945_store_flags); static ssize_t il3945_show_filter_flags(struct device *d, struct device_attribute *attr, @@ -3235,7 +3233,7 @@ il3945_store_filter_flags(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(filter_flags, S_IWUSR | S_IRUGO, il3945_show_filter_flags, +static DEVICE_ATTR(filter_flags, 0644, il3945_show_filter_flags, il3945_store_filter_flags); static ssize_t @@ -3306,7 +3304,7 @@ il3945_store_measurement(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(measurement, S_IRUSR | S_IWUSR, il3945_show_measurement, +static DEVICE_ATTR(measurement, 0600, il3945_show_measurement, il3945_store_measurement); static ssize_t @@ -3330,7 +3328,7 @@ il3945_show_retry_rate(struct device *d, struct device_attribute *attr, return sprintf(buf, "%d", il->retry_rate); } -static DEVICE_ATTR(retry_rate, S_IWUSR | S_IRUSR, il3945_show_retry_rate, +static DEVICE_ATTR(retry_rate, 0600, il3945_show_retry_rate, il3945_store_retry_rate); static ssize_t @@ -3340,7 +3338,7 @@ il3945_show_channels(struct device *d, struct device_attribute *attr, char *buf) return 0; } -static DEVICE_ATTR(channels, S_IRUSR, il3945_show_channels, NULL); +static DEVICE_ATTR(channels, 0400, il3945_show_channels, NULL); static ssize_t il3945_show_antenna(struct device *d, struct device_attribute *attr, char *buf) @@ -3377,8 +3375,7 @@ il3945_store_antenna(struct device *d, struct device_attribute *attr, return count; } -static DEVICE_ATTR(antenna, S_IWUSR | S_IRUGO, il3945_show_antenna, - il3945_store_antenna); +static DEVICE_ATTR(antenna, 0644, il3945_show_antenna, il3945_store_antenna); static ssize_t il3945_show_status(struct device *d, struct device_attribute *attr, char *buf) @@ -3389,7 +3386,7 @@ il3945_show_status(struct device *d, struct device_attribute *attr, char *buf) return sprintf(buf, "0x%08x\n", (int)il->status); } -static DEVICE_ATTR(status, S_IRUGO, il3945_show_status, NULL); +static DEVICE_ATTR(status, 0444, il3945_show_status, NULL); static ssize_t il3945_dump_error_log(struct device *d, struct device_attribute *attr, @@ -3404,7 +3401,7 @@ il3945_dump_error_log(struct device *d, struct device_attribute *attr, return strnlen(buf, count); } -static DEVICE_ATTR(dump_errors, S_IWUSR, NULL, il3945_dump_error_log); +static DEVICE_ATTR(dump_errors, 0200, NULL, il3945_dump_error_log); /***************************************************************************** * @@ -3943,18 +3940,18 @@ il3945_exit(void) MODULE_FIRMWARE(IL3945_MODULE_FIRMWARE(IL3945_UCODE_API_MAX)); -module_param_named(antenna, il3945_mod_params.antenna, int, S_IRUGO); +module_param_named(antenna, il3945_mod_params.antenna, int, 0444); MODULE_PARM_DESC(antenna, "select antenna (1=Main, 2=Aux, default 0 [both])"); -module_param_named(swcrypto, il3945_mod_params.sw_crypto, int, S_IRUGO); +module_param_named(swcrypto, il3945_mod_params.sw_crypto, int, 0444); MODULE_PARM_DESC(swcrypto, "using software crypto (default 1 [software])"); module_param_named(disable_hw_scan, il3945_mod_params.disable_hw_scan, int, - S_IRUGO); + 0444); MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); #ifdef CONFIG_IWLEGACY_DEBUG -module_param_named(debug, il_debug_level, uint, S_IRUGO | S_IWUSR); +module_param_named(debug, il_debug_level, uint, 0644); MODULE_PARM_DESC(debug, "debug output mask"); #endif -module_param_named(fw_restart, il3945_mod_params.restart_fw, int, S_IRUGO); +module_param_named(fw_restart, il3945_mod_params.restart_fw, int, 0444); MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); module_exit(il3945_exit); |