From: David Härdeman Date: Sat, 25 Aug 2012 20:46:52 +0000 (-0300) Subject: [media] winbond-cir: correctness fix X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=30cedcf34f0309ea1ad6e0fdf7a52fcf37985658;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c index 54ee34872d14..29e6769b91a8 100644 --- a/drivers/media/rc/winbond-cir.c +++ b/drivers/media/rc/winbond-cir.c @@ -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); }