diff options
author | Sifan Naeem <sifan.naeem@imgtec.com> | 2014-12-11 21:06:22 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-23 18:11:50 +0100 |
commit | ab93ce06eef556cc85a016e12ff7c7a763f04c91 (patch) | |
tree | bc70c21ab5d916eb594fda95c00c193a4feda3ad /drivers/media/rc/img-ir/img-ir-sanyo.c | |
parent | [media] em28xx-video: fix missing newlines (diff) | |
download | linux-ab93ce06eef556cc85a016e12ff7c7a763f04c91.tar.xz linux-ab93ce06eef556cc85a016e12ff7c7a763f04c91.zip |
[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-sanyo.c')
-rw-r--r-- | drivers/media/rc/img-ir/img-ir-sanyo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-sanyo.c b/drivers/media/rc/img-ir/img-ir-sanyo.c index 6b0653ecdf5a..f394994ffc22 100644 --- a/drivers/media/rc/img-ir/img-ir-sanyo.c +++ b/drivers/media/rc/img-ir/img-ir-sanyo.c @@ -23,8 +23,8 @@ #include "img-ir-hw.h" /* Convert Sanyo data to a scancode */ -static int img_ir_sanyo_scancode(int len, u64 raw, enum rc_type *protocol, - u32 *scancode, u64 enabled_protocols) +static int img_ir_sanyo_scancode(int len, u64 raw, u64 enabled_protocols, + struct img_ir_scancode_req *request) { unsigned int addr, addr_inv, data, data_inv; /* a repeat code has no data */ @@ -44,8 +44,8 @@ static int img_ir_sanyo_scancode(int len, u64 raw, enum rc_type *protocol, return -EINVAL; /* Normal Sanyo */ - *protocol = RC_TYPE_SANYO; - *scancode = addr << 8 | data; + request->protocol = RC_TYPE_SANYO; + request->scancode = addr << 8 | data; return IMG_IR_SCANCODE; } |