diff options
author | Sifan Naeem <sifan.naeem@imgtec.com> | 2014-12-11 23:06:22 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-23 20:11:50 +0300 |
commit | ab93ce06eef556cc85a016e12ff7c7a763f04c91 (patch) | |
tree | bc70c21ab5d916eb594fda95c00c193a4feda3ad /drivers/media/rc/img-ir/img-ir-sharp.c | |
parent | 32e63f0368ed16e5ac417dc0bc2a5f8acbfb1511 (diff) | |
download | linux-ab93ce06eef556cc85a016e12ff7c7a763f04c91.tar.xz |
[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 @@ #include "img-ir-hw.h" /* Convert Sharp data to a scancode */ -static int img_ir_sharp_scancode(int len, u64 raw, enum rc_type *protocol, - u32 *scancode, u64 enabled_protocols) +static int img_ir_sharp_scancode(int len, u64 raw, u64 enabled_protocols, + struct img_ir_scancode_req *request) { unsigned int addr, cmd, exp, chk; @@ -32,8 +32,8 @@ static int img_ir_sharp_scancode(int len, u64 raw, enum rc_type *protocol, /* probably the second half of the message */ return -EINVAL; - *protocol = RC_TYPE_SHARP; - *scancode = addr << 8 | cmd; + request->protocol = RC_TYPE_SHARP; + request->scancode = addr << 8 | cmd; return IMG_IR_SCANCODE; } |