diff options
author | Sean Young <sean@mess.org> | 2017-08-07 08:38:10 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-20 09:57:24 -0400 |
commit | 86fe1ac0d563477b1d10d49a92237e3f3d74e7be (patch) | |
tree | 82d196e5aada9faaf1b882c480121d6eed3b526a /drivers/media/rc/gpio-ir-recv.c | |
parent | 48b2de1971c766a8dc0aec668742e17cb0c75127 (diff) | |
download | blackbird-op-linux-86fe1ac0d563477b1d10d49a92237e3f3d74e7be.tar.gz blackbird-op-linux-86fe1ac0d563477b1d10d49a92237e3f3d74e7be.zip |
media: rc: simplify ir_raw_event_store_edge()
Since commit 12749b198fa4 ("[media] rc: saa7134: add trailing space for
timely decoding"), the workaround of inserting reset events is no
longer needed.
Note that the initial reset is not needed either; other rc-core drivers
that don't use ir_raw_event_store_edge() never call this at all.
Verified on a HVR-1150 and Raspberry Pi.
Fixes: 3f5c4c73322e ("[media] rc: fix ghost keypresses with certain hw")
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/gpio-ir-recv.c')
-rw-r--r-- | drivers/media/rc/gpio-ir-recv.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 512e31593a77..24c7ac8f1b82 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -76,7 +76,6 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id) struct gpio_rc_dev *gpio_dev = dev_id; int gval; int rc = 0; - enum raw_event_type type = IR_SPACE; gval = gpio_get_value(gpio_dev->gpio_nr); @@ -86,10 +85,7 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id) if (gpio_dev->active_low) gval = !gval; - if (gval == 1) - type = IR_PULSE; - - rc = ir_raw_event_store_edge(gpio_dev->rcdev, type); + rc = ir_raw_event_store_edge(gpio_dev->rcdev, gval == 1); if (rc < 0) goto err_get_value; |