[PATCH 09/11] touchscreen: raydium_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/raydium_i2c_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index d1c09e6a2cb6..eddbb51e55dd 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -934,9 +934,9 @@ static ssize_t raydium_i2c_calibrate_store(struct device *dev, return error ?: count; } -static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); -static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); +static DEVICE_ATTR(fw_version, 0444, raydium_i2c_fw_ver_show, NULL); +static DEVICE_ATTR(hw_version, 0444, raydium_i2c_hw_ver_show, NULL); +static DEVICE_ATTR(boot_mode, 0444, raydium_i2c_boot_mode_show, NULL); static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); -- 2.17.1
[PATCH 09/11] touchscreen: raydium_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/raydium_i2c_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index d1c09e6a2cb6..eddbb51e55dd 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -934,9 +934,9 @@ static ssize_t raydium_i2c_calibrate_store(struct device *dev, return error ?: count; } -static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); -static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); +static DEVICE_ATTR(fw_version, 0444, raydium_i2c_fw_ver_show, NULL); +static DEVICE_ATTR(hw_version, 0444, raydium_i2c_hw_ver_show, NULL); +static DEVICE_ATTR(boot_mode, 0444, raydium_i2c_boot_mode_show, NULL); static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); -- 2.17.1
[PATCH 10/11] touchscreen: sun4i_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/sun4i-ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index d2e14d9e5975..78960961a524 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -230,8 +230,8 @@ static ssize_t show_temp_label(struct device *dev, return sprintf(buf, "SoC temperature\n"); } -static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); -static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); +static DEVICE_ATTR(temp1_input, 0444, show_temp, NULL); +static DEVICE_ATTR(temp1_label, 0444, show_temp_label, NULL); static struct attribute *sun4i_ts_attrs[] = { _attr_temp1_input.attr, -- 2.17.1
[PATCH 10/11] touchscreen: sun4i_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/sun4i-ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index d2e14d9e5975..78960961a524 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -230,8 +230,8 @@ static ssize_t show_temp_label(struct device *dev, return sprintf(buf, "SoC temperature\n"); } -static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); -static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); +static DEVICE_ATTR(temp1_input, 0444, show_temp, NULL); +static DEVICE_ATTR(temp1_label, 0444, show_temp_label, NULL); static struct attribute *sun4i_ts_attrs[] = { _attr_temp1_input.attr, -- 2.17.1
[PATCH 01/11] touchscreen: ft5x06: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); WARNING: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'. + debugfs_create_file("mode", S_IRUSR | S_IWUSR, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_file("raw_data", S_IRUSR, Signed-off-by: Harshit Jain --- drivers/input/touchscreen/edt-ft5x06.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 1e18ca0d1b4e..ea4026682e79 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -479,16 +479,16 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev, } /* m06, m09: range 0-31, m12: range 0-5 */ -static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, +static EDT_ATTR(gain, 0644, WORK_REGISTER_GAIN, M09_REGISTER_GAIN, 0, 31); /* m06, m09: range 0-31, m12: range 0-16 */ -static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, +static EDT_ATTR(offset, 0644, WORK_REGISTER_OFFSET, M09_REGISTER_OFFSET, 0, 31); /* m06: range 20 to 80, m09: range 0 to 30, m12: range 1 to 255... */ -static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, +static EDT_ATTR(threshold, 0644, WORK_REGISTER_THRESHOLD, M09_REGISTER_THRESHOLD, 0, 255); /* m06: range 3 to 14, m12: (0x64: 100Hz) */ -static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, +static EDT_ATTR(report_rate, 0644, WORK_REGISTER_REPORT_RATE, NO_REGISTER, 0, 255); static struct attribute *edt_ft5x06_attrs[] = { @@ -739,12 +739,12 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, if (!tsdata->debug_dir) return; - debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); - debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); + debugfs_create_u16("num_x", 0400, tsdata->debug_dir, >num_x); + debugfs_create_u16("num_y", 0400, tsdata->debug_dir, >num_y); - debugfs_create_file("mode", S_IRUSR | S_IWUSR, + debugfs_create_file("mode", 0600, tsdata->debug_dir, tsdata, _mode_fops); - debugfs_create_file("raw_data", S_IRUSR, + debugfs_create_file("raw_data", 0400, tsdata->debug_dir, tsdata, _raw_data_fops); } -- 2.17.1
[PATCH 01/11] touchscreen: ft5x06: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); WARNING: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'. + debugfs_create_file("mode", S_IRUSR | S_IWUSR, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_file("raw_data", S_IRUSR, Signed-off-by: Harshit Jain --- drivers/input/touchscreen/edt-ft5x06.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 1e18ca0d1b4e..ea4026682e79 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -479,16 +479,16 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev, } /* m06, m09: range 0-31, m12: range 0-5 */ -static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, +static EDT_ATTR(gain, 0644, WORK_REGISTER_GAIN, M09_REGISTER_GAIN, 0, 31); /* m06, m09: range 0-31, m12: range 0-16 */ -static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, +static EDT_ATTR(offset, 0644, WORK_REGISTER_OFFSET, M09_REGISTER_OFFSET, 0, 31); /* m06: range 20 to 80, m09: range 0 to 30, m12: range 1 to 255... */ -static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, +static EDT_ATTR(threshold, 0644, WORK_REGISTER_THRESHOLD, M09_REGISTER_THRESHOLD, 0, 255); /* m06: range 3 to 14, m12: (0x64: 100Hz) */ -static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, +static EDT_ATTR(report_rate, 0644, WORK_REGISTER_REPORT_RATE, NO_REGISTER, 0, 255); static struct attribute *edt_ft5x06_attrs[] = { @@ -739,12 +739,12 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, if (!tsdata->debug_dir) return; - debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); - debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); + debugfs_create_u16("num_x", 0400, tsdata->debug_dir, >num_x); + debugfs_create_u16("num_y", 0400, tsdata->debug_dir, >num_y); - debugfs_create_file("mode", S_IRUSR | S_IWUSR, + debugfs_create_file("mode", 0600, tsdata->debug_dir, tsdata, _mode_fops); - debugfs_create_file("raw_data", S_IRUSR, + debugfs_create_file("raw_data", 0400, tsdata->debug_dir, tsdata, _raw_data_fops); } -- 2.17.1
[PATCH 11/11] touchscreen: tsc200x: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/tsc200x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c index e0fde590df8e..daefeca101ff 100644 --- a/drivers/input/touchscreen/tsc200x-core.c +++ b/drivers/input/touchscreen/tsc200x-core.c @@ -336,7 +336,7 @@ static ssize_t tsc200x_selftest_show(struct device *dev, return sprintf(buf, "%d\n", success); } -static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); +static DEVICE_ATTR(selftest, 0444, tsc200x_selftest_show, NULL); static struct attribute *tsc200x_attrs[] = { _attr_selftest.attr, -- 2.17.1
[PATCH 11/11] touchscreen: tsc200x: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/tsc200x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c index e0fde590df8e..daefeca101ff 100644 --- a/drivers/input/touchscreen/tsc200x-core.c +++ b/drivers/input/touchscreen/tsc200x-core.c @@ -336,7 +336,7 @@ static ssize_t tsc200x_selftest_show(struct device *dev, return sprintf(buf, "%d\n", success); } -static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); +static DEVICE_ATTR(selftest, 0444, tsc200x_selftest_show, NULL); static struct attribute *tsc200x_attrs[] = { _attr_selftest.attr, -- 2.17.1
[PATCH 08/11] touchscreen: melfas: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/melfas_mip4.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c index 430a2bc5f7ca..f7fd940e61ea 100644 --- a/drivers/input/touchscreen/melfas_mip4.c +++ b/drivers/input/touchscreen/melfas_mip4.c @@ -1332,7 +1332,7 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev, return count; } -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); +static DEVICE_ATTR(update_fw, 0200, NULL, mip4_sysfs_fw_update); static ssize_t mip4_sysfs_read_fw_version(struct device *dev, struct device_attribute *attr, @@ -1354,7 +1354,7 @@ static ssize_t mip4_sysfs_read_fw_version(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); +static DEVICE_ATTR(fw_version, 0444, mip4_sysfs_read_fw_version, NULL); static ssize_t mip4_sysfs_read_hw_version(struct device *dev, struct device_attribute *attr, @@ -1379,7 +1379,7 @@ static ssize_t mip4_sysfs_read_hw_version(struct device *dev, return count; } -static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); +static DEVICE_ATTR(hw_version, 0444, mip4_sysfs_read_hw_version, NULL); static ssize_t mip4_sysfs_read_product_id(struct device *dev, struct device_attribute *attr, @@ -1398,7 +1398,7 @@ static ssize_t mip4_sysfs_read_product_id(struct device *dev, return count; } -static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); +static DEVICE_ATTR(product_id, 0444, mip4_sysfs_read_product_id, NULL); static ssize_t mip4_sysfs_read_ic_name(struct device *dev, struct device_attribute *attr, @@ -1418,7 +1418,7 @@ static ssize_t mip4_sysfs_read_ic_name(struct device *dev, return count; } -static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); +static DEVICE_ATTR(ic_name, 0444, mip4_sysfs_read_ic_name, NULL); static struct attribute *mip4_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 08/11] touchscreen: melfas: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/melfas_mip4.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c index 430a2bc5f7ca..f7fd940e61ea 100644 --- a/drivers/input/touchscreen/melfas_mip4.c +++ b/drivers/input/touchscreen/melfas_mip4.c @@ -1332,7 +1332,7 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev, return count; } -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); +static DEVICE_ATTR(update_fw, 0200, NULL, mip4_sysfs_fw_update); static ssize_t mip4_sysfs_read_fw_version(struct device *dev, struct device_attribute *attr, @@ -1354,7 +1354,7 @@ static ssize_t mip4_sysfs_read_fw_version(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); +static DEVICE_ATTR(fw_version, 0444, mip4_sysfs_read_fw_version, NULL); static ssize_t mip4_sysfs_read_hw_version(struct device *dev, struct device_attribute *attr, @@ -1379,7 +1379,7 @@ static ssize_t mip4_sysfs_read_hw_version(struct device *dev, return count; } -static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); +static DEVICE_ATTR(hw_version, 0444, mip4_sysfs_read_hw_version, NULL); static ssize_t mip4_sysfs_read_product_id(struct device *dev, struct device_attribute *attr, @@ -1398,7 +1398,7 @@ static ssize_t mip4_sysfs_read_product_id(struct device *dev, return count; } -static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); +static DEVICE_ATTR(product_id, 0444, mip4_sysfs_read_product_id, NULL); static ssize_t mip4_sysfs_read_ic_name(struct device *dev, struct device_attribute *attr, @@ -1418,7 +1418,7 @@ static ssize_t mip4_sysfs_read_ic_name(struct device *dev, return count; } -static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); +static DEVICE_ATTR(ic_name, 0444, mip4_sysfs_read_ic_name, NULL); static struct attribute *mip4_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 07/11] touchscreen: mc13783: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'. +module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/mc13783_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index ef64f36c5ffc..4e33349f101e 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c @@ -25,9 +25,9 @@ #define DEFAULT_SAMPLE_TOLERANCE 300 static unsigned int sample_tolerance = DEFAULT_SAMPLE_TOLERANCE; -module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); +module_param(sample_tolerance, uint, 0644); MODULE_PARM_DESC(sample_tolerance, - "If the minimal and maximal value read out for one axis (out " + "If the minimal and maximum value read out for one axis (out " "of three) differ by this value (default: " __stringify(DEFAULT_SAMPLE_TOLERANCE) ") or more, the reading " "is supposed to be wrong and is discarded. Set to 0 to " -- 2.17.1
[PATCH 06/11] touchscreen: ili210x: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/ili210x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c index 6f76eeedf465..07526a6f2cb7 100644 --- a/drivers/input/touchscreen/ili210x.c +++ b/drivers/input/touchscreen/ili210x.c @@ -169,7 +169,7 @@ static ssize_t ili210x_calibrate(struct device *dev, return count; } -static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); +static DEVICE_ATTR(calibrate, 0200, NULL, ili210x_calibrate); static struct attribute *ili210x_attributes[] = { _attr_calibrate.attr, -- 2.17.1
[PATCH 07/11] touchscreen: mc13783: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'. +module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/mc13783_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index ef64f36c5ffc..4e33349f101e 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c @@ -25,9 +25,9 @@ #define DEFAULT_SAMPLE_TOLERANCE 300 static unsigned int sample_tolerance = DEFAULT_SAMPLE_TOLERANCE; -module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); +module_param(sample_tolerance, uint, 0644); MODULE_PARM_DESC(sample_tolerance, - "If the minimal and maximal value read out for one axis (out " + "If the minimal and maximum value read out for one axis (out " "of three) differ by this value (default: " __stringify(DEFAULT_SAMPLE_TOLERANCE) ") or more, the reading " "is supposed to be wrong and is discarded. Set to 0 to " -- 2.17.1
[PATCH 06/11] touchscreen: ili210x: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/ili210x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c index 6f76eeedf465..07526a6f2cb7 100644 --- a/drivers/input/touchscreen/ili210x.c +++ b/drivers/input/touchscreen/ili210x.c @@ -169,7 +169,7 @@ static ssize_t ili210x_calibrate(struct device *dev, return count; } -static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); +static DEVICE_ATTR(calibrate, 0200, NULL, ili210x_calibrate); static struct attribute *ili210x_attributes[] = { _attr_calibrate.attr, -- 2.17.1
[PATCH 02/11] touchscreen: ad7877: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/ad7877.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 5cfe477ec992..4b4a9d84195e 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -461,7 +461,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", (unsigned) v); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); SHOW(aux1) SHOW(aux2) -- 2.17.1
[PATCH 05/11] touchscreen: elants: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw) WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. + .dattr = __ATTR(_field, S_IRUGO,\ Signed-off-by: Harshit Jain --- drivers/input/touchscreen/elants_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index d21ca39b0fdb..9717b7c3bb6f 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1000,8 +1000,8 @@ static ssize_t show_iap_mode(struct device *dev, } static DEVICE_ATTR_WO(calibrate); -static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw); +static DEVICE_ATTR(iap_mode, 0444, show_iap_mode, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, write_update_fw); struct elants_version_attribute { struct device_attribute dattr; @@ -1016,7 +1016,7 @@ struct elants_version_attribute { __ELANTS_FIELD_SIZE(_field)) #define ELANTS_VERSION_ATTR(_field)\ struct elants_version_attribute elants_ver_attr_##_field = {\ - .dattr = __ATTR(_field, S_IRUGO,\ + .dattr = __ATTR(_field, 0444, \ elants_version_attribute_show, NULL), \ .field_offset = offsetof(struct elants_data, _field), \ .field_size = __ELANTS_VERIFY_SIZE(_field), \ -- 2.17.1
[PATCH 02/11] touchscreen: ad7877: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/ad7877.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 5cfe477ec992..4b4a9d84195e 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -461,7 +461,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", (unsigned) v); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); SHOW(aux1) SHOW(aux2) -- 2.17.1
[PATCH 05/11] touchscreen: elants: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw) WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. + .dattr = __ATTR(_field, S_IRUGO,\ Signed-off-by: Harshit Jain --- drivers/input/touchscreen/elants_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index d21ca39b0fdb..9717b7c3bb6f 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1000,8 +1000,8 @@ static ssize_t show_iap_mode(struct device *dev, } static DEVICE_ATTR_WO(calibrate); -static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw); +static DEVICE_ATTR(iap_mode, 0444, show_iap_mode, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, write_update_fw); struct elants_version_attribute { struct device_attribute dattr; @@ -1016,7 +1016,7 @@ struct elants_version_attribute { __ELANTS_FIELD_SIZE(_field)) #define ELANTS_VERSION_ATTR(_field)\ struct elants_version_attribute elants_ver_attr_##_field = {\ - .dattr = __ATTR(_field, S_IRUGO,\ + .dattr = __ATTR(_field, 0444, \ elants_version_attribute_show, NULL), \ .field_offset = offsetof(struct elants_data, _field), \ .field_size = __ELANTS_VERIFY_SIZE(_field), \ -- 2.17.1
[PATCH 04/11] touchscreen: amtel: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/atmel_mxt_ts.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 54fe190fd4bc..5202a8244f1d 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2892,10 +2892,10 @@ static ssize_t mxt_update_fw_store(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); -static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); +static DEVICE_ATTR(fw_version, 0444, mxt_fw_version_show, NULL); +static DEVICE_ATTR(hw_version, 0444, mxt_hw_version_show, NULL); +static DEVICE_ATTR(object, 0444, mxt_object_show, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, mxt_update_fw_store); static struct attribute *mxt_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 03/11] touchscreen: ad7846: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index a2f45aefce08..7c07de0802de 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", adjust(ts, v)); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); /* Sysfs conventions report temperatures in millidegrees Celsius. @@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev, return sprintf(buf, "%u\n", ts->pendown); } -static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); +static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL); static ssize_t ads7846_disable_show(struct device *dev, struct device_attribute *attr, char *buf) -- 2.17.1
[PATCH 04/11] touchscreen: amtel: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/atmel_mxt_ts.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 54fe190fd4bc..5202a8244f1d 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2892,10 +2892,10 @@ static ssize_t mxt_update_fw_store(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); -static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); +static DEVICE_ATTR(fw_version, 0444, mxt_fw_version_show, NULL); +static DEVICE_ATTR(hw_version, 0444, mxt_hw_version_show, NULL); +static DEVICE_ATTR(object, 0444, mxt_object_show, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, mxt_update_fw_store); static struct attribute *mxt_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 03/11] touchscreen: ad7846: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); Signed-off-by: Harshit Jain --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index a2f45aefce08..7c07de0802de 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", adjust(ts, v)); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); /* Sysfs conventions report temperatures in millidegrees Celsius. @@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev, return sprintf(buf, "%u\n", ts->pendown); } -static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); +static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL); static ssize_t ads7846_disable_show(struct device *dev, struct device_attribute *attr, char *buf) -- 2.17.1
[PATCH 11/11] touchscreen: tsc200x: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/tsc200x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c index e0fde590df8e..daefeca101ff 100644 --- a/drivers/input/touchscreen/tsc200x-core.c +++ b/drivers/input/touchscreen/tsc200x-core.c @@ -336,7 +336,7 @@ static ssize_t tsc200x_selftest_show(struct device *dev, return sprintf(buf, "%d\n", success); } -static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); +static DEVICE_ATTR(selftest, 0444, tsc200x_selftest_show, NULL); static struct attribute *tsc200x_attrs[] = { _attr_selftest.attr, -- 2.17.1
[PATCH 01/11] touchscreen: ft5x06: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); WARNING: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'. + debugfs_create_file("mode", S_IRUSR | S_IWUSR, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_file("raw_data", S_IRUSR, Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/edt-ft5x06.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 1e18ca0d1b4e..ea4026682e79 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -479,16 +479,16 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev, } /* m06, m09: range 0-31, m12: range 0-5 */ -static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, +static EDT_ATTR(gain, 0644, WORK_REGISTER_GAIN, M09_REGISTER_GAIN, 0, 31); /* m06, m09: range 0-31, m12: range 0-16 */ -static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, +static EDT_ATTR(offset, 0644, WORK_REGISTER_OFFSET, M09_REGISTER_OFFSET, 0, 31); /* m06: range 20 to 80, m09: range 0 to 30, m12: range 1 to 255... */ -static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, +static EDT_ATTR(threshold, 0644, WORK_REGISTER_THRESHOLD, M09_REGISTER_THRESHOLD, 0, 255); /* m06: range 3 to 14, m12: (0x64: 100Hz) */ -static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, +static EDT_ATTR(report_rate, 0644, WORK_REGISTER_REPORT_RATE, NO_REGISTER, 0, 255); static struct attribute *edt_ft5x06_attrs[] = { @@ -739,12 +739,12 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, if (!tsdata->debug_dir) return; - debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); - debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); + debugfs_create_u16("num_x", 0400, tsdata->debug_dir, >num_x); + debugfs_create_u16("num_y", 0400, tsdata->debug_dir, >num_y); - debugfs_create_file("mode", S_IRUSR | S_IWUSR, + debugfs_create_file("mode", 0600, tsdata->debug_dir, tsdata, _mode_fops); - debugfs_create_file("raw_data", S_IRUSR, + debugfs_create_file("raw_data", 0400, tsdata->debug_dir, tsdata, _raw_data_fops); } -- 2.17.1
[PATCH 09/11] touchscreen: raydium_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/raydium_i2c_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index d1c09e6a2cb6..eddbb51e55dd 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -934,9 +934,9 @@ static ssize_t raydium_i2c_calibrate_store(struct device *dev, return error ?: count; } -static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); -static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); +static DEVICE_ATTR(fw_version, 0444, raydium_i2c_fw_ver_show, NULL); +static DEVICE_ATTR(hw_version, 0444, raydium_i2c_hw_ver_show, NULL); +static DEVICE_ATTR(boot_mode, 0444, raydium_i2c_boot_mode_show, NULL); static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); -- 2.17.1
[PATCH 01/11] touchscreen: ft5x06: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, WARNING: Symbolic permissions 'S_IWUSR | S_IRUGO' are not preferred. Consider using octal permissions '0644'. +static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); WARNING: Symbolic permissions 'S_IRUSR | S_IWUSR' are not preferred. Consider using octal permissions '0600'. + debugfs_create_file("mode", S_IRUSR | S_IWUSR, WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. + debugfs_create_file("raw_data", S_IRUSR, Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/edt-ft5x06.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 1e18ca0d1b4e..ea4026682e79 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -479,16 +479,16 @@ static ssize_t edt_ft5x06_setting_store(struct device *dev, } /* m06, m09: range 0-31, m12: range 0-5 */ -static EDT_ATTR(gain, S_IWUSR | S_IRUGO, WORK_REGISTER_GAIN, +static EDT_ATTR(gain, 0644, WORK_REGISTER_GAIN, M09_REGISTER_GAIN, 0, 31); /* m06, m09: range 0-31, m12: range 0-16 */ -static EDT_ATTR(offset, S_IWUSR | S_IRUGO, WORK_REGISTER_OFFSET, +static EDT_ATTR(offset, 0644, WORK_REGISTER_OFFSET, M09_REGISTER_OFFSET, 0, 31); /* m06: range 20 to 80, m09: range 0 to 30, m12: range 1 to 255... */ -static EDT_ATTR(threshold, S_IWUSR | S_IRUGO, WORK_REGISTER_THRESHOLD, +static EDT_ATTR(threshold, 0644, WORK_REGISTER_THRESHOLD, M09_REGISTER_THRESHOLD, 0, 255); /* m06: range 3 to 14, m12: (0x64: 100Hz) */ -static EDT_ATTR(report_rate, S_IWUSR | S_IRUGO, WORK_REGISTER_REPORT_RATE, +static EDT_ATTR(report_rate, 0644, WORK_REGISTER_REPORT_RATE, NO_REGISTER, 0, 255); static struct attribute *edt_ft5x06_attrs[] = { @@ -739,12 +739,12 @@ edt_ft5x06_ts_prepare_debugfs(struct edt_ft5x06_ts_data *tsdata, if (!tsdata->debug_dir) return; - debugfs_create_u16("num_x", S_IRUSR, tsdata->debug_dir, >num_x); - debugfs_create_u16("num_y", S_IRUSR, tsdata->debug_dir, >num_y); + debugfs_create_u16("num_x", 0400, tsdata->debug_dir, >num_x); + debugfs_create_u16("num_y", 0400, tsdata->debug_dir, >num_y); - debugfs_create_file("mode", S_IRUSR | S_IWUSR, + debugfs_create_file("mode", 0600, tsdata->debug_dir, tsdata, _mode_fops); - debugfs_create_file("raw_data", S_IRUSR, + debugfs_create_file("raw_data", 0400, tsdata->debug_dir, tsdata, _raw_data_fops); } -- 2.17.1
[PATCH 09/11] touchscreen: raydium_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/raydium_i2c_ts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index d1c09e6a2cb6..eddbb51e55dd 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -934,9 +934,9 @@ static ssize_t raydium_i2c_calibrate_store(struct device *dev, return error ?: count; } -static DEVICE_ATTR(fw_version, S_IRUGO, raydium_i2c_fw_ver_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, raydium_i2c_hw_ver_show, NULL); -static DEVICE_ATTR(boot_mode, S_IRUGO, raydium_i2c_boot_mode_show, NULL); +static DEVICE_ATTR(fw_version, 0444, raydium_i2c_fw_ver_show, NULL); +static DEVICE_ATTR(hw_version, 0444, raydium_i2c_hw_ver_show, NULL); +static DEVICE_ATTR(boot_mode, 0444, raydium_i2c_boot_mode_show, NULL); static DEVICE_ATTR(update_fw, S_IWUSR, NULL, raydium_i2c_update_fw_store); static DEVICE_ATTR(calibrate, S_IWUSR, NULL, raydium_i2c_calibrate_store); -- 2.17.1
[PATCH 11/11] touchscreen: tsc200x: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/tsc200x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c index e0fde590df8e..daefeca101ff 100644 --- a/drivers/input/touchscreen/tsc200x-core.c +++ b/drivers/input/touchscreen/tsc200x-core.c @@ -336,7 +336,7 @@ static ssize_t tsc200x_selftest_show(struct device *dev, return sprintf(buf, "%d\n", success); } -static DEVICE_ATTR(selftest, S_IRUGO, tsc200x_selftest_show, NULL); +static DEVICE_ATTR(selftest, 0444, tsc200x_selftest_show, NULL); static struct attribute *tsc200x_attrs[] = { _attr_selftest.attr, -- 2.17.1
[PATCH 10/11] touchscreen: sun4i_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/sun4i-ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index d2e14d9e5975..78960961a524 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -230,8 +230,8 @@ static ssize_t show_temp_label(struct device *dev, return sprintf(buf, "SoC temperature\n"); } -static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); -static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); +static DEVICE_ATTR(temp1_input, 0444, show_temp, NULL); +static DEVICE_ATTR(temp1_label, 0444, show_temp_label, NULL); static struct attribute *sun4i_ts_attrs[] = { _attr_temp1_input.attr, -- 2.17.1
[PATCH 10/11] touchscreen: sun4i_ts: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/sun4i-ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c index d2e14d9e5975..78960961a524 100644 --- a/drivers/input/touchscreen/sun4i-ts.c +++ b/drivers/input/touchscreen/sun4i-ts.c @@ -230,8 +230,8 @@ static ssize_t show_temp_label(struct device *dev, return sprintf(buf, "SoC temperature\n"); } -static DEVICE_ATTR(temp1_input, S_IRUGO, show_temp, NULL); -static DEVICE_ATTR(temp1_label, S_IRUGO, show_temp_label, NULL); +static DEVICE_ATTR(temp1_input, 0444, show_temp, NULL); +static DEVICE_ATTR(temp1_label, 0444, show_temp_label, NULL); static struct attribute *sun4i_ts_attrs[] = { _attr_temp1_input.attr, -- 2.17.1
[PATCH 04/11] touchscreen: amtel: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/atmel_mxt_ts.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 54fe190fd4bc..5202a8244f1d 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2892,10 +2892,10 @@ static ssize_t mxt_update_fw_store(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); -static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); +static DEVICE_ATTR(fw_version, 0444, mxt_fw_version_show, NULL); +static DEVICE_ATTR(hw_version, 0444, mxt_hw_version_show, NULL); +static DEVICE_ATTR(object, 0444, mxt_object_show, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, mxt_update_fw_store); static struct attribute *mxt_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 08/11] touchscreen: melfas: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/melfas_mip4.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c index 430a2bc5f7ca..f7fd940e61ea 100644 --- a/drivers/input/touchscreen/melfas_mip4.c +++ b/drivers/input/touchscreen/melfas_mip4.c @@ -1332,7 +1332,7 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev, return count; } -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); +static DEVICE_ATTR(update_fw, 0200, NULL, mip4_sysfs_fw_update); static ssize_t mip4_sysfs_read_fw_version(struct device *dev, struct device_attribute *attr, @@ -1354,7 +1354,7 @@ static ssize_t mip4_sysfs_read_fw_version(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); +static DEVICE_ATTR(fw_version, 0444, mip4_sysfs_read_fw_version, NULL); static ssize_t mip4_sysfs_read_hw_version(struct device *dev, struct device_attribute *attr, @@ -1379,7 +1379,7 @@ static ssize_t mip4_sysfs_read_hw_version(struct device *dev, return count; } -static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); +static DEVICE_ATTR(hw_version, 0444, mip4_sysfs_read_hw_version, NULL); static ssize_t mip4_sysfs_read_product_id(struct device *dev, struct device_attribute *attr, @@ -1398,7 +1398,7 @@ static ssize_t mip4_sysfs_read_product_id(struct device *dev, return count; } -static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); +static DEVICE_ATTR(product_id, 0444, mip4_sysfs_read_product_id, NULL); static ssize_t mip4_sysfs_read_ic_name(struct device *dev, struct device_attribute *attr, @@ -1418,7 +1418,7 @@ static ssize_t mip4_sysfs_read_ic_name(struct device *dev, return count; } -static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); +static DEVICE_ATTR(ic_name, 0444, mip4_sysfs_read_ic_name, NULL); static struct attribute *mip4_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 05/11] touchscreen: elants: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw) WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. + .dattr = __ATTR(_field, S_IRUGO,\ Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/elants_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index d21ca39b0fdb..9717b7c3bb6f 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1000,8 +1000,8 @@ static ssize_t show_iap_mode(struct device *dev, } static DEVICE_ATTR_WO(calibrate); -static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw); +static DEVICE_ATTR(iap_mode, 0444, show_iap_mode, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, write_update_fw); struct elants_version_attribute { struct device_attribute dattr; @@ -1016,7 +1016,7 @@ struct elants_version_attribute { __ELANTS_FIELD_SIZE(_field)) #define ELANTS_VERSION_ATTR(_field)\ struct elants_version_attribute elants_ver_attr_##_field = {\ - .dattr = __ATTR(_field, S_IRUGO,\ + .dattr = __ATTR(_field, 0444, \ elants_version_attribute_show, NULL), \ .field_offset = offsetof(struct elants_data, _field), \ .field_size = __ELANTS_VERIFY_SIZE(_field), \ -- 2.17.1
[PATCH 03/11] touchscreen: ad7846: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index a2f45aefce08..7c07de0802de 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", adjust(ts, v)); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); /* Sysfs conventions report temperatures in millidegrees Celsius. @@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev, return sprintf(buf, "%u\n", ts->pendown); } -static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); +static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL); static ssize_t ads7846_disable_show(struct device *dev, struct device_attribute *attr, char *buf) -- 2.17.1
[PATCH 06/11] touchscreen: ili210x: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ili210x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c index 6f76eeedf465..07526a6f2cb7 100644 --- a/drivers/input/touchscreen/ili210x.c +++ b/drivers/input/touchscreen/ili210x.c @@ -169,7 +169,7 @@ static ssize_t ili210x_calibrate(struct device *dev, return count; } -static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); +static DEVICE_ATTR(calibrate, 0200, NULL, ili210x_calibrate); static struct attribute *ili210x_attributes[] = { _attr_calibrate.attr, -- 2.17.1
[PATCH 02/11] touchscreen: ad7877: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ad7877.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 5cfe477ec992..4b4a9d84195e 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -461,7 +461,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", (unsigned) v); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); SHOW(aux1) SHOW(aux2) -- 2.17.1
[PATCH 07/11] touchscreen: mc13783: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'. +module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/mc13783_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index ef64f36c5ffc..4e33349f101e 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c @@ -25,9 +25,9 @@ #define DEFAULT_SAMPLE_TOLERANCE 300 static unsigned int sample_tolerance = DEFAULT_SAMPLE_TOLERANCE; -module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); +module_param(sample_tolerance, uint, 0644); MODULE_PARM_DESC(sample_tolerance, - "If the minimal and maximal value read out for one axis (out " + "If the minimal and maximum value read out for one axis (out " "of three) differ by this value (default: " __stringify(DEFAULT_SAMPLE_TOLERANCE) ") or more, the reading " "is supposed to be wrong and is discarded. Set to 0 to " -- 2.17.1
[PATCH 04/11] touchscreen: amtel: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/atmel_mxt_ts.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 54fe190fd4bc..5202a8244f1d 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -2892,10 +2892,10 @@ static ssize_t mxt_update_fw_store(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mxt_fw_version_show, NULL); -static DEVICE_ATTR(hw_version, S_IRUGO, mxt_hw_version_show, NULL); -static DEVICE_ATTR(object, S_IRUGO, mxt_object_show, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mxt_update_fw_store); +static DEVICE_ATTR(fw_version, 0444, mxt_fw_version_show, NULL); +static DEVICE_ATTR(hw_version, 0444, mxt_hw_version_show, NULL); +static DEVICE_ATTR(object, 0444, mxt_object_show, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, mxt_update_fw_store); static struct attribute *mxt_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 08/11] touchscreen: melfas: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/melfas_mip4.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c index 430a2bc5f7ca..f7fd940e61ea 100644 --- a/drivers/input/touchscreen/melfas_mip4.c +++ b/drivers/input/touchscreen/melfas_mip4.c @@ -1332,7 +1332,7 @@ static ssize_t mip4_sysfs_fw_update(struct device *dev, return count; } -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, mip4_sysfs_fw_update); +static DEVICE_ATTR(update_fw, 0200, NULL, mip4_sysfs_fw_update); static ssize_t mip4_sysfs_read_fw_version(struct device *dev, struct device_attribute *attr, @@ -1354,7 +1354,7 @@ static ssize_t mip4_sysfs_read_fw_version(struct device *dev, return count; } -static DEVICE_ATTR(fw_version, S_IRUGO, mip4_sysfs_read_fw_version, NULL); +static DEVICE_ATTR(fw_version, 0444, mip4_sysfs_read_fw_version, NULL); static ssize_t mip4_sysfs_read_hw_version(struct device *dev, struct device_attribute *attr, @@ -1379,7 +1379,7 @@ static ssize_t mip4_sysfs_read_hw_version(struct device *dev, return count; } -static DEVICE_ATTR(hw_version, S_IRUGO, mip4_sysfs_read_hw_version, NULL); +static DEVICE_ATTR(hw_version, 0444, mip4_sysfs_read_hw_version, NULL); static ssize_t mip4_sysfs_read_product_id(struct device *dev, struct device_attribute *attr, @@ -1398,7 +1398,7 @@ static ssize_t mip4_sysfs_read_product_id(struct device *dev, return count; } -static DEVICE_ATTR(product_id, S_IRUGO, mip4_sysfs_read_product_id, NULL); +static DEVICE_ATTR(product_id, 0444, mip4_sysfs_read_product_id, NULL); static ssize_t mip4_sysfs_read_ic_name(struct device *dev, struct device_attribute *attr, @@ -1418,7 +1418,7 @@ static ssize_t mip4_sysfs_read_ic_name(struct device *dev, return count; } -static DEVICE_ATTR(ic_name, S_IRUGO, mip4_sysfs_read_ic_name, NULL); +static DEVICE_ATTR(ic_name, 0444, mip4_sysfs_read_ic_name, NULL); static struct attribute *mip4_attrs[] = { _attr_fw_version.attr, -- 2.17.1
[PATCH 05/11] touchscreen: elants: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw) WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. + .dattr = __ATTR(_field, S_IRUGO,\ Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/elants_i2c.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index d21ca39b0fdb..9717b7c3bb6f 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1000,8 +1000,8 @@ static ssize_t show_iap_mode(struct device *dev, } static DEVICE_ATTR_WO(calibrate); -static DEVICE_ATTR(iap_mode, S_IRUGO, show_iap_mode, NULL); -static DEVICE_ATTR(update_fw, S_IWUSR, NULL, write_update_fw); +static DEVICE_ATTR(iap_mode, 0444, show_iap_mode, NULL); +static DEVICE_ATTR(update_fw, 0200, NULL, write_update_fw); struct elants_version_attribute { struct device_attribute dattr; @@ -1016,7 +1016,7 @@ struct elants_version_attribute { __ELANTS_FIELD_SIZE(_field)) #define ELANTS_VERSION_ATTR(_field)\ struct elants_version_attribute elants_ver_attr_##_field = {\ - .dattr = __ATTR(_field, S_IRUGO,\ + .dattr = __ATTR(_field, 0444, \ elants_version_attribute_show, NULL), \ .field_offset = offsetof(struct elants_data, _field), \ .field_size = __ELANTS_VERIFY_SIZE(_field), \ -- 2.17.1
[PATCH 03/11] touchscreen: ad7846: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index a2f45aefce08..7c07de0802de 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", adjust(ts, v)); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); /* Sysfs conventions report temperatures in millidegrees Celsius. @@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev, return sprintf(buf, "%u\n", ts->pendown); } -static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); +static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL); static ssize_t ads7846_disable_show(struct device *dev, struct device_attribute *attr, char *buf) -- 2.17.1
[PATCH 06/11] touchscreen: ili210x: Use octal permissions
WARNING: Symbolic permissions 'S_IWUSR' are not preferred. Consider using octal permissions '0200'. +static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ili210x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c index 6f76eeedf465..07526a6f2cb7 100644 --- a/drivers/input/touchscreen/ili210x.c +++ b/drivers/input/touchscreen/ili210x.c @@ -169,7 +169,7 @@ static ssize_t ili210x_calibrate(struct device *dev, return count; } -static DEVICE_ATTR(calibrate, S_IWUSR, NULL, ili210x_calibrate); +static DEVICE_ATTR(calibrate, 0200, NULL, ili210x_calibrate); static struct attribute *ili210x_attributes[] = { _attr_calibrate.attr, -- 2.17.1
[PATCH 02/11] touchscreen: ad7877: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ad7877.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 5cfe477ec992..4b4a9d84195e 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -461,7 +461,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", (unsigned) v); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); SHOW(aux1) SHOW(aux2) -- 2.17.1
[PATCH 07/11] touchscreen: mc13783: Use octal permissions
WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'. +module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/mc13783_ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/mc13783_ts.c b/drivers/input/touchscreen/mc13783_ts.c index ef64f36c5ffc..4e33349f101e 100644 --- a/drivers/input/touchscreen/mc13783_ts.c +++ b/drivers/input/touchscreen/mc13783_ts.c @@ -25,9 +25,9 @@ #define DEFAULT_SAMPLE_TOLERANCE 300 static unsigned int sample_tolerance = DEFAULT_SAMPLE_TOLERANCE; -module_param(sample_tolerance, uint, S_IRUGO | S_IWUSR); +module_param(sample_tolerance, uint, 0644); MODULE_PARM_DESC(sample_tolerance, - "If the minimal and maximal value read out for one axis (out " + "If the minimal and maximum value read out for one axis (out " "of three) differ by this value (default: " __stringify(DEFAULT_SAMPLE_TOLERANCE) ") or more, the reading " "is supposed to be wrong and is discarded. Set to 0 to " -- 2.17.1