]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] rc: make s_tx_carrier consistent
authorSean Young <sean@mess.org>
Sun, 10 Jul 2016 16:34:33 +0000 (13:34 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 15 Jul 2016 14:54:23 +0000 (11:54 -0300)
LIRC_SET_SEND_CARRIER should return 0 on success or -errno.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Documentation/DocBook/media/v4l/lirc_device_interface.xml
drivers/media/rc/ene_ir.c
drivers/media/rc/iguanair.c
drivers/media/rc/mceusb.c
drivers/media/rc/redrat3.c

index 34cada2ca71038694f11faa3f1060fe641b12bd1..71f9dbb81ec7ed5a6f22eb34675adaed86417e3c 100644 (file)
@@ -157,7 +157,7 @@ on working with the default settings initially.</para>
   <varlistentry>
     <term>LIRC_SET_{SEND,REC}_CARRIER</term>
     <listitem>
-      <para>Set send/receive carrier (in Hz).</para>
+      <para>Set send/receive carrier (in Hz). Return 0 on success.</para>
     </listitem>
   </varlistentry>
   <varlistentry>
index 8d77e1c4a141e54cc860bc35f0ef2a12f0390a0f..d1c61cd035f6fb9d32e3fac435ec2d69be1479e6 100644 (file)
@@ -904,7 +904,7 @@ static int ene_set_tx_carrier(struct rc_dev *rdev, u32 carrier)
 
                dbg("TX: out of range %d-%d kHz carrier",
                        2000 / ENE_CIRMOD_PRD_MIN, 2000 / ENE_CIRMOD_PRD_MAX);
-               return -1;
+               return -EINVAL;
        }
 
        dev->tx_period = period;
index ee60e17fba05d715c1a7b10bdc8013575f445a10..5f634545ddd81c6e98887ed93a8fc2abb8a29f21 100644 (file)
@@ -330,7 +330,7 @@ static int iguanair_set_tx_carrier(struct rc_dev *dev, uint32_t carrier)
 
        mutex_unlock(&ir->lock);
 
-       return carrier;
+       return 0;
 }
 
 static int iguanair_set_tx_mask(struct rc_dev *dev, uint32_t mask)
index 2d1585d9bd9ef107d6780a4f5cae4ecff9361b74..4f8c7effdceeb97597bc9b0afa252826020c4bfe 100644 (file)
@@ -942,7 +942,7 @@ static int mceusb_set_tx_carrier(struct rc_dev *dev, u32 carrier)
 
        }
 
-       return carrier;
+       return 0;
 }
 
 /*
index ec74244a38530a937d07280a304debdf7a5988b7..6adea78c1f695134b04677663332abad8ef69726 100644 (file)
@@ -708,7 +708,7 @@ static int redrat3_set_tx_carrier(struct rc_dev *rcdev, u32 carrier)
 
        rr3->carrier = carrier;
 
-       return carrier;
+       return 0;
 }
 
 static int redrat3_transmit_ir(struct rc_dev *rcdev, unsigned *txbuf,