aboutsummaryrefslogtreecommitdiff
path: root/drivers/platform/msm/sps/sps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/msm/sps/sps.c')
-rw-r--r--drivers/platform/msm/sps/sps.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/platform/msm/sps/sps.c b/drivers/platform/msm/sps/sps.c
index be4a757d61b4..fdcc1ea6dc51 100644
--- a/drivers/platform/msm/sps/sps.c
+++ b/drivers/platform/msm/sps/sps.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2011-2013, 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
@@ -98,7 +98,6 @@ static char *debugfs_buf;
static u32 debugfs_buf_size;
static u32 debugfs_buf_used;
static int wraparound;
-static struct mutex sps_debugfs_lock;
struct dentry *dent;
struct dentry *dfile_info;
@@ -116,7 +115,6 @@ static struct sps_bam *phy2bam(phys_addr_t phys_addr);
/* record debug info for debugfs */
void sps_debugfs_record(const char *msg)
{
- mutex_lock(&sps_debugfs_lock);
if (debugfs_record_enabled) {
if (debugfs_buf_used + MAX_MSG_LEN >= debugfs_buf_size) {
debugfs_buf_used = 0;
@@ -130,7 +128,6 @@ void sps_debugfs_record(const char *msg)
debugfs_buf_size - debugfs_buf_used,
"\n**** end line of sps log ****\n\n");
}
- mutex_unlock(&sps_debugfs_lock);
}
/* read the recorded debug info to userspace */
@@ -140,7 +137,6 @@ static ssize_t sps_read_info(struct file *file, char __user *ubuf,
int ret = 0;
int size;
- mutex_lock(&sps_debugfs_lock);
if (debugfs_record_enabled) {
if (wraparound)
size = debugfs_buf_size - MAX_MSG_LEN;
@@ -150,7 +146,6 @@ static ssize_t sps_read_info(struct file *file, char __user *ubuf,
ret = simple_read_from_buffer(ubuf, count, ppos,
debugfs_buf, size);
}
- mutex_unlock(&sps_debugfs_lock);
return ret;
}
@@ -195,13 +190,11 @@ static ssize_t sps_set_info(struct file *file, const char __user *buf,
new_buf_size = buf_size_kb * SZ_1K;
- mutex_lock(&sps_debugfs_lock);
if (debugfs_record_enabled) {
if (debugfs_buf_size == new_buf_size) {
/* need do nothing */
pr_info("sps:debugfs: input buffer size "
"is the same as before.\n");
- mutex_unlock(&sps_debugfs_lock);
return count;
} else {
/* release the current buffer */
@@ -221,14 +214,12 @@ static ssize_t sps_set_info(struct file *file, const char __user *buf,
if (!debugfs_buf) {
debugfs_buf_size = 0;
pr_err("sps:fail to allocate memory for debug_fs.\n");
- mutex_unlock(&sps_debugfs_lock);
return -ENOMEM;
}
debugfs_buf_used = 0;
wraparound = false;
debugfs_record_enabled = true;
- mutex_unlock(&sps_debugfs_lock);
return count;
}
@@ -276,7 +267,6 @@ static ssize_t sps_set_logging_option(struct file *file, const char __user *buf,
return count;
}
- mutex_lock(&sps_debugfs_lock);
if (((option == 0) || (option == 2)) &&
((logging_option == 1) || (logging_option == 3))) {
debugfs_record_enabled = false;
@@ -288,7 +278,6 @@ static ssize_t sps_set_logging_option(struct file *file, const char __user *buf,
}
logging_option = option;
- mutex_unlock(&sps_debugfs_lock);
return count;
}
@@ -615,8 +604,6 @@ static void sps_debugfs_init(void)
goto bam_addr_err;
}
- mutex_init(&sps_debugfs_lock);
-
return;
bam_addr_err: