Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32c0e9a7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: synaptics_dsx_2.6: correct sysfs permissions"

parents 05016a34 109cf151
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -610,23 +610,23 @@ static struct synaptics_rmi4_exp_fn_data exp_data;
static struct synaptics_dsx_button_map *vir_button_map;

static struct device_attribute attrs[] = {
	__ATTR(reset, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(reset, S_IWUSR | S_IWGRP,
			NULL,
			synaptics_rmi4_f01_reset_store),
	__ATTR(productinfo, S_IRUGO,
			synaptics_rmi4_f01_productinfo_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(buildid, S_IRUGO,
			synaptics_rmi4_f01_buildid_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(flashprog, S_IRUGO,
			synaptics_rmi4_f01_flashprog_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(0dbutton, (S_IRUGO | S_IWUSR | S_IWGRP),
			synaptics_rmi4_0dbutton_show,
			synaptics_rmi4_0dbutton_store),
	__ATTR(suspend, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(suspend, S_IWUSR | S_IWGRP,
			NULL,
			synaptics_rmi4_suspend_store),
	__ATTR(wake_gesture, (S_IRUGO | S_IWUSR | S_IWGRP),
			synaptics_rmi4_wake_gesture_show,
+0 −16
Original line number Diff line number Diff line
@@ -464,22 +464,6 @@ static inline void synaptics_rmi4_bus_put(struct synaptics_rmi4_data *rmi4_data)
}
#endif

static inline ssize_t synaptics_rmi4_show_error(struct device *dev,
		struct device_attribute *attr, char *buf)
{
	dev_warn(dev, "%s Attempted to read from write-only attribute %s\n",
			__func__, attr->attr.name);
	return -EPERM;
}

static inline ssize_t synaptics_rmi4_store_error(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t count)
{
	dev_warn(dev, "%s Attempted to write to read-only attribute %s\n",
			__func__, attr->attr.name);
	return -EPERM;
}

static inline int secure_memcpy(unsigned char *dest, unsigned int dest_size,
		const unsigned char *src, unsigned int src_size,
		unsigned int count)
+23 −23
Original line number Diff line number Diff line
@@ -661,50 +661,50 @@ static struct bin_attribute dev_attr_data = {
};

static struct device_attribute attrs[] = {
	__ATTR(dorecovery, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(dorecovery, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_do_recovery_store),
	__ATTR(doreflash, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(doreflash, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_do_reflash_store),
	__ATTR(writeconfig, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(writeconfig, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_write_config_store),
	__ATTR(readconfig, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(readconfig, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_read_config_store),
	__ATTR(configarea, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(configarea, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_config_area_store),
	__ATTR(imagename, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(imagename, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_image_name_store),
	__ATTR(imagesize, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(imagesize, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_image_size_store),
	__ATTR(blocksize, S_IRUGO,
			fwu_sysfs_block_size_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(fwblockcount, S_IRUGO,
			fwu_sysfs_firmware_block_count_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(configblockcount, S_IRUGO,
			fwu_sysfs_configuration_block_count_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(dispconfigblockcount, S_IRUGO,
			fwu_sysfs_disp_config_block_count_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(permconfigblockcount, S_IRUGO,
			fwu_sysfs_perm_config_block_count_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(blconfigblockcount, S_IRUGO,
			fwu_sysfs_bl_config_block_count_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(guestcodeblockcount, S_IRUGO,
			fwu_sysfs_guest_code_block_count_show,
			synaptics_rmi4_store_error),
	__ATTR(writeguestcode, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
			NULL),
	__ATTR(writeguestcode, S_IWUSR | S_IWGRP,
			NULL,
			fwu_sysfs_write_guest_code_store),
};

+13 −13
Original line number Diff line number Diff line
@@ -389,47 +389,47 @@ struct synaptics_rmi4_udg_handle {

static struct device_attribute attrs[] = {
	__ATTR(engine_enable, S_IWUGO,
			synaptics_rmi4_show_error,
			NULL,
			udg_sysfs_engine_enable_store),
	__ATTR(detection_enable, S_IWUGO,
			synaptics_rmi4_show_error,
			NULL,
			udg_sysfs_detection_enable_store),
	__ATTR(detection_score, S_IRUGO,
			udg_sysfs_detection_score_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(detection_index, S_IRUGO,
			udg_sysfs_detection_index_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(registration_enable, S_IWUGO,
			synaptics_rmi4_show_error,
			NULL,
			udg_sysfs_registration_enable_store),
	__ATTR(registration_begin, S_IWUGO,
			synaptics_rmi4_show_error,
			NULL,
			udg_sysfs_registration_begin_store),
	__ATTR(registration_status, S_IRUGO,
			udg_sysfs_registration_status_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(template_size, S_IRUGO,
			udg_sysfs_template_size_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(template_max_index, S_IRUGO,
			udg_sysfs_template_max_index_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(template_detection, S_IRUGO,
			udg_sysfs_template_detection_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(template_index, S_IWUGO,
			synaptics_rmi4_show_error,
			NULL,
			udg_sysfs_template_index_store),
	__ATTR(template_valid, (S_IRUGO | S_IWUGO),
			udg_sysfs_template_valid_show,
			udg_sysfs_template_valid_store),
	__ATTR(template_clear, S_IWUGO,
			synaptics_rmi4_show_error,
			NULL,
			udg_sysfs_template_clear_store),
	__ATTR(trace_size, S_IRUGO,
			udg_sysfs_trace_size_show,
			synaptics_rmi4_store_error),
			NULL),
};

static struct bin_attribute template_data = {
+7 −7
Original line number Diff line number Diff line
@@ -126,20 +126,20 @@ static struct bin_attribute attr_data = {
};

static struct device_attribute attrs[] = {
	__ATTR(open, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(open, S_IWUSR | S_IWGRP,
			NULL,
			rmidev_sysfs_open_store),
	__ATTR(release, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(release, S_IWUSR | S_IWGRP,
			NULL,
			rmidev_sysfs_release_store),
	__ATTR(attn_state, S_IRUGO,
			rmidev_sysfs_attn_state_show,
			synaptics_rmi4_store_error),
			NULL),
	__ATTR(pid, S_IRUGO | S_IRUGO | S_IWUSR | S_IWGRP,
			rmidev_sysfs_pid_show,
			rmidev_sysfs_pid_store),
	__ATTR(term, S_IRUGO | S_IWUSR | S_IWGRP,
			synaptics_rmi4_show_error,
	__ATTR(term, S_IWUSR | S_IWGRP,
			NULL,
			rmidev_sysfs_term_store),
	__ATTR(intr_mask, S_IRUGO,
			rmidev_sysfs_intr_mask_show,
Loading