aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/Makefile
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2021-02-26 11:37:47 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-11 11:40:28 +0100
commitf09f9f93afad770a04b35235a0aa465fcc8d6e3d (patch)
tree8ede8f189b650e40d7a44810976a841ea69c6988 /drivers/media/rc/Makefile
parentLinux 5.12-rc2 (diff)
downloadlinux-dev-f09f9f93afad770a04b35235a0aa465fcc8d6e3d.tar.xz
linux-dev-f09f9f93afad770a04b35235a0aa465fcc8d6e3d.zip
media: rc: compile rc-cec.c into rc-core
The rc-cec keymap is unusual in that it can't be built as a module, instead it is registered directly in rc-main.c if CONFIG_MEDIA_CEC_RC is set. This is because it can be called from drm_dp_cec_set_edid() via cec_register_adapter() in an asynchronous context, and it is not allowed to use request_module() to load rc-cec.ko in that case. Trying to do so results in a 'WARN_ON_ONCE(wait && current_is_async())'. Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set, we just compile this keymap into the rc-core module and never as a separate module. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 2c6d1fffa1d9 (drm: add support for DisplayPort CEC-Tunneling-over-AUX) Reported-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/rc/Makefile')
-rw-r--r--drivers/media/rc/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile
index 5bb2932ab119..ff6a8fc4c38e 100644
--- a/drivers/media/rc/Makefile
+++ b/drivers/media/rc/Makefile
@@ -5,6 +5,7 @@ obj-y += keymaps/
obj-$(CONFIG_RC_CORE) += rc-core.o
rc-core-y := rc-main.o rc-ir-raw.o
rc-core-$(CONFIG_LIRC) += lirc_dev.o
+rc-core-$(CONFIG_MEDIA_CEC_RC) += keymaps/rc-cec.o
rc-core-$(CONFIG_BPF_LIRC_MODE2) += bpf-lirc.o
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o