diff options
author | Sifan Naeem <sifan.naeem@imgtec.com> | 2014-12-11 15:06:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-23 12:11:50 -0500 |
commit | ab93ce06eef556cc85a016e12ff7c7a763f04c91 (patch) | |
tree | bc70c21ab5d916eb594fda95c00c193a4feda3ad /drivers/media/rc/img-ir/img-ir-sharp.c | |
parent | 32e63f0368ed16e5ac417dc0bc2a5f8acbfb1511 (diff) |
[media] rc: img-ir: add scancode requests to a struct
The information being requested of hardware decode callbacks through
the img-ir-hw scancode API is mounting up, so combine it into a struct
which can be passed in with a single pointer rather than multiple
pointer arguments. This allows it to be extended more easily without
touching all the hardware decode callbacks.
Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc/img-ir/img-ir-sharp.c')
-rw-r--r-- | drivers/media/rc/img-ir/img-ir-sharp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-sharp.c b/drivers/media/rc/img-ir/img-ir-sharp.c index 3300a38802ac..fe5acc4f030e 100644 --- a/drivers/media/rc/img-ir/img-ir-sharp.c +++ b/drivers/media/rc/img-ir/img-ir-sharp.c | |||
@@ -12,8 +12,8 @@ | |||
12 | #include "img-ir-hw.h" | 12 | #include "img-ir-hw.h" |
13 | 13 | ||
14 | /* Convert Sharp data to a scancode */ | 14 | /* Convert Sharp data to a scancode */ |
15 | static int img_ir_sharp_scancode(int len, u64 raw, enum rc_type *protocol, | 15 | static int img_ir_sharp_scancode(int len, u64 raw, u64 enabled_protocols, |
16 | u32 *scancode, u64 enabled_protocols) | 16 | struct img_ir_scancode_req *request) |
17 | { | 17 | { |
18 | unsigned int addr, cmd, exp, chk; | 18 | unsigned int addr, cmd, exp, chk; |
19 | 19 | ||
@@ -32,8 +32,8 @@ static int img_ir_sharp_scancode(int len, u64 raw, enum rc_type *protocol, | |||
32 | /* probably the second half of the message */ | 32 | /* probably the second half of the message */ |
33 | return -EINVAL; | 33 | return -EINVAL; |
34 | 34 | ||
35 | *protocol = RC_TYPE_SHARP; | 35 | request->protocol = RC_TYPE_SHARP; |
36 | *scancode = addr << 8 | cmd; | 36 | request->scancode = addr << 8 | cmd; |
37 | return IMG_IR_SCANCODE; | 37 | return IMG_IR_SCANCODE; |
38 | } | 38 | } |
39 | 39 | ||