• Jarod Wilson's avatar
    [media] mceusb: fix inverted mask inversion logic · d8cc7fd7
    Jarod Wilson authored
    As it turns out, somewhere along the way, we managed to invert the
    meaning of the tx_mask_inverted flag. Looking back over the old lirc
    driver, tx_mask_inverted was set to 0 if the device was in tx_mask_list.
    Now we have a tx_mask_inverted flag set to 1 for all the devices that
    were in the list, and set tx_mask_inverted to that flag value, which is
    actually the opposite of what we used to set, causing set_tx_mask to use
    the wrong mask setting option. Since there seem to be more devices with
    inverted masks than not (using the original device as the baseline for
    inverted vs. normal), lets just call the ones currently marked as
    inverted normal instead, and flip the if/else actions that key off of
    the inverted flag.
    
    Note: the problem only cropped up if a call to set_tx_mask was made, if
    no mask was set, the device would work just fine, which is why this
    managed to slip though w/o getting noticed until now.
    
    Tested successfully by myself and Dennis Gilmore.
    Reported-by: default avatarDennis Gilmore <dgilmore@redhat.com>
    Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    d8cc7fd7
mceusb.c 37.3 KB