[media] winbond-cir: correctness fix
authorDavid Härdeman <david@hardeman.nu>
Sat, 25 Aug 2012 20:46:52 +0000 (17:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 25 Sep 2012 16:09:10 +0000 (13:09 -0300)
This is a minor correctness fix for the duration calculation in
winbond-cir (the read value should be incremented by one).

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/rc/winbond-cir.c

index 54ee34872d143cea7345f60a5ad9038e91266a51..29e6769b91a85283c6a5de732fe1268e55ac7be2 100644 (file)
@@ -358,7 +358,7 @@ wbcir_irq_rx(struct wbcir_data *data, struct pnp_dev *device)
                if (data->rxstate == WBCIR_RXSTATE_ERROR)
                        continue;
                rawir.pulse = irdata & 0x80 ? false : true;
-               rawir.duration = US_TO_NS((irdata & 0x7F) * 10);
+               rawir.duration = US_TO_NS(((irdata & 0x7F) + 1) * 10);
                ir_raw_event_store_with_filter(data->dev, &rawir);
        }