Skip to content
  • Sean Young's avatar
    a8648098
    media: rc: if kernel is built without an IR codec, don't advertise it · a8648098
    Sean Young authored
    
    
    If the kernel is built without e.g. the imon IR decoder, the protocols
    sysfs file still show the protocol as available. If user-space tries to
    enable this decoder, the kernel will report an error:
    
    $ echo +imon > /sys/class/rc/rc0/protocols
    [   57.693033] rc_core: Loaded IR protocol module ir-imon-decoder, but protocol imon still not available
    
    Ensuring that unavailable protocols are not advertised, ensures that
    users space knows it is not available, and a BPF based IR decoder can be
    loaded instead.
    
    This supports the case when no kernel-based codec needs to be compiled in,
    and every IR decoder can be BPF based.
    
    Signed-off-by: default avatarSean Young <sean@mess.org>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    a8648098
    media: rc: if kernel is built without an IR codec, don't advertise it
    Sean Young authored
    
    
    If the kernel is built without e.g. the imon IR decoder, the protocols
    sysfs file still show the protocol as available. If user-space tries to
    enable this decoder, the kernel will report an error:
    
    $ echo +imon > /sys/class/rc/rc0/protocols
    [   57.693033] rc_core: Loaded IR protocol module ir-imon-decoder, but protocol imon still not available
    
    Ensuring that unavailable protocols are not advertised, ensures that
    users space knows it is not available, and a BPF based IR decoder can be
    loaded instead.
    
    This supports the case when no kernel-based codec needs to be compiled in,
    and every IR decoder can be BPF based.
    
    Signed-off-by: default avatarSean Young <sean@mess.org>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Loading