summaryrefslogtreecommitdiff
path: root/drivers/media/pci/ivtv
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2014-04-03 20:31:25 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-23 20:05:56 -0300
commit4dd9bb91bb5dc44e3f8c23c60a0ba432e50d7488 (patch)
treeeadbd0f9d33fc8e5da28a03356170cdee7404b3b /drivers/media/pci/ivtv
parent2886f013c312d288fdd4b8472b82a0a9590e3134 (diff)
[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/ivtv')
-rw-r--r--drivers/media/pci/ivtv/ivtv-i2c.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-i2c.c b/drivers/media/pci/ivtv/ivtv-i2c.c
index ceed2d87abfd..1a41ba5c7d30 100644
--- a/drivers/media/pci/ivtv/ivtv-i2c.c
+++ b/drivers/media/pci/ivtv/ivtv-i2c.c
@@ -148,7 +148,8 @@ static const char * const hw_devicenames[] = {
"ir_video", /* IVTV_HW_I2C_IR_RX_ADAPTEC */
};
-static int get_key_adaptec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
+static int get_key_adaptec(struct IR_i2c *ir, enum rc_type *protocol,
+ u32 *scancode, u8 *toggle)
{
unsigned char keybuf[4];
@@ -167,9 +168,9 @@ static int get_key_adaptec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
keybuf[2] &= 0x7f;
keybuf[3] |= 0x80;
- *ir_key = keybuf[3] | keybuf[2] << 8 | keybuf[1] << 16 |keybuf[0] << 24;
- *ir_raw = *ir_key;
-
+ *protocol = RC_TYPE_UNKNOWN;
+ *scancode = keybuf[3] | keybuf[2] << 8 | keybuf[1] << 16 |keybuf[0] << 24;
+ *toggle = 0;
return 1;
}