[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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
32e63f0368
commit
ab93ce06ee
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user