]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[media] mceusb: set a default rx timeout
authorJarod Wilson <jarod@redhat.com>
Thu, 16 Dec 2010 15:40:16 +0000 (12:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 20 Dec 2010 16:11:18 +0000 (14:11 -0200)
Its possible for the call to read rx timeout from the hardware to fail,
in which case we end up with a bogus rx timeout value. Set a default one
when filling in the rc struct, and we'll just overwrite it later w/the
value from hardware, but if that read fails, we've at least got a sane
rx timeout value to work with (1000ms is the default value I've seen
returned on most if not all mceusb hardware).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/IR/mceusb.c

index 3a968f082e658481d0abcd41805f16e7f7c8163c..392ca24132dafd5456e905fa61c216d566703976 100644 (file)
@@ -1073,6 +1073,7 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
        props->priv = ir;
        props->driver_type = RC_DRIVER_IR_RAW;
        props->allowed_protos = IR_TYPE_ALL;
+       props->timeout = MS_TO_NS(1000);
        if (!ir->flags.no_tx) {
                props->s_tx_mask = mceusb_set_tx_mask;
                props->s_tx_carrier = mceusb_set_tx_carrier;