Loading drivers/usb/gadget/function/f_ipc.c +25 −19 Original line number Diff line number Diff line Loading @@ -671,7 +671,11 @@ static ssize_t debug_read_stats(struct file *file, char __user *ubuf, int temp = 0; unsigned long flags; if (ipc_dev) { if (!ipc_dev || !ipc_dev->in || !ipc_dev->out) { pr_err("ipc_dev instance, or EPs not yet initialised\n"); return 0; } spin_lock_irqsave(&ipc_dev->lock, flags); temp += scnprintf(buf + temp, PAGE_SIZE - temp, "endpoints: %s, %s\n" Loading @@ -685,7 +689,6 @@ static ssize_t debug_read_stats(struct file *file, char __user *ubuf, ipc_dev->pending_writes, ipc_dev->pending_reads); spin_unlock_irqrestore(&ipc_dev->lock, flags); } return simple_read_from_buffer(ubuf, count, ppos, buf, temp); } Loading @@ -695,12 +698,15 @@ static ssize_t debug_reset_stats(struct file *file, const char __user *buf, { unsigned long flags; if (ipc_dev) { if (!ipc_dev) { pr_err("ipc_dev instance not yet initialised\n"); return count; } spin_lock_irqsave(&ipc_dev->lock, flags); ipc_dev->bytes_to_host = 0; ipc_dev->bytes_to_mdm = 0; spin_unlock_irqrestore(&ipc_dev->lock, flags); } return count; } Loading Loading
drivers/usb/gadget/function/f_ipc.c +25 −19 Original line number Diff line number Diff line Loading @@ -671,7 +671,11 @@ static ssize_t debug_read_stats(struct file *file, char __user *ubuf, int temp = 0; unsigned long flags; if (ipc_dev) { if (!ipc_dev || !ipc_dev->in || !ipc_dev->out) { pr_err("ipc_dev instance, or EPs not yet initialised\n"); return 0; } spin_lock_irqsave(&ipc_dev->lock, flags); temp += scnprintf(buf + temp, PAGE_SIZE - temp, "endpoints: %s, %s\n" Loading @@ -685,7 +689,6 @@ static ssize_t debug_read_stats(struct file *file, char __user *ubuf, ipc_dev->pending_writes, ipc_dev->pending_reads); spin_unlock_irqrestore(&ipc_dev->lock, flags); } return simple_read_from_buffer(ubuf, count, ppos, buf, temp); } Loading @@ -695,12 +698,15 @@ static ssize_t debug_reset_stats(struct file *file, const char __user *buf, { unsigned long flags; if (ipc_dev) { if (!ipc_dev) { pr_err("ipc_dev instance not yet initialised\n"); return count; } spin_lock_irqsave(&ipc_dev->lock, flags); ipc_dev->bytes_to_host = 0; ipc_dev->bytes_to_mdm = 0; spin_unlock_irqrestore(&ipc_dev->lock, flags); } return count; } Loading