1
0
Fork 0

[media] winbond-cir: correctness fix

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>
hifive-unleashed-5.1
David Härdeman 2012-08-25 17:46:52 -03:00 committed by Mauro Carvalho Chehab
parent 8ac456495a
commit 30cedcf34f
1 changed files with 1 additions and 1 deletions

View 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);
}