diff options
author | Sean Young <sean@mess.org> | 2016-07-10 19:34:32 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-15 17:46:55 +0300 |
commit | 20f5a827cf4b8fa11d5897e4d92d1a480f2cf58b (patch) | |
tree | b9a9b3f66a82b5009692dd2a1cb26b1da1af6d91 /drivers/media/rc/winbond-cir.c | |
parent | 9e422f64fa74e2d68e198c6a3d8020903152ce52 (diff) | |
download | linux-20f5a827cf4b8fa11d5897e4d92d1a480f2cf58b.tar.xz |
[media] rc: make s_tx_mask consistent
When s_tx_mask is given an invalid bitmask, the number of transmitters
should be returned. See the LIRC_SET_TRANSMITTER_MASK lirc ioctl
documentation.
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/winbond-cir.c')
-rw-r--r-- | drivers/media/rc/winbond-cir.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index d839f73f6a05..95ae60e659a1 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -615,6 +615,10 @@ wbcir_txmask(struct rc_dev *dev, u32 mask) unsigned long flags; u8 val; + /* return the number of transmitters */ + if (mask > 15) + return 4; + /* Four outputs, only one output can be enabled at a time */ switch (mask) { case 0x1: |