From 33af82c1f52c4d11681555a4a078fe54e35f0217 Mon Sep 17 00:00:00 2001 From: Amir Samuelov Date: Sun, 21 May 2017 14:00:09 +0300 Subject: [PATCH] spcom: silent error messages until spss link is up After spss reset (a.k.a SSR) the spdaemon tries to open spcom char dev. Avoid flooding the kernel log with error messages until the spss link is up. Change-Id: I7abd37f50fa4c172e07c8551c287b6ccf0511a44 Signed-off-by: Amir Samuelov --- drivers/soc/qcom/spcom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/qcom/spcom.c b/drivers/soc/qcom/spcom.c index c2af34926b37..20cb426187fc 100644 --- a/drivers/soc/qcom/spcom.c +++ b/drivers/soc/qcom/spcom.c @@ -2152,6 +2152,10 @@ static int spcom_device_open(struct inode *inode, struct file *filp) struct spcom_channel *ch; const char *name = file_to_filename(filp); + /* silent error message until spss link is up */ + if (!spcom_is_sp_subsystem_link_up()) + return -ENODEV; + pr_debug("Open file [%s].\n", name); if (strcmp(name, DEVICE_NAME) == 0) {