cec: fix complie issue [1/1]
authorhang cheng <hang.cheng@amlogic.com>
Mon, 7 Jun 2021 11:20:36 +0000 (19:20 +0800)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 21 Dec 2021 18:33:55 +0000 (13:33 -0500)
PD#SWPL-52256

Problem:
CONFIG_AMLOGIC_HDMITX macro is not defined on
TV platform, cause complie issue

Solution:
fix complie issue

Verify:
am301

Change-Id: Ib9bcfe3d613f8affe2469adcce4383b315eee3fc
Signed-off-by: hang cheng <hang.cheng@amlogic.com>
drivers/amlogic/cec/hdmi_ao_cec.c

index 2d10717db4dadf736665174fa72cd9df247b8f88..0536cf3546e76f4cba2d57144dddc5b8d74fa0a5 100644 (file)
@@ -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)