From 16c23afb742c6aa59fe8a9361cb5bda08ecfcba2 Mon Sep 17 00:00:00 2001 From: Hang Cheng Date: Mon, 25 Mar 2019 19:05:54 +0800 Subject: [PATCH] cec: remove func that may cause deadlock [1/1] PD#SWPL-5836 Problem: kernel panic when read cec reg Solution: remove func that might cause sleep in spinlock, so as to avoid deadlock Verify: S805X-P241 Change-Id: I8394f69bdbeff6673c795a221c08ef76164c5bdb Signed-off-by: Hang Cheng Signed-off-by: Luan Yuan --- drivers/amlogic/cec/hdmi_ao_cec.c | 5 ----- drivers/amlogic/cec/hdmi_ao_cec.h | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index 24d6fd2dc3ac..f797e98a4030 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -221,15 +221,10 @@ unsigned int waiting_aocec_free(unsigned int r) { unsigned int cnt = 0; int ret = true; - char *s; while (readl(cec_dev->cec_reg + r) & (1<<23)) { if (cnt++ >= 3500) { pr_info("waiting aocec %x free time out %d\n", r, cnt); - s = kmalloc(2048, GFP_KERNEL); - dump_cecrx_reg(s); - CEC_ERR("%s\n", s); - kfree(s); if (cec_dev->proble_finish) cec_hw_reset(CEC_A); ret = false; diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index a7357421e06a..1154770fe645 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -19,7 +19,7 @@ #define __AO_CEC_H__ -#define CEC_DRIVER_VERSION "Ver 2019/3/23\n" +#define CEC_DRIVER_VERSION "Ver 2019/3/25\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec"