diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-03 20:31:25 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-23 20:05:56 -0300 |
commit | 4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488 (patch) | |
tree | eadbd0f9d33fc8e5da28a03356170cdee7404b3b /drivers/media/pci/cx88/cx88-input.c | |
parent | 2886f013c312d288fdd4b8472b82a0a9590e3134 (diff) | |
download | op-kernel-dev-4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488.zip op-kernel-dev-4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488.tar.gz |
[media] rc-core: improve ir-kbd-i2c get_key functions
The arguments used for ir-kbd-i2c's get_key() functions are not
really suited for rc-core and the ir_raw/ir_key distinction is
just confusing.
Convert all of them to return a protocol/scancode/toggle triple instead.
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci/cx88/cx88-input.c')
-rw-r--r-- | drivers/media/pci/cx88/cx88-input.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index f991696..779fc63 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c @@ -539,7 +539,8 @@ void cx88_ir_irq(struct cx88_core *core) ir_raw_event_handle(ir->dev); } -static int get_key_pvr2000(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) +static int get_key_pvr2000(struct IR_i2c *ir, enum rc_type *protocol, + u32 *scancode, u8 *toggle) { int flags, code; @@ -563,8 +564,9 @@ static int get_key_pvr2000(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) dprintk("IR Key/Flags: (0x%02x/0x%02x)\n", code & 0xff, flags & 0xff); - *ir_key = code & 0xff; - *ir_raw = code; + *protocol = RC_TYPE_UNKNOWN; + *scancode = code & 0xff; + *toggle = 0; return 1; } |