From: hang cheng Date: Mon, 7 Jun 2021 11:20:36 +0000 (+0800) Subject: cec: fix complie issue [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9bc085a56e79329a20e72fccbe3cf6ed9db59ca;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git cec: fix complie issue [1/1] 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 --- diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index 2d10717db4da..0536cf3546e7 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)