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: 2c6d1fff (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>
Showing
- drivers/media/rc/Makefile 1 addition, 0 deletionsdrivers/media/rc/Makefile
- drivers/media/rc/keymaps/Makefile 0 additions, 1 deletiondrivers/media/rc/keymaps/Makefile
- drivers/media/rc/keymaps/rc-cec.c 11 additions, 17 deletionsdrivers/media/rc/keymaps/rc-cec.c
- drivers/media/rc/rc-main.c 6 additions, 0 deletionsdrivers/media/rc/rc-main.c
- include/media/rc-map.h 7 additions, 0 deletionsinclude/media/rc-map.h
Please register or sign in to comment