diff options
author | David Härdeman <david@hardeman.nu> | 2014-04-04 01:31:25 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-24 01:05:56 +0200 |
commit | 4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488 (patch) | |
tree | eadbd0f9d33fc8e5da28a03356170cdee7404b3b /drivers/media/pci/bt8xx | |
parent | [media] bt8xx: fixup RC5 decoding (diff) | |
download | linux-4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488.tar.xz linux-4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488.zip |
[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/bt8xx')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-input.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c index ffc0ee1d848b..e745f5a04a40 100644 --- a/drivers/media/pci/bt8xx/bttv-input.c +++ b/drivers/media/pci/bt8xx/bttv-input.c @@ -336,7 +336,8 @@ static void bttv_ir_stop(struct bttv *btv) * Get_key functions used by I2C remotes */ -static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) +static int get_key_pv951(struct IR_i2c *ir, enum rc_type *protocol, + u32 *scancode, u8 *toggle) { unsigned char b; @@ -363,8 +364,9 @@ static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) * the device is bound to the vendor-provided RC. */ - *ir_key = b; - *ir_raw = b; + *protocol = RC_TYPE_UNKNOWN; + *scancode = b; + *toggle = 0; return 1; } |