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

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

Merge "msm: ipa: fix IPC low priority logging" into msm-4.9

parents 7a1f4613 48c8362a
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ static char dbg_buff[IPA_MAX_MSG_LEN];
static char *active_clients_buf;

static s8 ep_reg_idx;
static void *ipa_ipc_low_buff;


static ssize_t ipa3_read_gen_reg(struct file *file, char __user *ubuf,
@@ -1758,22 +1759,20 @@ static ssize_t ipa3_enable_ipc_low(struct file *file,
	if (kstrtos8(dbg_buff, 0, &option))
		return -EFAULT;

	mutex_lock(&ipa3_ctx->lock);
	if (option) {
		if (!ipa3_ctx->logbuf_low) {
			ipa3_ctx->logbuf_low =
		if (!ipa_ipc_low_buff) {
			ipa_ipc_low_buff =
				ipc_log_context_create(IPA_IPC_LOG_PAGES,
					"ipa_low", 0);
		}

		if (ipa3_ctx->logbuf_low == NULL) {
			if (ipa_ipc_low_buff == NULL)
				IPAERR("failed to get logbuf_low\n");
			return -EFAULT;
		}
		ipa3_ctx->logbuf_low = ipa_ipc_low_buff;
	} else {
		if (ipa3_ctx->logbuf_low)
			ipc_log_context_destroy(ipa3_ctx->logbuf_low);
		ipa3_ctx->logbuf_low = NULL;
	}
	mutex_unlock(&ipa3_ctx->lock);

	return count;
}