summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Samuelov <amirs@codeaurora.org>2016-08-16 15:00:32 +0300
committerGerrit - the friendly Code Review server <code-review@localhost>2016-08-16 05:08:02 -0700
commit1b18025150035b7a193dbb6fe03b95a64643f12c (patch)
tree5c3a4ef2fa1dd123b85f86d20535f8d38b9aaff7
parent2e45ea728118fa88ba245a0a755d0a3844d9f54e (diff)
spcom: avoid false error message on spcom_device_release()
Typically, spcom device nodes are associated with a glink channel. However, /dev/spcom and /dev/sp_ssr have other purposes, and they are not associated with a channel. Avoid error message when user call file close() for /dev/spcom and /dev/sp_ssr. Change-Id: I5dd55ad3c7ff93efb2e332fcab49b58cbc177c90 Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
-rw-r--r--drivers/soc/qcom/spcom.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/soc/qcom/spcom.c b/drivers/soc/qcom/spcom.c
index 45af4b601634..30eff96fc27d 100644
--- a/drivers/soc/qcom/spcom.c
+++ b/drivers/soc/qcom/spcom.c
@@ -1920,10 +1920,20 @@ static int spcom_device_release(struct inode *inode, struct file *filp)
pr_debug("Close file [%s].\n", name);
+ if (strcmp(name, DEVICE_NAME) == 0) {
+ pr_debug("root dir skipped.\n");
+ return 0;
+ }
+
+ if (strcmp(name, "sp_ssr") == 0) {
+ pr_debug("sp_ssr dev node skipped.\n");
+ return 0;
+ }
+
ch = filp->private_data;
if (!ch) {
- pr_err("ch is NULL, file name %s.\n", file_to_filename(filp));
+ pr_debug("ch is NULL, file name %s.\n", file_to_filename(filp));
return -ENODEV;
}