diff options
Diffstat (limited to 'drivers/media/rc/img-ir/img-ir-sony.c')
-rw-r--r-- | drivers/media/rc/img-ir/img-ir-sony.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/rc/img-ir/img-ir-sony.c b/drivers/media/rc/img-ir/img-ir-sony.c index b9029ae..3a0f17b 100644 --- a/drivers/media/rc/img-ir/img-ir-sony.c +++ b/drivers/media/rc/img-ir/img-ir-sony.c @@ -12,35 +12,39 @@ #include "img-ir-hw.h" /* Convert Sony data to a scancode */ -static int img_ir_sony_scancode(int len, u64 raw, int *scancode, u64 protocols) +static int img_ir_sony_scancode(int len, u64 raw, enum rc_type *protocol, + u32 *scancode, u64 enabled_protocols) { unsigned int dev, subdev, func; switch (len) { case 12: - if (!(protocols & RC_BIT_SONY12)) + if (!(enabled_protocols & RC_BIT_SONY12)) return -EINVAL; func = raw & 0x7f; /* first 7 bits */ raw >>= 7; dev = raw & 0x1f; /* next 5 bits */ subdev = 0; + *protocol = RC_TYPE_SONY12; break; case 15: - if (!(protocols & RC_BIT_SONY15)) + if (!(enabled_protocols & RC_BIT_SONY15)) return -EINVAL; func = raw & 0x7f; /* first 7 bits */ raw >>= 7; dev = raw & 0xff; /* next 8 bits */ subdev = 0; + *protocol = RC_TYPE_SONY15; break; case 20: - if (!(protocols & RC_BIT_SONY20)) + if (!(enabled_protocols & RC_BIT_SONY20)) return -EINVAL; func = raw & 0x7f; /* first 7 bits */ raw >>= 7; dev = raw & 0x1f; /* next 5 bits */ raw >>= 5; subdev = raw & 0xff; /* next 8 bits */ + *protocol = RC_TYPE_SONY20; break; default: return -EINVAL; |