summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-08-18 12:04:17 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-18 12:04:17 -0700
commit5c8a1efc3abc4937c3fd2883d2878e827caa7073 (patch)
tree950dd741f8e9746ab2e9dc4d4c380d24cc36cf3e /drivers/platform
parent506ab3cee1829b9920b84faf4a5c717d4cc6cbae (diff)
parent56b66ab23142ddb7ded71490b2c97cb1fd00b7ac (diff)
Merge "msm: sps: Change the default SPS IPC log level"
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/msm/sps/sps.c7
-rw-r--r--drivers/platform/msm/sps/spsi.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/platform/msm/sps/sps.c b/drivers/platform/msm/sps/sps.c
index e9b0945f0782..eab0e47e7cd2 100644
--- a/drivers/platform/msm/sps/sps.c
+++ b/drivers/platform/msm/sps/sps.c
@@ -289,7 +289,8 @@ 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;
- bam->ipc_loglevel = log_level_sel;
+ if (log_level_sel <= SPS_IPC_MAX_LOGLEVEL)
+ bam->ipc_loglevel = log_level_sel;
}
switch (reg_dump_option) {
@@ -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);
diff --git a/drivers/platform/msm/sps/spsi.h b/drivers/platform/msm/sps/spsi.h
index e09d3cda1d31..1b4ca69bee16 100644
--- a/drivers/platform/msm/sps/spsi.h
+++ b/drivers/platform/msm/sps/spsi.h
@@ -1,4 +1,4 @@
-/* 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 {