summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2021-02-26 11:37:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-17 17:03:40 +0100
commitcb36bf447a0c2237e9d98ae71c38f6a15a06b9e6 (patch)
treedd16f4027bdfebaf7f9b067b2598c4df6d35882d /include
parent4c0c31572b67e2029b2abb83141ed3a3927b81eb (diff)
downloadlinux-cb36bf447a0c2237e9d98ae71c38f6a15a06b9e6.tar.gz
linux-cb36bf447a0c2237e9d98ae71c38f6a15a06b9e6.tar.bz2
linux-cb36bf447a0c2237e9d98ae71c38f6a15a06b9e6.zip
media: rc: compile rc-cec.c into rc-core
commit f09f9f93afad770a04b35235a0aa465fcc8d6e3d upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/media/rc-map.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/media/rc-map.h b/include/media/rc-map.h
index c2ef3906e1cd..a358c87a65de 100644
--- a/include/media/rc-map.h
+++ b/include/media/rc-map.h
@@ -126,6 +126,13 @@ struct rc_map_list {
struct rc_map map;
};
+#ifdef CONFIG_MEDIA_CEC_RC
+/*
+ * rc_map_list from rc-cec.c
+ */
+extern struct rc_map_list cec_map;
+#endif
+
/* Routines from rc-map.c */
/**