diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c
index 2d10717db4dadf736665174fa72cd9df247b8f88..0536cf3546e76f4cba2d57144dddc5b8d74fa0a5 100644
--- a/drivers/amlogic/cec/hdmi_ao_cec.c
+++ b/drivers/amlogic/cec/hdmi_ao_cec.c
@@ -279,11 +279,13 @@ static struct cec_uevent cec_events[] = {
 	}
 };
 
+#ifdef CONFIG_AMLOGIC_HDMITX
 static int hdmitx_notify_callback(struct notifier_block *block,
 				  unsigned long cmd, void *para);
 static struct notifier_block hdmitx_notifier_nb = {
 	.notifier_call	= hdmitx_notify_callback
 };
+#endif
 
 unsigned int waiting_aocec_free(unsigned int r)
 {
@@ -4021,20 +4023,19 @@ static void cec_rx_uevent_handler(struct work_struct *work)
 	cec_set_uevent(CEC_RX_MSG, 0);
 }
 
+#ifdef CONFIG_AMLOGIC_HDMITX
 static int hdmitx_notify_callback(struct notifier_block *block,
 				  unsigned long cmd, void *para)
 {
 	int ret = 0;
 
 	switch (cmd) {
-#ifdef CONFIG_AMLOGIC_HDMITX
 	case HDMITX_PLUG:
 	case HDMITX_UNPLUG:
 		CEC_INFO("[%s] event: %ld\n", __func__, cmd);
 		queue_delayed_work(cec_dev->hdmi_plug_wq,
 				   &cec_dev->work_hdmi_plug, 0);
 		break;
-#endif
 	default:
 		CEC_ERR("[%s] unsupported notify:%ld\n", __func__, cmd);
 		ret = -EINVAL;
@@ -4042,6 +4043,7 @@ static int hdmitx_notify_callback(struct notifier_block *block,
 	}
 	return ret;
 }
+#endif
 
 #ifdef CONFIG_AMLOGIC_MEDIA_TVIN_HDMI
 static int hdmirx_notify_callback(unsigned int pwr5v_sts)