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

Commit 1fc901db authored by Elson Roy Serrao's avatar Elson Roy Serrao
Browse files

usb: gsi: Mask the read/write apis for dpl_ctrl node



DPL daemon from userspace is writing control message
to dpl_ctrl node. But since the notify_req for DPL
is not supported in the driver it is resulting in a
crash. Mask the read/write api's for dpl_ctrl node
to fix this.

Change-Id: I2dc67bee0f83107b90e8754a3d10b2e128ce3937
Signed-off-by: default avatarElson Roy Serrao <eserrao@codeaurora.org>
parent 3a9eb4f4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1258,6 +1258,9 @@ gsi_ctrl_dev_read(struct file *fp, char __user *buf, size_t count, loff_t *pos)
	unsigned long flags;
	int ret = 0;

	if (prot_id == IPA_USB_DIAG)
		return -EINVAL;

	pr_debug("%s: Enter %zu", __func__, count);

	mutex_lock(&inst_cur->gsi_lock);
@@ -1344,6 +1347,9 @@ static ssize_t gsi_ctrl_dev_write(struct file *fp, const char __user *buf,
	struct gsi_inst_status *inst_cur = &inst_status[prot_id];
	struct f_gsi *gsi;

	if (prot_id == IPA_USB_DIAG)
		return -EINVAL;

	pr_debug("Enter %zu", count);

	mutex_lock(&inst_cur->gsi_lock);