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

Commit 5323dcab authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

msm: sps: Change the default SPS IPC log level



Set the default IPC logging level to minimal logging in
case client driver does not specify ipc logging level.

Change-Id: I83174225b4eb7ae72cb16bc8f6dcf9659bc1342e
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 8eefef21
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -289,6 +289,7 @@ static ssize_t sps_set_bam_addr(struct file *file, const char __user *buf,
	} else {
		vir_addr = &bam->base;
		num_pipes = bam->props.num_pipes;
		if (log_level_sel <= SPS_IPC_MAX_LOGLEVEL)
			bam->ipc_loglevel = log_level_sel;
	}

@@ -500,7 +501,7 @@ static void sps_debugfs_init(void)
	debugfs_buf_size = 0;
	debugfs_buf_used = 0;
	wraparound = false;
	log_level_sel = 0;
	log_level_sel = SPS_IPC_MAX_LOGLEVEL + 1;

	dent = debugfs_create_dir("sps", 0);
	if (IS_ERR(dent)) {
@@ -2207,6 +2208,8 @@ int sps_register_bam_device(const struct sps_bam_props *bam_props,

	if (bam_props->ipc_loglevel)
		bam->ipc_loglevel = bam_props->ipc_loglevel;
	else
		bam->ipc_loglevel = SPS_IPC_DEFAULT_LOGLEVEL;

	ok = sps_bam_device_init(bam);
	mutex_unlock(&bam->lock);
+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -52,6 +52,8 @@
#define MAX_MSG_LEN 80
#define SPS_IPC_LOGPAGES 10
#define SPS_IPC_REG_DUMP_FACTOR 3
#define SPS_IPC_DEFAULT_LOGLEVEL 3
#define SPS_IPC_MAX_LOGLEVEL 4

/* Connection mapping control struct */
struct sps_rm {